]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Add ABI dump script (#94135)
authorPablo Galindo Salgado <Pablogsal@gmail.com>
Thu, 23 Jun 2022 21:52:43 +0000 (22:52 +0100)
committerGitHub <noreply@github.com>
Thu, 23 Jun 2022 21:52:43 +0000 (22:52 +0100)
.github/workflows/regen-abidump.sh [new file with mode: 0644]
.gitignore
Makefile.pre.in

diff --git a/.github/workflows/regen-abidump.sh b/.github/workflows/regen-abidump.sh
new file mode 100644 (file)
index 0000000..251bb38
--- /dev/null
@@ -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
index b3b22f471c2765cce3d3c8927264cb5790dac0cc..0ddfd717d737f8f3182df59cf64809da62933e8a 100644 (file)
@@ -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
index 20fc89eb767c29464c148db95f7befcf25dc985b..102cd752c39cdf13c72774806b219662dae909d5 100644 (file)
@@ -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