minor fixes
This commit is contained in:
parent
5677f923a6
commit
1dfaf5580f
23
pep-0376.txt
23
pep-0376.txt
|
@ -486,15 +486,15 @@ Distutils already provides a very basic way to install a distribution, which
|
||||||
is running the `install` command over the `setup.py` script of the
|
is running the `install` command over the `setup.py` script of the
|
||||||
distribution.
|
distribution.
|
||||||
|
|
||||||
Distutils will provide a very basic ``uninstall`` function, that is added
|
Distutils2 [#pep262]_ will provide a very basic ``uninstall`` function, that
|
||||||
in ``distutils.util`` and takes the name of the distribution to uninstall
|
is added in ``distutils2.util`` and takes the name of the distribution to
|
||||||
as its argument. ``uninstall`` uses the APIs described earlier and remove all
|
uninstall as its argument. ``uninstall`` uses the APIs described earlier and
|
||||||
unique files, as long as their hash didn't change. Then it removes empty
|
remove all unique files, as long as their hash didn't change. Then it removes
|
||||||
directories left behind.
|
empty directories left behind.
|
||||||
|
|
||||||
``uninstall`` returns a list of uninstalled files::
|
``uninstall`` returns a list of uninstalled files::
|
||||||
|
|
||||||
>>> from distutils.util import uninstall
|
>>> from distutils2.util import uninstall
|
||||||
>>> uninstall('docutils')
|
>>> uninstall('docutils')
|
||||||
['/opt/local/lib/python2.6/site-packages/docutils/core.py',
|
['/opt/local/lib/python2.6/site-packages/docutils/core.py',
|
||||||
...
|
...
|
||||||
|
@ -535,7 +535,7 @@ file in the `.dist-info` directory with the name of the installer.
|
||||||
|
|
||||||
To avoid removing distributions that were installed by another packaging
|
To avoid removing distributions that were installed by another packaging
|
||||||
system, the ``uninstall`` function takes an extra argument ``installer`` which
|
system, the ``uninstall`` function takes an extra argument ``installer`` which
|
||||||
defaults to ``distutils``.
|
defaults to ``distutils2``.
|
||||||
|
|
||||||
When called, ``uninstall`` controls that the ``INSTALLER`` file matches
|
When called, ``uninstall`` controls that the ``INSTALLER`` file matches
|
||||||
this argument. If not, it raises a ``DistutilsUninstallError``::
|
this argument. If not, it raises a ``DistutilsUninstallError``::
|
||||||
|
@ -556,9 +556,9 @@ it has to undo at uninstallation time.
|
||||||
Adding an Uninstall script
|
Adding an Uninstall script
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
An `uninstall` script is added in Distutils. and is used like this::
|
An `uninstall` script is added in Distutils2. and is used like this::
|
||||||
|
|
||||||
$ python -m distutils.uninstall projectname
|
$ python -m distutils2.uninstall projectname
|
||||||
|
|
||||||
Notice that script doesn't control if the removal of a distribution breaks
|
Notice that script doesn't control if the removal of a distribution breaks
|
||||||
another distribution. Although it makes sure that all the files it removes
|
another distribution. Although it makes sure that all the files it removes
|
||||||
|
@ -578,7 +578,7 @@ will be implemented in:
|
||||||
- distutils2
|
- distutils2
|
||||||
|
|
||||||
The plan is to include the functionality outlined in this PEP in pkgutil for
|
The plan is to include the functionality outlined in this PEP in pkgutil for
|
||||||
Python 2.7 and Python 3.2, and in Distutils2.
|
Python 3.2, and in Distutils2.
|
||||||
|
|
||||||
Distutils2 will also contain a backport of the new pgkutil, and can be used for
|
Distutils2 will also contain a backport of the new pgkutil, and can be used for
|
||||||
2.4 onward.
|
2.4 onward.
|
||||||
|
@ -595,6 +595,9 @@ References
|
||||||
.. [#distutils]
|
.. [#distutils]
|
||||||
http://docs.python.org/distutils
|
http://docs.python.org/distutils
|
||||||
|
|
||||||
|
.. [#distutils2]
|
||||||
|
http://hg.python.org/distutils2
|
||||||
|
|
||||||
.. [#pep262]
|
.. [#pep262]
|
||||||
http://www.python.org/dev/peps/pep-0262
|
http://www.python.org/dev/peps/pep-0262
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue