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
标题: Can't install a project in a specific directory
类型: Stage: resolved
Components: Distutils2 Versions: Python 3.3, 3rd party
process
状态: closed Resolution: out of date
Dependencies: 后续:
分配给: eric.araujo 抄送列表: alexis, eric.araujo, mlhamel, python-dev, tarek, vinay.sajip
优先级: normal 关键字: patch

Created on 2012-03-12 22:18 by mlhamel, last changed 2022-04-11 14:57 by admin. This issue is now closed.

文件
文件名 上传时间 Description 编辑
distutils2.14270.patch eric.araujo, 2012-03-14 15:38
Messages (6)
msg155498 - (view) Author: Mathieu Leduc-Hamel (mlhamel) 日期: 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) 日期: 2012-03-13 00:03
Mathieu is working on a patch.
msg155758 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) 日期: 2012-03-14 15:38
Mathieu’s patch attached.  Test upcoming.
msg160799 - (view) Author: Roundup Robot (python-dev) (Python triager) 日期: 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) 日期: 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) 日期: 2014-03-12 08:24
pysetup was replaced by pip as official installer.  This issue may affect distlib.
历史
日期 用户 动作 参数
2022-04-11 14:57:27admin修改github: 58478
2014-03-12 08:24:10eric.araujo修改状态: open -> closed

抄送: + vinay.sajip
消息: + msg213218

resolution: out of date
stage: test needed -> resolved
2012-05-16 18:13:31eric.araujo修改消息: + msg160904
2012-05-16 18:04:51eric.araujo链接issue5342 dependencies
2012-05-16 05:07:27python-dev修改抄送: + python-dev
消息: + msg160799
2012-03-14 15:38:17eric.araujo修改文件: + distutils2.14270.patch
keywords: + patch
消息: + msg155758
2012-03-13 00:03:03eric.araujo修改标题: Can't install a package in a specific directory -> Can't install a project in a specific directory
stage: test needed
消息: + msg155528
versions: + 3rd party, - Python 3.1, Python 2.7, Python 3.2
2012-03-12 22:18:25mlhamel创建