Uh oh!
There was an error while loading. Please reload this page.
gh-115119: Default to --with-system-libmpdec=yes - #118539
Conversation
Mark _decimal as missing if libmpdecimal is not found.
$ ./configure --with-system-libmpdec=no | grep -E "(decimal|mpdec)"checking for --with-system-libmpdec... nochecking for --with-decimal-contextvar... yeschecking for decimal libmpdec machine... universalchecking for stdlib extension module _decimal... yes$ ./configure | grep -E "(decimal|mpdec)"checking for --with-system-libmpdec... yeschecking for libmpdec... yeschecking for --with-decimal-contextvar... yeschecking for stdlib extension module _decimal... yes
$ grep -E "_DECIMAL_(CFLAGS|LDFLAGS)=" MakefileMODULE__DECIMAL_CFLAGS=-I/opt/homebrew/Cellar/mpdecimal/4.0.0/includeMODULE__DECIMAL_LDFLAGS=-L/opt/homebrew/Cellar/mpdecimal/4.0.0/lib -lmpdec -lm |
erlend-aasland
commented
May 3, 2024
@zware: I'm not sure if we should fall back to the internal copy if libmpdec is missing. For now, it is marked as missing if it is missing :) We could change it so |
Uh oh!
There was an error while loading. Please reload this page.
erlend-aasland
commented
May 3, 2024
Things to consider:
For now, we can consider to use the bundled version for the Ubuntu CI. |
zware
commented
May 3, 2024
Right, an explicit Footnotes
|
erlend-aasland
commented
May 5, 2024
Yep
Yes, we need to warn for that case.
Hm, I think this case should fail, similar to how we handle |
zware
commented
May 5, 2024
I don't want a bare |
erlend-aasland
commented
May 5, 2024
Ok, how about this:
|
zware
left a comment
There was a problem hiding this comment.
I have a couple of questions and qualms, but overall I'm okay with this as is. We can tweak it through the beta phase if needed.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…l of the mpdecimal sources Co-authored-by: Zachary Ware <zachary.ware@gmail.com>
…rsion check in configure
| libgdbm-dev \ | ||
| libgdbm-compat-dev \ | ||
| liblzma-dev \ | ||
| libmpdec-dev \ |
There was a problem hiding this comment.
@hugovk: FYI, this will fail for Ubuntu 24.04, as libmpdec-dev is unavailable there.
There was a problem hiding this comment.
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-4 changelog, 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.
There was a problem hiding this comment.
| libgdbm-dev \ | ||
| libgdbm-compat-dev \ | ||
| liblzma-dev \ | ||
| libmpdec-dev \ |
There was a problem hiding this comment.
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-4 changelog, 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).
erlend-aasland
commented
May 6, 2024
Thanks for helping out, Zach! |
Co-authored-by: Zachary Ware <zachary.ware@gmail.com>
asottile
commented
May 11, 2024
fwiw this is going to be painful for ubuntu and debian which has removed the |
That seems to have been mentioned at #118539 (comment) already, but I'm not sure what the problem is. We didn't have Why can't Debian/Ubuntu just set --with-system-libmpdec=no or --without-system-libmpdec (whichever it is) if they can't package libmpdec quickly? |
erlend-aasland
commented
May 20, 2024
@thesamesam, @asottile: we're adding a fallback to the bundled version if an external libmpdec cannot be found. FTR, I find the recent removal of libmpdec from Ubuntu/Debian very strange. |
Mark _decimal as missing if libmpdecimal is not found.
libmpdecsources #115119📚 Documentation preview 📚: https://cpython-previews--118539.org.readthedocs.build/