Skip to content

Commit b6535ea

Browse files
authored
[3.10] gh-112160: Add 'regen-configure' make target (#112163)
Add 'regen-configure' make target
1 parent 6c2f34f commit b6535ea

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

.github/workflows/build.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,12 @@ jobs:
110110
grep "aclocal 1.16.3" aclocal.m4
111111
grep -q "runstatedir" configure
112112
grep -q "PKG_PROG_PKG_CONFIG" aclocal.m4
113+
- name: Configure CPython
114+
run: |
115+
# Build Python with the libpython dynamic library
116+
./configure --config-cache --with-pydebug --enable-shared
113117
- name: Regenerate autoconf files
114-
run: docker run --rm -v $(pwd):/src quay.io/tiran/cpython_autoconf:269
118+
run: make regen-configure
115119
- name: Build CPython
116120
run: |
117121
# Build Python with the libpython dynamic library

Makefile.pre.in

+12
Original file line numberDiff line numberDiff line change
@@ -1868,6 +1868,18 @@ autoconf:
18681868
# Regenerate pyconfig.h.in from configure.ac using autoheader
18691869
(cd $(srcdir); autoheader -Wall)
18701870

1871+
# See https://github.com/tiran/cpython_autoconf container
1872+
.PHONY: regen-configure
1873+
regen-configure:
1874+
@if command -v podman >/dev/null; then RUNTIME="podman"; else RUNTIME="docker"; fi; \
1875+
if ! command -v $$RUNTIME; then echo "$@ needs either Podman or Docker container runtime." >&2; exit 1; fi; \
1876+
if command -v selinuxenabled >/dev/null && selinuxenabled; then OPT=":Z"; fi; \
1877+
# Manifest corresponds with tag '269' \
1878+
CPYTHON_AUTOCONF_MANIFEST="sha256:f370fee95eefa3d57b00488bce4911635411fa83e2d293ced8cf8a3674ead939" \
1879+
CMD="$$RUNTIME run --rm --pull=missing -v $(abs_srcdir):/src$$OPT quay.io/tiran/cpython_autoconf@$$CPYTHON_AUTOCONF_MANIFEST"; \
1880+
echo $$CMD; \
1881+
$$CMD || exit $?
1882+
18711883
# Create a tags file for vi
18721884
tags::
18731885
ctags -w $(srcdir)/Include/*.h $(srcdir)/Include/cpython/*.h $(srcdir)/Include/internal/*.h

0 commit comments

Comments
 (0)