GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Improve documentation of CFLAGS_NODIST, LDFLAGS_NODIST · Issue #90539 · python/cpython

Improve documentation of CFLAGS_NODIST, LDFLAGS_NODIST #90539

New issue
Copy link
New issue
Copy link
Closed
#92754
Closed
Improve documentation of CFLAGS_NODIST, LDFLAGS_NODIST#90539
#92754
Copy link
Labels
3.10 (EOL)end of lifeend of life3.11only security fixesonly security fixes3.9 (EOL)end of lifeend of lifedocsDocumentation in the Doc dirDocumentation in the Doc dirtype-featureA feature request or enhancementA feature request or enhancement

Description

matthiaskoeppe
mannequin
opened on Jan 14, 2022
Issue body actions
BPO 46381
Nosy @vstinner, @DiddiLeija

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:

assignee = None
closed_at = None
created_at = <Date 2022-01-14.18:38:16.475>
labels = ['3.11', 'type-feature', '3.9', '3.10', 'docs']
title = 'Improve documentation of CFLAGS_NODIST, LDFLAGS_NODIST'
updated_at = <Date 2022-01-17.15:21:27.848>
user = 'https://bugs.python.org/matthiaskoeppe'

bugs.python.org fields:

activity = <Date 2022-01-17.15:21:27.848>
actor = 'vstinner'
assignee = 'docs@python'
closed = False
closed_date = None
closer = None
components = ['Documentation']
creation = <Date 2022-01-14.18:38:16.475>
creator = 'matthiaskoeppe'
dependencies = []
files = []
hgrepos = []
issue_num = 46381
keywords = []
message_count = 2.0
messages = ['410586', '410799']
nosy_count = 4.0
nosy_names = ['vstinner', 'docs@python', 'DiddiLeija', 'matthiaskoeppe']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue46381'
versions = ['Python 3.9', 'Python 3.10', 'Python 3.11']

Activity

Next
  1. matthiaskoeppe commented on Jan 14, 2022

    @matthiaskoeppe
    matthiaskoeppemannequin
    on Jan 14, 2022
    MannequinAuthor
    More actions

    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, 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.

  2. matthiaskoeppe
    added
    3.7 (EOL)end of lifeend of life
    3.8 (EOL)end of lifeend of life
    3.10 (EOL)end of lifeend of life
    3.11only security fixesonly security fixes
    3.9 (EOL)end of lifeend of life
    on Jan 14, 2022
  3. matthiaskoeppe
    assigned
    docspython
    on Jan 14, 2022
  4. matthiaskoeppe
    added
    docsDocumentation in the Doc dirDocumentation in the Doc dir
    type-featureA feature request or enhancementA feature request or enhancement
    3.7 (EOL)end of lifeend of life
    3.8 (EOL)end of lifeend of life
    3.10 (EOL)end of lifeend of life
    3.11only security fixesonly security fixes
    3.9 (EOL)end of lifeend of life
    on Jan 14, 2022
  5. matthiaskoeppe
    assigned
    docspython
    on Jan 14, 2022
  6. 11 remaining items

  7. mkoeppe commented on May 12, 2022

    @mkoeppe
    mkoeppe
    on May 12, 2022
    Contributor
    More actions

    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:

    • conda (https://trac.sagemath.org/ticket/31539) @isuruf
  8. jaraco commented on Jun 12, 2022

    @jaraco
    jaraco
    on Jun 12, 2022
    Member
    More actions

    @jaraco Is there setuptools/distutils documentation that we can refer to explain how sysconfig CFLAGS and LDFLAGS are 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.

  9. vstinner commented on Jun 13, 2022

    @vstinner
    vstinner
    on Jun 13, 2022
    Member
    More actions

    Current documentation:

    • https://docs.python.org/dev/using/configure.html#envvar-CFLAGS_NODIST
    • https://docs.python.org/dev/using/configure.html#envvar-PY_CFLAGS_NODIST
    • https://docs.python.org/dev/using/configure.html#envvar-LDFLAGS_NODIST
    • https://docs.python.org/dev/using/configure.html#envvar-PY_LDFLAGS_NODIST
  10. mkoeppe commented on Jun 13, 2022

    @mkoeppe
    mkoeppe
    on Jun 13, 2022
    Contributor
    More actions

    Current documentation:

    • https://docs.python.org/dev/using/configure.html#envvar-CFLAGS_NODIST
    • https://docs.python.org/dev/using/configure.html#envvar-PY_CFLAGS_NODIST
    • https://docs.python.org/dev/using/configure.html#envvar-LDFLAGS_NODIST
    • https://docs.python.org/dev/using/configure.html#envvar-PY_LDFLAGS_NODIST

    Yes, this is what my PR #92754 extends.

  11. mkoeppe commented on Jun 13, 2022

    @mkoeppe
    mkoeppe
    on Jun 13, 2022
    Contributor
    More actions

    @jaraco Is there setuptools/distutils documentation that we can refer to explain how sysconfig CFLAGS and LDFLAGS are 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?)

  12. vstinner commented on Jun 13, 2022

    @vstinner
    vstinner
    on Jun 13, 2022
    Member
    More actions

    Yes, this is what my PR #90539 extends.

    The link is this issue, not a PR. I'm confused.

  13. mkoeppe commented on Jun 13, 2022

    @mkoeppe
    mkoeppe
    on Jun 13, 2022
    Contributor
    More actions

    Yes, this is what my PR #90539 extends.

    The link is this issue, not a PR. I'm confused.

    Sorry, edited. I meant #92754

  14. mkoeppe commented on Jun 13, 2022

    @mkoeppe
    mkoeppe
    on Jun 13, 2022
    Contributor
    More actions

    @jaraco Is there setuptools/distutils documentation that we can refer to explain how sysconfig CFLAGS and LDFLAGS are 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

  15. vstinner
    closed this as completedin #92754on Jun 20, 2022
  16. miss-islington
    added a commit that references this issue on Jun 20, 2022

    pythongh-90539: doc: Expand on what should not go into CFLAGS, LDFLAGS (

    066dae9
  17. vstinner
    added a commit that references this issue on Jun 20, 2022

    gh-90539: doc: Expand on what should not go into CFLAGS, LDFLAGS (#92754

    61f24e7
  18. miss-islington
    added 3 commits that reference this issue on Jun 20, 2022

    pythongh-90539: doc: Expand on what should not go into CFLAGS, LDFLAGS (

    1ec58ab

    gh-90539: doc: Expand on what should not go into CFLAGS, LDFLAGS (GH-…

    2454dbe

    gh-90539: doc: Expand on what should not go into CFLAGS, LDFLAGS (GH-…

    e6ad599
  19. serhiy-storchaka
    added a commit that references this issue on Jun 26, 2022

    Revert 30935 defer bpo45162 to 312 (#94285)

    1ffde3e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.10 (EOL)end of lifeend of life3.11only security fixesonly security fixes3.9 (EOL)end of lifeend of lifedocsDocumentation in the Doc dirDocumentation in the Doc dirtype-featureA feature request or enhancementA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.