-
-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
Unvendor libmpdec
sources
#115119
Comments
+1 for an autoconf warning. |
Adding an external libmpdec to the macOS installer build shouldn't be a big issue. Assign it to me if you proceed with this. |
FTR: the source deps repo is now updated. |
@ned-deily: for build-installer.py, is there more to do than adding a configuration for mpdecimal? I've used the following |
Likely yes, I'll take care of it. Thanks. |
I took a quick look at this and be aware that this change proposal will likely impact everyone building Python 3.13 on macOS. macOS does not ship a copy of libmpdec so, if the bundled version is removed, anyone building Python on macOS will now need to provide a local copy, either building from source or using a version from one of the widely-used third-party package managers, like Homebrew or MacPorts. Both currently have |
Last time I checked, libmpdec did not provide pkgconfig files: $ ls $(brew --prefix libmpdec)/lib/pkgconfig
ls: /opt/homebrew/opt/mpdecimal/lib/pkgconfig: No such file or directory
$ cd mpdecimal-2.5.1; find . | grep pkg
$ |
With the current 4.0.0 version, it appears both Homebrew and MacPorts ship them:
|
Yes, the 4.0.0 version does indeed provide pkg-config configuration files. I'll work on an Autoconf patch. |
Only libmpdec 4.0.0 supports pkg-config.
This includes adding what should be a relatively temporary `Modules/_decimal/windows/mpdecimal.h` shim to choose between `mpdecimal32vc.h` or `mpdecimal64vc.h` based on which of `CONFIG_64` or `CONFIG_32` is defined.
…-115182) This includes adding what should be a relatively temporary `Modules/_decimal/windows/mpdecimal.h` shim to choose between `mpdecimal32vc.h` or `mpdecimal64vc.h` based on which of `CONFIG_64` or `CONFIG_32` is defined.
…-115182) This includes adding what should be a relatively temporary `Modules/_decimal/windows/mpdecimal.h` shim to choose between `mpdecimal32vc.h` or `mpdecimal64vc.h` based on which of `CONFIG_64` or `CONFIG_32` is defined.
…-115182) This includes adding what should be a relatively temporary `Modules/_decimal/windows/mpdecimal.h` shim to choose between `mpdecimal32vc.h` or `mpdecimal64vc.h` based on which of `CONFIG_64` or `CONFIG_32` is defined.
pkg-config is supported for libmpdec 4.0.0 and newer.
@zware are we still aiming for 3.13 for the first batch of items? |
Resolved by: |
For iOS: almost certainly not without some patching. It's a configure-based project, so at a minimum it will need a patch to support the iOS and iOS-simulator host tags. That might be as simple as updating config.sub (the current version from CPython would do the job), but I'd need to dig in to be certain. I've tried multiple times to get the iOS tags (especially the simulator ones) upstream into autoconf; I was partially successful with the 2024-01-01 release, but it's still missing the simulator tags. The autoconf contribution process appears to be a black hole... you email them a patch, and maybe they apply that patch at some point in the future, so you watch the repo to see if your patch has been applied. I haven't even received acknowledgement that I've sent a patch, let alone feedback on the patch. |
We can solve this with https://discuss.python.org/t/pinning-gnu-autotools-using-the-github-container-registry/47437 |
Mark _decimal as missing if libmpdecimal is not found.
…8382) Co-authored-by: Ned Deily <[email protected]>
While I agree the devcontainer approach is worth pursing, unless I'm missing something, devcontainers won't address what I'm talking about here. The underlying issue is that third party libraries that have autoconf configuration won't support iOS out of the box, because autoconf doesn't have full support for iOS. As a result, any autoconf library that you want to use under iOS will require a patch of the This is a problem that needs autoconf to accept a patch upstream to add iOS simulator support, so that third-party packages can update their |
Got it; thanks for the clarification! Well, let's hope your upstream patch makes it to the next GNU Autoconf release 🤞 |
Ubuntu 22.04 ships with mpdecimal 2.5.1, installable using 'apt install libmpdec3'
Ubuntu 22.04 ships with mpdecimal 2.5.1, installable using 'apt install libmpdec-dev'.
Co-authored-by: Zachary Ware <[email protected]>
…ythonGH-118382) Co-authored-by: Ned Deily <[email protected]>
Ubuntu 22.04 ships with mpdecimal 2.5.1, installable using 'apt install libmpdec-dev'.
Co-authored-by: Zachary Ware <[email protected]>
It seems, that due to https://bugs.debian.org/1056785 - more projects now use |
Reaching out to the Debian CPython maintainer @doko42. It would be very nice to make mpdecimal available again in Debian. According to https://www.bytereef.org/mpdecimal/changelog.html the Sphinx issues no longer exist in version 4.0.0. |
…not found (pythonGH-119196) (cherry picked from commit 642b25b) Co-authored-by: Erlend E. Aasland <[email protected]>
… not found (GH-119196) (#119217) (cherry picked from commit 642b25b) Co-authored-by: Erlend E. Aasland <[email protected]>
To facilitate cleaner updates of the externally-maintained
libmpdec
required by the_decimal
module, we should migrate away from the bundled copy inModules/_decimal/libmpdec
and towards an "external" incpython-source-deps
for Windows and--with-system-libmpdec
by default elsewhere.My tentative plan is as follows:
mpdecimal-2.5.1
andmpdecimal-4.0.0
tocpython-source-deps
:mpdecimal-2.5.1
external (gh-115119: Switch Windows build to mpdecimal external #115182)mpdecimal-4.0.0
Post#118539
: amend Ubuntu CI to use system installed mpdecimallibmpdec
sources #115119 (comment)--without-system-libmpdec
(with warning)--with[out]-system-libmpdec
configure
options andModules/_decimal/libmpdec/
Linked PRs
The text was updated successfully, but these errors were encountered: