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.
Created on 2012年05月29日 10:47 by alexis, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| install.py | alexis, 2012年06月05日 14:14 | The new install.py file. | ||
| Messages (4) | |||
|---|---|---|---|
| msg161868 - (view) | Author: Alexis Metaireau (alexis) * (Python triager) | Date: 2012年05月29日 10:47 | |
The "packaging.install" module doesn't have a clear API defined and it's doing a lot of indirections between all the functions to get metadata, fetch the dependencies and install what's need to be installed. We might be able to come with a better solution for the API we expose there, and to allow easier maintenance. I'll go ahead this week and propose a change to this module which hopefully will make things clearer. |
|||
| msg162042 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2012年06月01日 02:51 | |
To summarize the high-level API needed: install from an index (argument is a version requirement as string), install archive file, install from directory (containing setup.cfg or setup.py). When #8668 is implemented, an "editable" option will be nice too. (Need to check pip doc and use cases to see if only the install from directory should get it.) For the implementation, as discussed on IRC we want to go with classes to represent the various kinds of installable things (requirement, path to a file, path to a dir) and one or more high-level functions to wrap them for common cases (see Nick’s good article http://www.boredomandlaziness.org/2012/05/djangos-cbvs-are-not-mistake-but.html ). I would prefer having two functions, one that takes a version req and another one that takes a path; it’s easy to distinguish between file (archive) and directory but I don’t like guessing between name and path (see the not-cool code in pysetup actions). |
|||
| msg162043 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2012年06月01日 02:52 | |
BTW I suggest you work off a d2 checkout; I have not ported all changes from Montreal sprints to cpython/p7g at the moment. |
|||
| msg162346 - (view) | Author: Alexis Metaireau (alexis) * (Python triager) | Date: 2012年06月05日 14:14 | |
Attaching a work in progress file which intend to replace the current install.py file. The implementation isn't finished yet but the overall design is here. It comes with four classes: - Installer which manages the overall installation procedure. It shares a distribution cache with the dependency handler so distributions are not downloaded / extracted multiple times. The installer is able to install / remove single distributions OR distributions with their dependency tree. - DependencyHandler which takes care about getting the dependencies from either the metadata stored in the indexes or inside the distirbutions. - The DistributionCache class is just a store containing the location of the distributions that had been extracted/downloaded. It provides methods to ease the work with them (so any external user don't need to care about the state of the distribution when requesting it). - DirectoryMover provides a way to deal with moving/deleting operations with a commit/rollback API. The goal is to simplify a lot the current API and to provide a reusable tool for other installers. why not putting this in shutil at some point. This file is provided here mostly for feedback, but the work is not finished yet. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:30 | admin | set | github: 59155 |
| 2014年03月13日 04:40:58 | eric.araujo | set | status: open -> closed resolution: out of date stage: resolved |
| 2012年06月05日 14:14:14 | alexis | set | files:
+ install.py messages: + msg162346 |
| 2012年06月01日 02:52:48 | eric.araujo | set | messages:
+ msg162043 title: packaging.install does not have a clear API. -> Make packaging.install API less confusing and more extensible |
| 2012年06月01日 02:51:27 | eric.araujo | set | nosy:
+ eric.araujo messages: + msg162042 versions: + 3rd party |
| 2012年05月29日 10:47:26 | alexis | create | |