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: Distutils should create install dir if needed
Type: enhancement Stage:
Components: Distutils Versions: Python 2.5
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: andybuckley, exarkun, tarek
Priority: normal Keywords:

Created on 2009-01-26 16:01 by andybuckley, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (5)
msg80573 - (view) Author: Andy Buckley (andybuckley) Date: 2009-01-26 16:01
If you attempt to call "python setup.py install --prefix=/foo", and
/foo/lib/pythonX.Y/site-packages does not exist, the installation will
fail, requiring that the directory be made by hand.

Since there is no easy way to know in advance (other than by running
Python to build the version number string) exactly where the install
will go, this can be troublesome for automated build scripts. For this
reason, and also to be more consistent with existing build/install
systems like autotools, I suggest that distutils builds the necessary
portions of the lib directory tree (provided /foo exists). This should
certainly happen (IMHO) if the --force option is given.
msg80574 - (view) Author: Jean-Paul Calderone (exarkun) * (Python committer) Date: 2009-01-26 16:03
This isn't accurate.  distutils *will* create the directory if it does
not exist.  Perhaps you have setuptools installed?  setuptools disables
this behavior of distutils and forces you to create the directory manually.
msg80582 - (view) Author: Andy Buckley (andybuckley) Date: 2009-01-26 17:44
Thanks for the rapid feedback: yes, I am using setuptools and didn't
realise it would be responsible for this override. Is setuptools
feedback done completely independently from this tracker?
msg80584 - (view) Author: Jean-Paul Calderone (exarkun) * (Python committer) Date: 2009-01-26 18:05
Yea.  setuptools is often discussed on distutils-sig:

  http://www.python.org/community/sigs/current/distutils-sig/

And has an issue tracker of its own:

  http://bugs.python.org/setuptools/

http://bugs.python.org/setuptools/issue54 sounds like this issue.
msg80966 - (view) Author: Tarek Ziadé (tarek) * (Python committer) Date: 2009-02-02 17:34
closing the issue since it's on setuptools side
History
Date User Action Args
2022-04-11 14:56:44adminsetgithub: 49320
2009-02-02 17:34:03tareksetstatus: open -> closed
messages: + msg80966
2009-01-26 18:05:50exarkunsetmessages: + msg80584
2009-01-26 17:44:46andybuckleysetmessages: + msg80582
2009-01-26 17:27:04tareksetnosy: + tarek
2009-01-26 16:03:37exarkunsetnosy: + exarkun
messages: + msg80574
2009-01-26 16:01:06andybuckleycreate