This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Improve documentation of CFLAGS_NODIST, LDFLAGS_NODIST
Type: enhancement Stage:
Components: Documentation Versions: Python 3.11, Python 3.10, Python 3.9
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: DiddiLeija, docs@python, matthiaskoeppe, vstinner
Priority: normal Keywords:

Created on 2022-01-14 18:38 by matthiaskoeppe, last changed 2022-04-11 14:59 by admin.

Messages (2)
msg410586 - (view) Author: Matthias Köppe (matthiaskoeppe) Date: 2022-01-14 18:38
The 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 into `CFLAGS`, `LDFLAGS`, or it will make the resulting Python unusable for compiling user packages with extension modules via `distutils` and `setuptools`.

Various downstream packagers have provided misconfigured Pythons:
- Homebrew (https://trac.sagemath.org/ticket/31132, https://github.com/Homebrew/homebrew-core/pull/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, https://github.com/pyenv/pyenv/issues/2204, open)

So this appears to be a documentation / user education issue in CPython.
msg410799 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2022-01-17 15:21
Do you want to propose a PR?
History
Date User Action Args
2022-04-11 14:59:54adminsetgithub: 90539
2022-01-17 15:21:27vstinnersetnosy: + vstinner
messages: + msg410799
2022-01-16 22:35:14DiddiLeijasetnosy: + DiddiLeija
2022-01-14 18:43:28iritkatrielsetversions: - Python 3.7, Python 3.8
2022-01-14 18:38:16matthiaskoeppecreate