-
-
Notifications
You must be signed in to change notification settings - Fork 31k
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: |
Co-authored-by: Zachary Ware <zachary.ware@gmail.com>
…ythonGH-118382) Co-authored-by: Ned Deily <nad@python.org>
Ubuntu 22.04 ships with mpdecimal 2.5.1, installable using 'apt install libmpdec-dev'.
Co-authored-by: Zachary Ware <zachary.ware@gmail.com>
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 <erlend@python.org>
Is the plan to still unvendor this if Debian doesn't reinstate the package? |
Why Debian should be a special snowflake for CPython? Referenced bug thread ignores any feedback, including comments from CPython core dev. I think it's a Debian problem, not ours. |
Well, Debian is a major distro and the root of other distros like Ubuntu. But i guess they'll figure it out once Python fails to build |
Say also thanks to people, who aren't part of the Debian maintainers now.
It will not fail. IIUC, with Apparently they don't notice this. |
I missed the |
I don't think you can do here something. Once the CPython will not bundle libmpdec - we will have no choice but fallback to the Someone must do real job and package back the libmpdec for Debian. |
Hmm.. I'll have to look into it more. I'll was expecting to have to Obviously this is not ideal, but until us Debian users get some traction on that issue, that's probably the best I can hope for. When I get some spare time I'll test out a build with the vendored code nuked and see if the overrides work like I expect. |
Ah, yes - that will work. |
What would be the guidance for folks building embedded distributions this case? Use relevant CFLAGS to relatively link to a copy of libmpdec shipped with the embedded distribution? |
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: