Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

gh-115119: Detect _decimal dependencies using pkg-config #115406

Merged
merged 8 commits into from
Apr 29, 2024

Conversation

erlend-aasland
Copy link
Contributor

@erlend-aasland erlend-aasland commented Feb 13, 2024

Only libmpdec 4.0.0 supports pkg-config.

Only libmpdec 4.0.0 supports pkg-config.
@bedevere-app bedevere-app bot mentioned this pull request Feb 13, 2024
15 tasks
@erlend-aasland
Copy link
Contributor Author

erlend-aasland commented Feb 13, 2024

Tested on macOS with the following scenarios:

$ ./configure && make                         # Uses CPython vendored mpdecimal
$ ./configure --with-system-libmpdec && make  # pkg-config detects Homebrew installed libmpdec 4.0.0
$ LIBMPDEC_CFLAGS="-I$HOME/install" \
  LIBMPDEC_LIBS="-L$HOME/install -lm -lmpdec" \
  ./configure --with-system-libmpdec && make  # Build with custom libmpdec 2.5.1

For some reason the latter fails, but I suspect it is an issue with my setup.

@erlend-aasland
Copy link
Contributor Author

cc. @ned-deily

@erlend-aasland erlend-aasland marked this pull request as ready for review March 30, 2024 18:48
@erlend-aasland erlend-aasland requested a review from zware March 30, 2024 18:48
@rhettinger rhettinger removed their request for review March 30, 2024 19:21
Copy link
Member

@ned-deily ned-deily left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks! FWIW, I was able to successfully build and test with mpdecimal 2.5.1 as well as 4.0.0.

@erlend-aasland
Copy link
Contributor Author

Thanks, Ned! I had forgotten about this :)

@erlend-aasland erlend-aasland merged commit c7e7bfc into python:main Apr 29, 2024
36 checks passed
@erlend-aasland erlend-aasland deleted the ac/libmpdec branch April 29, 2024 06:58
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants