summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Galindo Salgado <Pablogsal@gmail.com>2022-06-23 22:52:43 +0100
committerGitHub <noreply@github.com>2022-06-23 22:52:43 +0100
commit8e6eccabe8156d77d60ba532e60156bcd3592df1 (patch)
tree7ed2ff8e7cff603a7d36423d7af80b28ea1aaeae
parent28a2ccfff279867b87aa31f56bfc97cf3d6b3afe (diff)
downloadcpython-git-8e6eccabe8156d77d60ba532e60156bcd3592df1.tar.gz
Add ABI dump script (#94135)
-rw-r--r--.github/workflows/regen-abidump.sh8
-rw-r--r--.gitignore3
-rw-r--r--Makefile.pre.in2
3 files changed, 12 insertions, 1 deletions
diff --git a/.github/workflows/regen-abidump.sh b/.github/workflows/regen-abidump.sh
new file mode 100644
index 0000000000..251bb3857e
--- /dev/null
+++ b/.github/workflows/regen-abidump.sh
@@ -0,0 +1,8 @@
+set -ex
+
+export DEBIAN_FRONTEND=noninteractive
+./.github/workflows/posix-deps-apt.sh
+apt-get install -yq abigail-tools python3
+export CFLAGS="-g3 -O0"
+./configure --enable-shared && make
+make regen-abidump
diff --git a/.gitignore b/.gitignore
index b3b22f471c..0ddfd717d7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -150,3 +150,6 @@ Python/frozen_modules/MANIFEST
# Ignore ./python binary on Unix but still look into ./Python/ directory.
/python
!/Python/
+
+# main branch only: ABI files are not checked/maintained
+Doc/data/python*.abi
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 20fc89eb76..102cd752c3 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1204,7 +1204,7 @@ regen-global-objects: $(srcdir)/Tools/scripts/generate_global_objects.py
regen-abidump: all
@$(MKDIR_P) $(srcdir)/Doc/data/
abidw "libpython$(LDVERSION).so" --no-architecture --out-file $(srcdir)/Doc/data/python$(LDVERSION).abi.new
- @$(UPDATE_FILE) $(srcdir)/Doc/data/python$(LDVERSION).abi $(srcdir)/Doc/data/python$(LDVERSION).abi.new
+ @$(UPDATE_FILE) --create $(srcdir)/Doc/data/python$(LDVERSION).abi $(srcdir)/Doc/data/python$(LDVERSION).abi.new
check-abidump: all
abidiff $(srcdir)/Doc/data/python$(LDVERSION).abi "libpython$(LDVERSION).so" --drop-private-types --no-architecture --no-added-syms