Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 35.2k
gh-115119: Default to --with-system-libmpdec=yes#118539
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
268d27045173e36f020d0fe5602300068974f87c91f8f4ea28e80866e51c1f7a971a26e3f3e17c84f2b7161d50b1016f0dFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -804,11 +804,18 @@ Libraries options | ||
| .. option:: --with-system-libmpdec | ||
| Build the ``_decimal`` extension module using an installed ``mpdec`` | ||
| library, see the :mod:`decimal` module (default is no). | ||
| Build the ``_decimal`` extension module using an installed ``mpdecimal`` | ||
| library, see the :mod:`decimal` module (default is yes). | ||
| .. versionadded:: 3.3 | ||
| .. versionchanged:: 3.13 | ||
| Default to using the installed ``mpdecimal`` library. | ||
zware marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
erlend-aasland marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| .. deprecated-removed:: 3.13 3.15 | ||
| A copy of the ``mpdecimal`` library sources will no longer be distributed | ||
| with Python 3.15. | ||
| .. seealso:: :option:`LIBMPDEC_CFLAGS` and :option:`LIBMPDEC_LIBS`. | ||
| .. option:: --with-readline=readline|editline | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| The :file:`configure` option :option:`--with-system-libmpdec` now defaults to ``yes``. | ||
| The bundled copy of ``libmpdecimal`` will be removed in Python 3.15. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -3974,23 +3974,46 @@ AC_ARG_WITH( | ||
| [system_libmpdec], | ||
| [AS_HELP_STRING( | ||
| [--with-system-libmpdec], | ||
| [build _decimal module using an installed libmpdec library, see Doc/library/decimal.rst (default is no)] | ||
| [build _decimal module using an installed mpdecimal library, see Doc/library/decimal.rst (default is yes)] | ||
| )], | ||
| [], | ||
| [with_system_libmpdec="no"]) | ||
| [with_system_libmpdec="yes"]) | ||
| AC_MSG_RESULT([$with_system_libmpdec]) | ||
| AS_VAR_IF( | ||
| [with_system_libmpdec], [yes], | ||
| [PKG_CHECK_MODULES( | ||
| [LIBMPDEC], [libmpdec], [], | ||
| [LIBMPDEC], [libmpdec >= 2.5.0], [], | ||
| [LIBMPDEC_CFLAGS=${LIBMPDEC_CFLAGS-""} | ||
| LIBMPDEC_LIBS=${LIBMPDEC_LIBS-"-lmpdec -lm"} | ||
| LIBMPDEC_INTERNAL=])], | ||
| [LIBMPDEC_CFLAGS="-I\$(srcdir)/Modules/_decimal/libmpdec" | ||
| LIBMPDEC_LIBS="-lm \$(LIBMPDEC_A)" | ||
| LIBMPDEC_INTERNAL="\$(LIBMPDEC_HEADERS) \$(LIBMPDEC_A)"]) | ||
| AS_VAR_IF([with_system_libmpdec], [yes], | ||
| [WITH_SAVE_ENV([ | ||
| CPPFLAGS="$LIBMPDEC_CFLAGS $CPPFLAGS" | ||
| LIBS="$LIBMPDEC_LIBS $LIBS" | ||
| AC_LINK_IFELSE([ | ||
| AC_LANG_PROGRAM([ | ||
| #include <mpdecimal.h> | ||
| #if MPD_VERSION_HEX < 0x02050000 | ||
| # error "mpdecimal 2.5.0 or higher required" | ||
| #endif | ||
| ], [const char *x = mpd_version();])], | ||
| [have_mpdec=yes], | ||
| [have_mpdec=no]) | ||
| ])], | ||
| [AS_VAR_SET([have_mpdec], [yes]) | ||
| AC_MSG_WARN([m4_normalize([ | ||
| the bundled copy of libmpdecimal is scheduled for removal in Python 3.15; | ||
| consider using a system installed mpdecimal library.])])]) | ||
| AS_IF([test "$with_system_libmpdec" = "yes" && test "$have_mpdec" = "no"], | ||
| [AC_MSG_WARN([no system libmpdecimal found; unable to build _decimal])]) | ||
zware marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| # Disable forced inlining in debug builds, see GH-94847 | ||
| AS_VAR_IF( | ||
| [with_pydebug], [yes], | ||
| @@ -7668,7 +7691,9 @@ PY_STDLIB_MOD([_curses_panel], | ||
| [], [test "$have_panel" != "no"], | ||
| [$PANEL_CFLAGS $CURSES_CFLAGS], [$PANEL_LIBS $CURSES_LIBS] | ||
| ) | ||
| PY_STDLIB_MOD([_decimal], [], [], [$LIBMPDEC_CFLAGS], [$LIBMPDEC_LIBS]) | ||
| PY_STDLIB_MOD([_decimal], | ||
| [], [test "$have_mpdec" = "yes"], | ||
erlend-aasland marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| [$LIBMPDEC_CFLAGS], [$LIBMPDEC_LIBS]) | ||
| PY_STDLIB_MOD([_dbm], | ||
| [test -n "$with_dbmliborder"], [test "$have_dbm" != "no"], | ||
| [$DBM_CFLAGS], [$DBM_LIBS]) | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hugovk: FYI, this will fail for Ubuntu 24.04, as
libmpdec-devis unavailable there.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been trying to figure out why that is, and have come up short (I get lost quickly in the Debian/Ubuntu development process). All I've found is a note from @doko42 in the Ubuntu
python3.11 3.11.2-4changelog, saying "Build with internal mpdecimal library, so that mpdecimal can be removed for bookworm." (and indeed, Debian bookworm does not have a libmpdec package either).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found it:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1013395
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... and:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1056785