integrated Pachi corrections
This commit is contained in:
parent
fcd6a35448
commit
2ca1554aef
58
pep-0376.txt
58
pep-0376.txt
|
@ -14,12 +14,20 @@ Post-History:
|
|||
Abstract
|
||||
========
|
||||
|
||||
This PEP proposes various enhancements for Distutils:
|
||||
The overall goal of this PEP is providing an standard infrastructure to manage
|
||||
project distributions. This should allow third party tools to do installation,
|
||||
uninstallation and distribution management in a distutils compatible fashion
|
||||
and share information between them.
|
||||
|
||||
- A new format for the .egg-info structure.
|
||||
- Some APIs to read the meta-data of a distribution.
|
||||
- A replacement PEP 262.
|
||||
- An uninstall feature.
|
||||
It also provides a sample uninstall feature using this infrastructure.
|
||||
|
||||
For it, the PEP proposes various enhancements for Distutils:
|
||||
|
||||
- A new format to install projects, as an .egg-info structure.
|
||||
- New APIs to read a project meta-data
|
||||
- Replace PEP 262, adding capabilities to record and query information about
|
||||
installed packages.
|
||||
- A reference uninstall feature
|
||||
|
||||
Definitions
|
||||
===========
|
||||
|
@ -42,10 +50,11 @@ See the Distutils [#distutils]_ documentation for more information.
|
|||
|
||||
Once installed, the elements are located in various places in the system, like:
|
||||
|
||||
- In Python's site-packages (Python modules, Python modules organized into
|
||||
- Python's site-packages (Python modules, Python modules organized into
|
||||
packages, Extensions, etc.)
|
||||
- In Python's `include` directory.
|
||||
- In Python's `bin` or `Script` directory.
|
||||
- Python's `include` directory.
|
||||
- Python's `bin` or `Script` directory.
|
||||
- Custom paths.
|
||||
- Etc.
|
||||
|
||||
Rationale
|
||||
|
@ -54,23 +63,23 @@ Rationale
|
|||
There are two problems right now in the way distributions are installed in
|
||||
Python:
|
||||
|
||||
- There are too many ways to do it.
|
||||
- There are too many ways to do it and this makes interoperation difficult.
|
||||
- There is no API to get the metadata of installed distributions.
|
||||
|
||||
How distributions are installed
|
||||
-------------------------------
|
||||
|
||||
Right now, when a distribution is installed in Python, the elements it
|
||||
Right now, when a distribution is installed in Python, every element it
|
||||
contains are installed in various directories.
|
||||
|
||||
The pure Python code, for instance, is installed in the `purelib` directory
|
||||
which is located in the Python installation at ``lib/python2.6/site-packages``
|
||||
for example under Unix-like systems or Mac OS X, and in ``Lib\site-packages``
|
||||
under Windows. This is done with the Distutils `install` command, which calls
|
||||
various subcommands.
|
||||
For instance, `Distutils` installs the pure Python code in the `purelib`
|
||||
directory, which is `lib\python2.6\site-packages` for unix-like systems and
|
||||
Mac OS X, or `Lib/site-packages` under Python's installation directory for
|
||||
Windows.
|
||||
|
||||
The `install_egg_info` subcommand is called during this process in order to
|
||||
create an `.egg-info` file in the `purelib` directory.
|
||||
Additionally, the `install_egg_info` subcommand of the Distutils `install`
|
||||
command adds an `.egg-info` file for the project into the `purelib`
|
||||
directory.
|
||||
|
||||
For example, for the `docutils` distribution, which contains one package an
|
||||
extra module and executable scripts, three elements are installed in
|
||||
|
@ -311,7 +320,7 @@ that installs a `config.ini` file in `/etc/myapp` will be added like this::
|
|||
/etc/myapp/config.ini,b690274f621402dda63bf11ba5373bf2,9544
|
||||
|
||||
For a windows platform, the drive letter is added for the absolute paths,
|
||||
so a file that is copied in `c:\MyApp\` will be::
|
||||
so a file that is copied in c:\MyApp\ will be::
|
||||
|
||||
c:\etc\myapp\config.ini,b690274f621402dda63bf11ba5373bf2,9544
|
||||
|
||||
|
@ -382,8 +391,8 @@ The new functions added in the ``pkgutil`` are :
|
|||
``.egg-info`` directory that contains a PKG-INFO that matches `name`
|
||||
for the `name` metadata.
|
||||
|
||||
Notice that there should be at most one result. The first result founded
|
||||
is returned. If the directory is not found, returns None.
|
||||
This function only returns the first result founded, as no more than one
|
||||
values are expected. If the directory is not found, returns None.
|
||||
|
||||
- ``get_file_users(path)`` -> iterator of ``Distribution`` instances.
|
||||
|
||||
|
@ -445,9 +454,9 @@ And following methods:
|
|||
|
||||
- ``get_egginfo_files(local=False)`` -> iterator of paths
|
||||
|
||||
Iterates over the `RECORD` entries and return paths for each line if the path
|
||||
is pointing a file located in the `.egg-info` directory or one of its
|
||||
subdirectory.
|
||||
Iterates over the `RECORD` entries and returns paths for each line if the path
|
||||
is pointing to a file located in the `.egg-info` directory or one of its
|
||||
subdirectories.
|
||||
|
||||
If ``local`` is ``True``, each path is transformed into a
|
||||
local absolute path. Otherwise the raw value from `RECORD` is returned.
|
||||
|
@ -659,7 +668,8 @@ References
|
|||
Acknowledgements
|
||||
================
|
||||
|
||||
Jim Fulton, Ian Bicking, Phillip Eby, and many people at Pycon and Distutils-SIG.
|
||||
Jim Fulton, Ian Bicking, Phillip Eby, Rafael Villar Burke, and many people at
|
||||
Pycon and Distutils-SIG.
|
||||
|
||||
Copyright
|
||||
=========
|
||||
|
|
Loading…
Reference in New Issue