Skip to content

CPython setup.py problems #62455

Closed
Closed

Description

@ronaldoussoren
BPO 18255
Nosy @ronaldoussoren, @jkloth, @merwok, @iritkatriel
Files
  • setup-update.txt
  • setup-update-v2.txt
  • 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 = <Date 2021-08-03.11:36:57.109>
    created_at = <Date 2013-06-18.13:13:06.424>
    labels = ['type-bug', 'build']
    title = 'CPython setup.py problems'
    updated_at = <Date 2021-08-03.11:36:57.109>
    user = 'https://github.com/ronaldoussoren'

    bugs.python.org fields:

    activity = <Date 2021-08-03.11:36:57.109>
    actor = 'ronaldoussoren'
    assignee = 'none'
    closed = True
    closed_date = <Date 2021-08-03.11:36:57.109>
    closer = 'ronaldoussoren'
    components = ['Build']
    creation = <Date 2013-06-18.13:13:06.424>
    creator = 'ronaldoussoren'
    dependencies = []
    files = ['30640', '30642']
    hgrepos = []
    issue_num = 18255
    keywords = []
    message_count = 7.0
    messages = ['191406', '191414', '191427', '191445', '217883', '398807', '398821']
    nosy_count = 5.0
    nosy_names = ['ronaldoussoren', 'jkloth', 'eric.araujo', 'Arfrever', 'iritkatriel']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue18255'
    versions = ['Python 2.7', 'Python 3.3', 'Python 3.4']

    Activity

    1. ronaldoussoren commented on Jun 18, 2013

      @ronaldoussoren
      ContributorAuthor

      While working on a fix for bpo-18211 I noticed two problems with the setup.py that's used to build the stdlib extensions.

      1. setup.py uses sysconfig instead of distutils.sysconfig. The sematics of the two modules a slighty different.

      2. The block of code starting with the this text is not necessary because distutils.sysconfig (which is used by the build_ext command) already does the right thing for environment variables:

         # When you run "make CC=altcc" or something similar, you really want
         # those environment variables passed into the setup.py phase.  Here's
         # a small set of useful ones.
        
    2. added
      buildThe build process and cross-build
      type-bugAn unexpected behavior, bug, or error
      on Jun 18, 2013
    3. ronaldoussoren commented on Jun 18, 2013

      @ronaldoussoren
      ContributorAuthor

      So much for obviously correct changes...

      1. fix typo in import statement (from sysconfig import import ...)

      2. setup.py uses sysconfig.get_path and that's not present in distutils.sysconfig.

      (Sigh..., why are there two modules with almost but not entirely equal functionality and APIs?)

    4. Arfrever commented on Jun 18, 2013

      Arfrevermannequin
      Mannequin

      distutils.sysconfig module is theoretically deprecated in favor of sysconfig module. It is better to fix sysconfig module than to switch back to distutils.sysconfig module.

    5. ronaldoussoren commented on Jun 19, 2013

      @ronaldoussoren
      ContributorAuthor

      I don't agree. Distutils still uses distutils.sysconfig for configuration information and setup.py wants to adjust that configuration, it should therefore use distutils.sysconfig instead of the global one.

      That said, it would be better to change distutils to use sysconfig instead of its local configuration information (distutils.sysconfig, distutils.command.install.INSTALL_SCHEMES, ...). That has never been because distutils is frozen due to backward compatibility concerns, but it might be better to actually change distutils for 3.4 when there will be other changes to deal with the new packaging PEPs as well).

      However: switching distutils to use the toplevel sysconfig will change functionality, as I wrote in my initial message you can use environment variables to override variables for distutils.sysconfig, but that doesn't work for the global sysconfig because the values in _sysconfigdata are expanded at build time.

    6. merwok commented on May 4, 2014

      @merwok
      Member

      Note that the distutils feature freeze has been lifted, so in 3.5 sysconfig could be reused by distutils.sysconfig, but the existing functionality (different API + ability to override with env vars) must be preserved.

    7. iritkatriel commented on Aug 2, 2021

      @iritkatriel
      Member

      Is this still relevant now that distutils is deprecated?

    8. ronaldoussoren commented on Aug 3, 2021

      @ronaldoussoren
      ContributorAuthor

      This is no longer relevant now that distutils is deprecated.

    9. transferred this issue fromon Apr 10, 2022
    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

      buildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or error

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions