Commit b36d8cf4 authored by PJ Eby's avatar PJ Eby

Improve backward compatibility, so that users running easy_install.py or

python -m easy_install get a clearer error message.

--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041249
parent 1b1eab50
#!python
"""\
Easy Install
------------
A tool for doing automatic download/extract/build of distutils-based Python
packages. For detailed documentation, see the accompanying EasyInstall.txt
file, or visit the `EasyInstall home page`__.
__ http://peak.telecommunity.com/DevCenter/EasyInstall
This script/module exists for backward compatibility only! It will go away
entirely in 0.7. Please start using the 'easy_install' script or .exe instead
of using 'python -m easy_install' or running 'easy_install.py' directly.
"""
import sys
from setuptools.command.easy_install import *
if __name__ == '__main__':
print >>sys.stderr, "NOTE: python -m easy_install is deprecated."
print >>sys.stderr, "Please use the 'easy_install' command instead."
print >>sys.stderr
main(sys.argv[1:])
import sys
print >>sys.stderr, \
"Please use the 'easy_install' script or executable instead."
print >>sys.stderr, \
"(i.e., don't include the '.py' extension and don't use 'python -m')"
sys.exit(2)
......@@ -14,13 +14,14 @@ def get_description():
lines.append(line)
f.close()
return ''.join(lines)
VERSION = "0.6a2"
VERSION = "0.6a2"
from setuptools import setup, find_packages
import sys
from setuptools.command import __all__ as SETUP_COMMANDS
scripts = []
if sys.platform != "win32":
scripts = ["easy_install.py"] # for backward compatibility only
setup(
name="setuptools",
......@@ -38,7 +39,6 @@ setup(
package_data = {'setuptools': ['launcher.exe']},
py_modules = ['pkg_resources', 'easy_install'],
zip_safe = False, # We want 'python -m easy_install' to work, for now :(
entry_points = {
"distutils.commands" : [
......@@ -77,8 +77,8 @@ setup(
Topic :: Software Development :: Libraries :: Python Modules
Topic :: System :: Archiving :: Packaging
Topic :: System :: Systems Administration
Topic :: Utilities""".splitlines() if f.strip()]
Topic :: Utilities""".splitlines() if f.strip()],
scripts = scripts,
# uncomment for testing
# setup_requires = ['setuptools>=0.6a0'],
......
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