Skip to content

during Python installation, setup.py should not use .pydistutils.cfg #48905

Closed as not planned

Description

@jah
mannequin
BPO 4655
Nosy @loewis, @warsaw, @tarekziade, @ned-deily, @merwok, @bitdancer

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 2008-12-14.01:31:04.213>
labels = ['type-bug', 'expert-installation', '3.9', '3.10', '3.8', 'build']
title = 'during Python installation, setup.py should not use .pydistutils.cfg'
updated_at = <Date 2020-11-10.20:55:09.111>
user = 'https://bugs.python.org/jah'

bugs.python.org fields:

activity = <Date 2020-11-10.20:55:09.111>
actor = 'iritkatriel'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Build', 'Installation']
creation = <Date 2008-12-14.01:31:04.213>
creator = 'jah'
dependencies = []
files = []
hgrepos = []
issue_num = 4655
keywords = []
message_count = 4.0
messages = ['77771', '108717', '121408', '182483']
nosy_count = 7.0
nosy_names = ['loewis', 'barry', 'tarek', 'ned.deily', 'eric.araujo', 'r.david.murray', 'jah']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue4655'
versions = ['Python 3.8', 'Python 3.9', 'Python 3.10']

Activity

  1. jah commented on Dec 14, 2008

    jahmannequin
    MannequinAuthor

    When installing python 2.6, I used:
    ./configure --prefix=/home/name/usr

    Installation was fine and everything was installed to:
    ~/usr/lib/python2.6

    But the .so files were installed to:
    ~/usr/lib/python

    As ~/usr/lib/python was (no longer) declared in my PYTHONPATH, I ran
    into import issues. The problem was due to a forgotten file:
    ~/.pydistutils.cfg

    So this is clearly a user error, but I wonder if it is something which
    should be avoided at the setup.py level.

    When installing python, the installation locations are derived from the
    results of ./configure. When setup.py is eventually called, the
    installation locations can change. This seems undesirable. Would it be
    better if setup.py instructed distutils to ignore any configuration file
    so that the installation directories matched what was used by the rest
    of 'make install'?

    Related: http://bugs.python.org/issue1180

  2. changed the title [-]setup.py should not use .pydistutils.cfg[/-] [+]during Python installation, setup.py should not use .pydistutils.cfg[/+] on Dec 14, 2008
  3. BreamoreBoy commented on Jun 26, 2010

    BreamoreBoymannequin
    Mannequin

    Could an installation guru please take a look at this?

  4. merwok commented on Nov 18, 2010

    @merwok
    Member

    Not reading .pydistutils.cfg during CPython’s build seems a good idea to me. I would like confirming opinions.

  5. added
    buildThe build process and cross-build
    on Nov 18, 2010
  6. ned-deily commented on Feb 20, 2013

    @ned-deily
    Member

    rdm notes in duplicate bpo-6138:

    There is a bug here, of some sort. Either the .pydistutils.cfg file's
    install clause should override the default --prefix somehow, or the
    error message should indicate where the setting for 'home' and
    '--prefix' came from to enable the user to debug the configuration. In
    the latter case there would also need to be a way to explicitly tell
    either make install or configure to ignore .pydistutils.cfg. In the
    former case, an explicit --prefix passed to configure would need to
    override .pydistutils.cfg.

  7. transferred this issue fromon Apr 10, 2022
  8. iritkatriel commented on Oct 4, 2022

    @iritkatriel
    Member

    This is no longer relevant for 3.12 and probably not worth working about for older versions after all these years.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions