8000 gh-98707: Don't let --with-system-libmpdec / --with-system-expat use … · python/cpython@a1e927c · GitHub
[go: up one dir, main page]

Skip to content

Commit a1e927c

Browse files
committed
gh-98707: Don't let --with-system-libmpdec / --with-system-expat use the vendored headers
This was a regression in Python 3.12.0a2 that prevented Fedora doing this: $ rm -r Modules/_decimal/libmpdec $ rm -r Modules/expat Before building Python with --with-system-libmpdec --with-system-expat. The errors were: make: *** No rule to make target 'Modules/_decimal/libmpdec/basearith.h', needed by 'Modules/_decimal/_decimal.o'. Stop. make: *** No rule to make target 'Modules/expat/ascii.h', needed by 'Modules/pyexpat.o'. Stop. Now the make-dependency on the headers only exists when --with-system-libmpdec / --with-system-expat is **not** used. Fixes #98707
1 parent 723ebe7 commit a1e927c

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

Makefile.pre.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2581,13 +2581,13 @@ MODULE_DEPS=$(PYTHON_HEADERS) Modules/config.c $(EXPORTSYMS)
25812581

25822582
MODULE_CMATH_DEPS=$(srcdir)/Modules/_math.h
25832583
MODULE_MATH_DEPS=$(srcdir)/Modules/_math.h
2584-
MODULE_PYEXPAT_DEPS=$(LIBEXPAT_HEADERS) @LIBEXPAT_INTERNAL@
2584+
MODULE_PYEXPAT_DEPS=@LIBEXPAT_INTERNAL@
25852585
MODULE_UNICODEDATA_DEPS=$(srcdir)/Modules/unicodedata_db.h $(srcdir)/Modules/unicodename_db.h
25862586
MODULE__BLAKE2_DEPS=$(srcdir)/Modules/_blake2/impl/blake2-config.h $(srcdir)/Modules/_blake2/impl/blake2-impl.h $(srcdir)/Modules/_blake2/impl/blake2.h $(srcdir)/Modules/_blake2/impl/blake2b-load-sse2.h $(srcdir)/Modules/_blake2/impl/blake2b-load-sse41.h $(srcdir)/Modules/_blake2/impl/blake2b-ref.c $(srcdir)/Modules/_blake2/impl/blake2b-round.h $(srcdir)/Modules/_blake2/impl/blake2b.c $(srcdir)/Modules/_blake2/impl/blake2s-load-sse2.h $(srcdir)/Modules/_blake2/impl/blake2s-load-sse41.h $(srcdir)/Modules/_blake2/impl/blake2s-load-xop.h $(srcdir)/Modules/_blake2/impl/blake2s-ref.c $(srcdir)/Modules/_blake2/impl/blake2s-round.h $(srcdir)/Modules/_blake2/impl/blake2s.c $(srcdir)/Modules/_blake2/blake2module.h $(srcdir)/Modules/hashlib.h
25872587
MODULE__CTYPES_DEPS=$(srcdir)/Modules/_ctypes/ctypes.h $(srcdir)/Modules/_ctypes/darwin/dlfcn.h
25882588
MODULE__CTYPES_MALLOC_CLOSURE=@MODULE__CTYPES_MALLOC_CLOSURE@
2589-
MODULE__DECIMAL_DEPS=$(srcdir)/Modules/_decimal/docstrings.h $(LIBMPDEC_HEADERS) @LIBMPDEC_INTERNAL@
2590-
MODULE__ELEMENTTREE_DEPS=$(srcdir)/Modules/pyexpat.c $(LIBEXPAT_HEADERS) @LIBEXPAT_INTERNAL@
2589+
MODULE__DECIMAL_DEPS=$(srcdir)/Modules/_decimal/docstrings.h @LIBMPDEC_INTERNAL@
2590+
MODULE__ELEMENTTREE_DEPS=$(srcdir)/Modules/pyexpat.c @LIBEXPAT_INTERNAL@
25912591
MODULE__HASHLIB_DEPS=$(srcdir)/Modules/hashlib.h
25922592
MODULE__IO_DEPS=$(srcdir)/Modules/_io/_iomodule.h
25932593
MODULE__MD5_DEPS=$(srcdir)/Modules/hashlib.h
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Don't let ``--with-system-libmpdec`` or ``--with-system-expat`` use the
2+
vendored headers of libmpdec or expact. When the ``--with-system-...`` flag
3+
is passed to ``./configure``, the ``Modules/_decimal/libmpdec`` or
4+
``Modules/expat`` directory can be safely removed before building Python.

configure

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

configure.ac

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3710,7 +3710,7 @@ AS_VAR_IF([with_system_expat], [yes], [
37103710
], [
37113711
LIBEXPAT_CFLAGS="-I\$(srcdir)/Modules/expat"
37123712
LIBEXPAT_LDFLAGS="-lm \$(LIBEXPAT_A)"
3713-
LIBEXPAT_INTERNAL="\$(LIBEXPAT_A)"
3713+
LIBEXPAT_INTERNAL="\$(LIBEXPAT_HEADERS) \$(LIBEXPAT_A)"
37143714
])
37153715

37163716
AC_SUBST([LIBEXPAT_CFLAGS])
@@ -3819,7 +3819,7 @@ AS_VAR_IF([with_system_libmpdec], [yes], [
38193819
], [
38203820
LIBMPDEC_CFLAGS="-I\$(srcdir)/Modules/_decimal/libmpdec"
38213821
LIBMPDEC_LDFLAGS="-lm \$(LIBMPDEC_A)"
3822-
LIBMPDEC_INTERNAL="\$(LIBMPDEC_A)"
3822+
LIBMPDEC_INTERNAL="\$(LIBMPDEC_HEADERS) \$(LIBMPDEC_A)"
38233823
38243824
dnl Disable forced inlining in debug builds, see GH-94847
38253825
AS_VAR_IF([with_pydebug], [yes], [

0 commit comments

Comments
 (0)
0