Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jah mannequin opened this issue Dec 14, 2008 · 5 comments
Closed

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

jah mannequin opened this issue Dec 14, 2008 · 5 comments
Labels
3.8 only security fixes 3.9 only security fixes 3.10 only security fixes build The build process and cross-build topic-installation type-bug An unexpected behavior, bug, or error

Comments

@jah
Copy link
Mannequin

jah mannequin commented Dec 14, 2008

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']

@jah
Copy link
Mannequin Author

jah mannequin commented Dec 14, 2008

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

@jah jah mannequin added topic-installation type-bug An unexpected behavior, bug, or error labels Dec 14, 2008
@jah jah mannequin changed the title setup.py should not use .pydistutils.cfg during Python installation, setup.py should not use .pydistutils.cfg Dec 14, 2008
@BreamoreBoy
Copy link
Mannequin

BreamoreBoy mannequin commented Jun 26, 2010

Could an installation guru please take a look at this?

@merwok
Copy link
Member

merwok commented Nov 18, 2010

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

@merwok merwok added the build The build process and cross-build label Nov 18, 2010
@ned-deily
Copy link
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.

@iritkatriel iritkatriel added 3.8 only security fixes 3.9 only security fixes 3.10 only security fixes labels Nov 10, 2020
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
@iritkatriel
Copy link
Member

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

@iritkatriel iritkatriel closed this as not planned Won't fix, can't repro, duplicate, stale Oct 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.8 only security fixes 3.9 only security fixes 3.10 only security fixes build The build process and cross-build topic-installation type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

3 participants