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... no
checking for --with-decimal-contextvar... yes
checking for decimal libmpdec machine... universal
checking for stdlib extension module _decimal... yes$ ./configure | grep -E "(decimal|mpdec)"
checking for --with-system-libmpdec... yes
checking for libmpdec... yes
checking for --with-decimal-contextvar... yes
checking for stdlib extension module _decimal... yes
$ grep -E "_DECIMAL_(CFLAGS|LDFLAGS)=" Makefile
MODULE__DECIMAL_CFLAGS=-I/opt/homebrew/Cellar/mpdecimal/4.0.0/include
MODULE__DECIMAL_LDFLAGS=-L/opt/homebrew/Cellar/mpdecimal/4.0.0/lib -lmpdec -lm |
Sorry, something went wrong.
|
@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 |
Sorry, something went wrong.
|
Things to consider:
For now, we can consider to use the bundled version for the Ubuntu CI. |
Sorry, something went wrong.
Right, an explicit Footnotes
|
Sorry, something went wrong.
Yep
Yes, we need to warn for that case.
Hm, I think this case should fail, similar to how we handle |
Sorry, something went wrong.
I don't want a bare |
Sorry, something went wrong.
|
Ok, how about this:
|
Sorry, something went wrong.
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.
Sorry, something went wrong.
…l of the mpdecimal sources Co-authored-by: Zachary Ware <zachary.ware@gmail.com>
…rsion check in configure
|
Thanks for helping out, Zach! |
Sorry, something went wrong.
Co-authored-by: Zachary Ware <zachary.ware@gmail.com>
|
fwiw this is going to be painful for ubuntu and debian which has removed the |
Sorry, something went wrong.
|
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? |
Sorry, something went wrong.
|
@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. |
Sorry, something went wrong.
Mark _decimal as missing if libmpdecimal is not found.
libmpdecsources #115119📚 Documentation preview 📚: https://cpython-previews--118539.org.readthedocs.build/