Skip to content

Commit 22420d6

Browse files
authored
Merge branch 'main' into doc-py314-unpicklable
2 parents f3b37e4 + b3c6b2c commit 22420d6

File tree

4 files changed

+66
-31
lines changed

4 files changed

+66
-31
lines changed

.github/workflows/build.yml

Lines changed: 44 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,50 @@ jobs:
4040
if: fromJSON(needs.check_source.outputs.run-docs)
4141
uses: ./.github/workflows/reusable-docs.yml
4242

43+
check_autoconf_regen:
44+
name: 'Check if Autoconf files are up to date'
45+
# Don't use ubuntu-latest but a specific version to make the job
46+
# reproducible: to get the same tools versions (autoconf, aclocal, ...)
47+
runs-on: ubuntu-24.04
48+
container:
49+
image: ghcr.io/python/autoconf:2024.10.11.11293396815
50+
timeout-minutes: 60
51+
needs: check_source
52+
if: needs.check_source.outputs.run_tests == 'true'
53+
steps:
54+
- name: Install Git
55+
run: |
56+
apt install git -yq
57+
git config --global --add safe.directory "$GITHUB_WORKSPACE"
58+
- uses: actions/checkout@v4
59+
with:
60+
fetch-depth: 1
61+
- name: Runner image version
62+
run: echo "IMAGE_VERSION=${ImageVersion}" >> $GITHUB_ENV
63+
- name: Check Autoconf and aclocal versions
64+
run: |
65+
grep "Generated by GNU Autoconf 2.71" configure
66+
grep "aclocal 1.16.5" aclocal.m4
67+
grep -q "runstatedir" configure
68+
grep -q "PKG_PROG_PKG_CONFIG" aclocal.m4
69+
- name: Regenerate autoconf files
70+
# Same command used by Tools/build/regen-configure.sh ($AUTORECONF)
71+
run: autoreconf -ivf -Werror
72+
- name: Check for changes
73+
run: |
74+
git add -u
75+
changes=$(git status --porcelain)
76+
# Check for changes in regenerated files
77+
if test -n "$changes"; then
78+
echo "Generated files not up to date."
79+
echo "Perhaps you forgot to run make regen-all or build.bat --regen. ;)"
80+
echo "configure files must be regenerated with a specific version of autoconf."
81+
echo "$changes"
82+
echo ""
83+
git diff --staged || true
84+
exit 1
85+
fi
86+
4387
check_generated_files:
4488
name: 'Check if generated files are up to date'
4589
# Don't use ubuntu-latest but a specific version to make the job
@@ -69,19 +113,10 @@ jobs:
69113
uses: hendrikmuhs/[email protected]
70114
with:
71115
save: false
72-
- name: Check Autoconf and aclocal versions
73-
run: |
74-
grep "Generated by GNU Autoconf 2.71" configure
75-
grep "aclocal 1.16.5" aclocal.m4
76-
grep -q "runstatedir" configure
77-
grep -q "PKG_PROG_PKG_CONFIG" aclocal.m4
78116
- name: Configure CPython
79117
run: |
80118
# Build Python with the libpython dynamic library
81119
./configure --config-cache --with-pydebug --enable-shared
82-
- name: Regenerate autoconf files
83-
# Same command used by Tools/build/regen-configure.sh ($AUTORECONF)
84-
run: autoreconf -ivf -Werror
85120
- name: Build CPython
86121
run: |
87122
make -j4 regen-all

Makefile.pre.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ EXPORTSYMS= @EXPORTSYMS@
176176
EXPORTSFROM= @EXPORTSFROM@
177177

178178
# Executable suffix (.exe on Windows and Mac OS X)
179-
EXE= @EXE_SUFFIX@
179+
EXE= @EXEEXT@
180180
BUILDEXE= @BUILDEXEEXT@
181181

182182
# Name of the patch file to apply for app store compliance

configure

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1325,19 +1325,19 @@ AC_ARG_WITH([suffix],
13251325
[AS_HELP_STRING([--with-suffix=SUFFIX], [set executable suffix to SUFFIX (default is empty, yes is mapped to '.exe')])],
13261326
[
13271327
AS_CASE([$with_suffix],
1328-
[no], [EXE_SUFFIX=],
1329-
[yes], [EXE_SUFFIX=.exe],
1330-
[EXE_SUFFIX=$with_suffix]
1328+
[no], [EXEEXT=],
1329+
[yes], [EXEEXT=.exe],
1330+
[EXEEXT=$with_suffix]
13311331
)
13321332
], [
13331333
AS_CASE([$ac_sys_system/$ac_sys_emscripten_target],
1334-
[Emscripten/browser*], [EXE_SUFFIX=.js],
1335-
[Emscripten/node*], [EXE_SUFFIX=.js],
1336-
[WASI/*], [EXE_SUFFIX=.wasm],
1337-
[EXE_SUFFIX=]
1334+
[Emscripten/browser*], [EXEEXT=.js],
1335+
[Emscripten/node*], [EXEEXT=.js],
1336+
[WASI/*], [EXEEXT=.wasm],
1337+
[EXEEXT=]
13381338
)
13391339
])
1340-
AC_MSG_RESULT([$EXE_SUFFIX])
1340+
AC_MSG_RESULT([$EXEEXT])
13411341

13421342
# Test whether we're running on a non-case-sensitive system, in which
13431343
# case we give a warning if no ext is given
@@ -1347,13 +1347,13 @@ if test ! -d CaseSensitiveTestDir; then
13471347
mkdir CaseSensitiveTestDir
13481348
fi
13491349

1350-
if test -d casesensitivetestdir && test -z "$EXE_SUFFIX"
1350+
if test -d casesensitivetestdir && test -z "$EXEEXT"
13511351
then
13521352
AC_MSG_RESULT([yes])
13531353
BUILDEXEEXT=.exe
13541354
else
13551355
AC_MSG_RESULT([no])
1356-
BUILDEXEEXT=$EXE_SUFFIX
1356+
BUILDEXEEXT=$EXEEXT
13571357
fi
13581358
rmdir CaseSensitiveTestDir
13591359

0 commit comments

Comments
 (0)