Repository navigation
Improve documentation of CFLAGS_NODIST, LDFLAGS_NODIST #90539
Description
Activity
matthiaskoeppe commented
on Jan 14, 2022 matthiaskoeppemannequinMannequinAuthorMore actionsThe documentation of
- https://docs.python.org/3.11/using/configure.html#envvar-CFLAGS
- https://docs.python.org/3.11/using/configure.html#envvar-CFLAGS_NODIST
- https://docs.python.org/3.11/using/configure.html#envvar-LDFLAGS
- https://docs.python.org/3.11/using/configure.html#envvar-LDFLAGS_NODIST
should explain more clearly that flags such as-I,-L, etc. and strict compiler flags such as-Werror...should not be put intoCFLAGS,LDFLAGS, or it will make the resulting Python unusable for compiling user packages with extension modules viadistutilsandsetuptools.
Various downstream packagers have provided misconfigured Pythons:
- Homebrew (https://trac.sagemath.org/ticket/31132, Python: Change Homebrew includes into NODIST flags Homebrew/homebrew-core#68528, resolved)
- Cygwin (https://trac.sagemath.org/ticket/33078, https://cygwin.com/pipermail/cygwin/2021-December/250302.html, resolved in a proposed package update)
- pyenv (https://trac.sagemath.org/ticket/32531, pythons built with pyenv's python-build leak CFLAGS/LDFLAGS into user packages via sysconfig pyenv/pyenv#2204, open)
So this appears to be a documentation / user education issue in CPython.
- added3.7 (EOL)end of lifeend of life3.8 (EOL)end of lifeend of life3.10 (EOL)end of lifeend of life3.11only security fixesonly security fixes3.9 (EOL)end of lifeend of life
on Jan 14, 2022 - addeddocsDocumentation in the Doc dirDocumentation in the Doc dirtype-featureA feature request or enhancementA feature request or enhancement3.7 (EOL)end of lifeend of life3.8 (EOL)end of lifeend of life3.10 (EOL)end of lifeend of life3.11only security fixesonly security fixes3.9 (EOL)end of lifeend of life
on Jan 14, 2022 11 remaining items
Various downstream packagers have provided misconfigured Pythons:
- Homebrew (https://trac.sagemath.org/ticket/31132, Python: Change Homebrew includes into NODIST flags Homebrew/homebrew-core#68528, resolved)
- Cygwin (https://trac.sagemath.org/ticket/33078, https://cygwin.com/pipermail/cygwin/2021-December/250302.html, resolved in a proposed package update)
- pyenv (https://trac.sagemath.org/ticket/32531, pythons built with pyenv's python-build leak CFLAGS/LDFLAGS into user packages via sysconfig pyenv/pyenv#2204, open)
Also:
@jaraco Is there setuptools/distutils documentation that we can refer to explain how sysconfig
CFLAGSandLDFLAGSare used?It appears not. Distutils docs have been migrated to setuptools docs. When I searched there, I got no results, so it appears to be undocumented. I'd appreciate contributions in this area, especially if you invest the time to discover the details based on the code.
Current documentation:
Current documentation:
Yes, this is what my PR #92754 extends.
@jaraco Is there setuptools/distutils documentation that we can refer to explain how sysconfig
CFLAGSandLDFLAGSare used?It appears not. Distutils docs have been migrated to setuptools docs. When I searched there, I got no results, so it appears to be undocumented. I'd appreciate contributions in this area, especially if you invest the time to discover the details based on the code.
I'll prepare a PR. Is it already possible to refer to the (sparse) docstrings such as those found in https://github.com/pypa/setuptools/blob/main/setuptools/_distutils/unixccompiler.py? (Is it formatted with sphinx somewhere?)
Yes, this is what my PR #90539 extends.
The link is this issue, not a PR. I'm confused.
@jaraco Is there setuptools/distutils documentation that we can refer to explain how sysconfig
CFLAGSandLDFLAGSare used?It appears not. Distutils docs have been migrated to setuptools docs. When I searched there, I got no results, so it appears to be undocumented. I'd appreciate contributions in this area, especially if you invest the time to discover the details based on the code.
That's now pypa/setuptools#3368
- added 3 commits that reference this issue
on Jun 20, 2022 - added a commit that references this issue
on Jun 26, 2022
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields: