Commit 8468e915 authored by PJ Eby's avatar PJ Eby

Made ``easy_install`` a standard ``setuptools`` command, moving it from

the ``easy_install`` module to ``setuptools.command.easy_install``.  Note
that if you were importing or extending it, you must now change your
imports accordingly.  ``easy_install.py`` is still installed as a script,
but not as a module.

--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041079
parent 3686c4d8
...@@ -493,12 +493,18 @@ Known Issues ...@@ -493,12 +493,18 @@ Known Issues
directly on the source. This avoids an "unmanaged" installation of the directly on the source. This avoids an "unmanaged" installation of the
package to ``site-packages`` or elsewhere. package to ``site-packages`` or elsewhere.
* Made ``easy_install`` a standard ``setuptools`` command, moving it from
the ``easy_install`` module to ``setuptools.command.easy_install``. Note
that if you were importing or extending it, you must now change your imports
accordingly. ``easy_install.py`` is still installed as a script, but not as
a module.
0.5a4 0.5a4
* Added ``--always-copy/-a`` option to always copy needed packages to the * Added ``--always-copy/-a`` option to always copy needed packages to the
installation directory, even if they're already present elsewhere on installation directory, even if they're already present elsewhere on
sys.path. (In previous versions, this was the default behavior, but now sys.path. (In previous versions, this was the default behavior, but now
you must request it.) you must request it.)
* Added ``--upgrade/-U`` option to force checking PyPI for latest available * Added ``--upgrade/-U`` option to force checking PyPI for latest available
version(s) of all packages requested by name and version, even if a matching version(s) of all packages requested by name and version, even if a matching
version is available locally. version is available locally.
...@@ -522,7 +528,7 @@ Known Issues ...@@ -522,7 +528,7 @@ Known Issues
* Setup scripts using setuptools now always install using ``easy_install`` * Setup scripts using setuptools now always install using ``easy_install``
internally, for ease of uninstallation and upgrading. Note: you *must* internally, for ease of uninstallation and upgrading. Note: you *must*
remove any ``extra_path`` argument from your setup script, as it conflicts remove any ``extra_path`` argument from your setup script, as it conflicts
with the proper functioning of the ``easy_install`` command. (Also, added with the proper functioning of the ``easy_install`` command. (Also, added
the ``--record`` option to ``easy_install`` for the benefit of tools that the ``--record`` option to ``easy_install`` for the benefit of tools that
run ``setup.py install --record=filename`` on behalf of another packaging run ``setup.py install --record=filename`` on behalf of another packaging
system.) system.)
...@@ -535,7 +541,7 @@ Known Issues ...@@ -535,7 +541,7 @@ Known Issues
0.5a3 0.5a3
* Fixed not setting script permissions to allow execution. * Fixed not setting script permissions to allow execution.
* Improved sandboxing so that setup scripts that want a temporary directory * Improved sandboxing so that setup scripts that want a temporary directory
(e.g. pychecker) can still run in the sandbox. (e.g. pychecker) can still run in the sandbox.
......
This diff is collapsed.
...@@ -132,7 +132,7 @@ def main(argv, version=DEFAULT_VERSION): ...@@ -132,7 +132,7 @@ def main(argv, version=DEFAULT_VERSION):
try: try:
egg = download_setuptools(version, to_dir=tmpdir) egg = download_setuptools(version, to_dir=tmpdir)
sys.path.insert(0,egg) sys.path.insert(0,egg)
from easy_install import main from setuptools.command.easy_install import main
main(list(argv)+[egg]) main(list(argv)+[egg])
finally: finally:
shutil.rmtree(tmpdir) shutil.rmtree(tmpdir)
...@@ -146,12 +146,12 @@ def main(argv, version=DEFAULT_VERSION): ...@@ -146,12 +146,12 @@ def main(argv, version=DEFAULT_VERSION):
try: try:
pkg_resources.require(req) pkg_resources.require(req)
except pkg_resources.VersionConflict: except pkg_resources.VersionConflict:
from easy_install import main from setuptools.command.easy_install import main
main(list(argv)+[req]) main(list(argv)+[req])
sys.exit(0) # try to force an exit sys.exit(0) # try to force an exit
else: else:
if argv: if argv:
from easy_install import main from setuptools.command.easy_install import main
main(argv) main(argv)
else: else:
print "Setuptools successfully installed or upgraded." print "Setuptools successfully installed or upgraded."
......
...@@ -40,7 +40,7 @@ setup( ...@@ -40,7 +40,7 @@ setup(
packages = find_packages(), packages = find_packages(),
py_modules = ['pkg_resources', 'easy_install'], py_modules = ['pkg_resources'],
scripts = ['easy_install.py'], scripts = ['easy_install.py'],
classifiers = [f.strip() for f in """ classifiers = [f.strip() for f in """
......
This diff is collapsed.
...@@ -395,7 +395,7 @@ class Distribution(_Distribution): ...@@ -395,7 +395,7 @@ class Distribution(_Distribution):
self.run_command(cmd) self.run_command(cmd)
def install_eggs(self): def install_eggs(self):
from easy_install import easy_install from setuptools.command.easy_install import easy_install
cmd = easy_install(self, args="x") cmd = easy_install(self, args="x")
cmd.ensure_finalized() # finalize before bdist_egg munges install cmd cmd.ensure_finalized() # finalize before bdist_egg munges install cmd
self.run_command('bdist_egg') self.run_command('bdist_egg')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment