Skip to content

Need setup.py to pick up -isystem flags from CPPFLAGS #81944

Description

@jherland
mannequin
BPO 37763
Nosy @moreati, @jherland
PRs
  • bpo-37763: Teach setup.py to pick up "-isystem <dir>" from $CPPFLAGS #15136
  • 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 2019-08-05.15:10:05.216>
    labels = ['type-feature', '3.8', '3.9', 'build']
    title = 'Need setup.py to pick up -isystem flags from CPPFLAGS'
    updated_at = <Date 2019-08-05.15:15:28.475>
    user = 'https://github.com/jherland'

    bugs.python.org fields:

    activity = <Date 2019-08-05.15:15:28.475>
    actor = 'jherland'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Cross-Build']
    creation = <Date 2019-08-05.15:10:05.216>
    creator = 'jherland'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 37763
    keywords = ['patch']
    message_count = 1.0
    messages = ['349054']
    nosy_count = 2.0
    nosy_names = ['Alex.Willmer', 'jherland']
    pr_nums = ['15136']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue37763'
    versions = ['Python 3.8', 'Python 3.9']

    Activity

    1. jherland commented on Aug 5, 2019

      jherlandmannequin
      MannequinAuthor

      First time contributor here, still learning the ropes.

      We're cross-compiling python in an environment where we set up CPPFLAGS, LDFLAGS, etc. to point directly to the locations where we have built Python's dependencies. For example, we will typically build Python in an environment that includes:

      CPPFLAGS=\
      -isystem /path/to/ncurses/build/include \
      -isystem /path/to/libffi/build/include \
      -isystem /path/to/zlib/build/include \
      -isystem /path/to/openssl/build/include \
      -isystem /path/to/readline/build/include

      LDFLAGS=\
      -L/path/to/ncurses/build/lib \
      -L/path/to/libffi/build/lib \
      -L/path/to/zlib/build/lib \
      -L/path/to/openssl/build/lib \
      -L/path/to/ciscossl-fom/build/lib \
      -L/path/to/readline/build/lib

      setup.py already picks up our -L options from LDFLAGS and propagates them into the build commands, but the -isystem options from CPPFLAGS are currently ignored.

      I will post a PR that teaches setup.py to handle -isystem options in CPPFLAGS the same way it currently handles -I options.

    2. added
      buildThe build process and cross-build
      type-featureA feature request or enhancement
      on Aug 5, 2019
    3. transferred this issue fromon Apr 10, 2022
    4. serhiy-storchaka commented on Dec 26, 2023

      @serhiy-storchaka
      Member

      setup.py no longer used to build CPython since 3.12 (see #94474).

    5. added
      pendingThe issue will be closed if no feedback is provided
      on Dec 27, 2023
    6. removed
      pendingThe issue will be closed if no feedback is provided
      on Jan 7, 2024
    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.8 (EOL)end of life3.9 (EOL)end of lifebuildThe build process and cross-buildtype-featureA feature request or enhancement

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions