classification
Title: Can't install a project in a specific directory
Type: Stage: resolved
Components: Distutils2 Versions: Python 3.3, 3rd party
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: eric.araujo Nosy List: alexis, eric.araujo, mlhamel, python-dev, tarek, vinay.sajip
Priority: normal Keywords: patch

Created on 2012-03-12 22:18 by mlhamel, last changed 2014-03-12 08:24 by eric.araujo. This issue is now closed.

Files
File name Uploaded Description Edit
distutils2.14270.patch eric.araujo, 2012-03-14 15:38
Messages (6)
msg155498 - (view) Author: Mathieu Leduc-Hamel (mlhamel) Date: 2012-03-12 22:18
When using distutils2.install.install_from_infos to install a package, no matter if you have an install_path parameter or not, it doesn't work.

The problem seems to resided at:

distutils2.install._run_install_from_archive

Doesn't have any dest_dir parameter
msg155528 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012-03-13 00:03
Mathieu is working on a patch.
msg155758 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012-03-14 15:38
Mathieu’s patch attached.  Test upcoming.
msg160799 - (view) Author: Roundup Robot (python-dev) Date: 2012-05-16 05:07
New changeset fd5d379c36f4 by Mathieu Leduc-Hamel in branch 'default':
#14270: Fixes to add dest_dir params working when using install_from_infos
http://hg.python.org/distutils2/rev/fd5d379c36f4
msg160904 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012-05-16 18:13
Further changes are needed.

- The new dest_dir argument is not passed down to the internal functions, so I don’t understand how this is supposed to work.

- install_local_project needs a dest_dir argument too; Jonathan Fernandes started work on this at the last sprint.

- The test needs to be improved to really install a module and a script for example; I started to do that and also removed the usage of dist.Distribution (which is not the kind of distribution the install module works with: it uses database.Distribution and pypi.Dist (forgot the exact name) objects — yes, this is confusing as hell) but then the test code did not install anything; I ran out of time.  I think tests should avoid using dist.Distribution and MagicMock but stay as close to possible as real usage:
 - to test installing from a directory, create a temp dir with a setup.cfg file, a module and a script and call install_local_project (and other public functions that support a dir) with this dir as argument
 - to test installing from an archive, create files, archive them and call the public install function with the path to that file as argument
 - to test install_from_infos, call install_from_infos with a pypi.Something object pointing to an archive in a temp dir

That way, we could have confidence that all of this works, without explicitly using the internal functions in our tests.
msg213218 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2014-03-12 08:24
pysetup was replaced by pip as official installer.  This issue may affect distlib.
History
Date User Action Args
2014-03-12 08:24:10eric.araujosetstatus: open -> closed

nosy: + vinay.sajip
messages: + msg213218

resolution: out of date
stage: test needed -> resolved
2012-05-16 18:13:31eric.araujosetmessages: + msg160904
2012-05-16 18:04:51eric.araujolinkissue5342 dependencies
2012-05-16 05:07:27python-devsetnosy: + python-dev
messages: + msg160799
2012-03-14 15:38:17eric.araujosetfiles: + distutils2.14270.patch
keywords: + patch
messages: + msg155758
2012-03-13 00:03:03eric.araujosettitle: Can't install a package in a specific directory -> Can't install a project in a specific directory
stage: test needed
messages: + msg155528
versions: + 3rd party, - Python 3.1, Python 2.7, Python 3.2
2012-03-12 22:18:25mlhamelcreate