-
-
Notifications
You must be signed in to change notification settings - Fork 34.5k
gh-90539: doc: Expand on what should not go into CFLAGS, LDFLAGS #92754
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
de8cdcb
Doc/using/configure.rst: Expand on what should not go into CFLAGS, LD…
mkoeppe f14fc19
📜🤖 Added by blurb_it.
blurb-it[bot] 7a678d8
Doc/using/configure.rst: Fix rst markup
mkoeppe 73f2c43
Doc/using/configure.rst: Fixup: LDFLAGS, not CFLAGS
mkoeppe 8220995
Doc/using/configure.rst: Break a long sentence
mkoeppe 04a9c4f
Doc/using/configure.rst: Break another long sentence
mkoeppe cc8b79f
Misc/NEWS.d/next/Documentation/2022-05-12-23-47-17.gh-issue-90539.nmR…
mkoeppe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Doc/using/configure.rst: Break another long sentence
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
- Loading branch information
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In pyenv/pyenv#2381, we found out that at least one
-Lflag fromLDFLAGSwas required when linking against Python to findlibintl. We even had to add it topython-config --ldflagsvia a hack sincepython-configignores compile-timeLDFLAGSfor some reason.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think we should add guidance here for downstream packagers that informs them of other, more suitable ways to set flags -- namely setting environment variables
CFLAGS,LDFLAGS,CPATH,LIBRARY_PATHat the runtime of Python?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how you expect downstream packagers to do that -- and why they need to do that in the first place since
distutilsandpython-configspecifically exist to take care of providing all the necessary flags to link against a specific Python installation.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aren't the
pyenvshims already setting environment variables? Specifically, they are settingPATH. https://trac.sagemath.org/ticket/29285#comment:20There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
conda and nix use activation scripts for their environments. homebrew provides
brew shfor this purpose.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we set the flags in an envvar, they would likely still override package-supplied flags (skimmed through distutils sources, it looks like that). If so, that won't help your original problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That may be true for
CFLAGS, but definitely not forCPATH. By the way, https://github.com/pypa/setuptools/blob/main/docs/userguide/ext_modules.rst now has some info (from my PR pypa/setuptools#3368); we can expand it to cover all necessary details to resolve this discussion.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now pypa/setuptools#3387