Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit642b25b

Browse files
gh-115119: Fall back to bundled libmpdec if system libmpdec is not found (#119196)
1 parent72d07dd commit642b25b

File tree

3 files changed

+28
-12
lines changed

3 files changed

+28
-12
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fall back to the bundled libmpdec if a system version cannot be found.

‎configure‎

Lines changed: 14 additions & 6 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎configure.ac‎

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3980,16 +3980,21 @@ AC_ARG_WITH(
39803980
[with_system_libmpdec="yes"])
39813981
AC_MSG_RESULT([$with_system_libmpdec])
39823982

3983+
AC_DEFUN([USE_BUNDLED_LIBMPDEC],
3984+
[LIBMPDEC_CFLAGS="-I\$(srcdir)/Modules/_decimal/libmpdec"
3985+
LIBMPDEC_LIBS="-lm \$(LIBMPDEC_A)"
3986+
LIBMPDEC_INTERNAL="\$(LIBMPDEC_HEADERS) \$(LIBMPDEC_A)"
3987+
have_mpdec=yes
3988+
with_system_libmpdec=no])
3989+
39833990
AS_VAR_IF(
39843991
[with_system_libmpdec],[yes],
39853992
[PKG_CHECK_MODULES(
39863993
[LIBMPDEC],[libmpdec >= 2.5.0],[],
39873994
[LIBMPDEC_CFLAGS=${LIBMPDEC_CFLAGS-""}
39883995
LIBMPDEC_LIBS=${LIBMPDEC_LIBS-"-lmpdec -lm"}
39893996
LIBMPDEC_INTERNAL=])],
3990-
[LIBMPDEC_CFLAGS="-I\$(srcdir)/Modules/_decimal/libmpdec"
3991-
LIBMPDEC_LIBS="-lm \$(LIBMPDEC_A)"
3992-
LIBMPDEC_INTERNAL="\$(LIBMPDEC_HEADERS) \$(LIBMPDEC_A)"])
3997+
[USE_BUNDLED_LIBMPDEC()])
39933998

39943999
AS_VAR_IF([with_system_libmpdec],[yes],
39954000
[WITH_SAVE_ENV([
@@ -4006,13 +4011,15 @@ AS_VAR_IF([with_system_libmpdec], [yes],
40064011
[have_mpdec=yes],
40074012
[have_mpdec=no])
40084013
])],
4009-
[AS_VAR_SET([have_mpdec],[yes])
4010-
AC_MSG_WARN([m4_normalize([
4014+
[AC_MSG_WARN([m4_normalize([
40114015
the bundled copy of libmpdecimal is scheduled for removal in Python 3.15;
40124016
consider using a system installed mpdecimal library.])])])
40134017

40144018
AS_IF([test "$with_system_libmpdec" = "yes" && test "$have_mpdec" = "no"],
4015-
[AC_MSG_WARN([no system libmpdecimal found; unable to build _decimal])])
4019+
[AC_MSG_WARN([m4_normalize([
4020+
no system libmpdecimal found; falling back to bundled libmpdecimal
4021+
(deprecated and scheduled for removal in Python 3.15)])])
4022+
USE_BUNDLED_LIBMPDEC()])
40164023

40174024
# Disable forced inlining in debug builds, see GH-94847
40184025
AS_VAR_IF(

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp