This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: during Python installation, setup.py should not use .pydistutils.cfg
Type: behavior Stage:
Components: Build, Installation Versions: Python 3.10, Python 3.9, Python 3.8
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: barry, eric.araujo, jah, loewis, ned.deily, r.david.murray, tarek
Priority: normal Keywords:

Created on 2008-12-14 01:31 by jah, last changed 2022-04-11 14:56 by admin.

Messages (4)
msg77771 - (view) Author: Jake (jah) Date: 2008-12-14 01:31
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
msg108717 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2010-06-26 12:22
Could an installation guru please take a look at this?
msg121408 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-11-18 01:46
Not reading .pydistutils.cfg during CPython’s build seems a good idea to me.  I would like confirming opinions.
msg182483 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2013-02-20 08:55
rdm notes in duplicate Issue6138:

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.
History
Date User Action Args
2022-04-11 14:56:42adminsetgithub: 48905
2020-11-10 20:55:09iritkatrielsetversions: + Python 3.8, Python 3.9, Python 3.10, - Python 2.7, Python 3.2, Python 3.3, Python 3.4
2013-02-20 08:55:51ned.deilysetnosy: + r.david.murray, ned.deily, - BreamoreBoy

messages: + msg182483
versions: + Python 3.3, Python 3.4, - Python 3.1
2013-02-20 08:53:50ned.deilylinkissue6138 superseder
2013-02-20 08:50:44ned.deilylinkissue17235 superseder
2010-11-18 01:46:32eric.araujosetversions: + Python 3.1, Python 2.7, Python 3.2, - Python 2.6
nosy: + barry, eric.araujo, loewis

messages: + msg121408

components: + Build
2010-06-26 12:27:50l0nwlfsetnosy: + tarek
2010-06-26 12:22:41BreamoreBoysetnosy: + BreamoreBoy
messages: + msg108717
2008-12-14 01:37:40jahsettitle: setup.py should not use .pydistutils.cfg -> during Python installation, setup.py should not use .pydistutils.cfg
2008-12-14 01:31:04jahcreate