aboutsummaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py73
1 files changed, 34 insertions, 39 deletions
diff --git a/setup.py b/setup.py
index 4541f83c..a4d6d556 100755
--- a/setup.py
+++ b/setup.py
@@ -21,7 +21,7 @@ if sys.version_info >= (3,):
manifest_file.close()
dir_util.create_tree(tmp_src, fl.files)
outfiles_2to3 = []
- dist_script = os.path.join("build", "src", "distribute_setup.py")
+ dist_script = os.path.join("build", "src", "ez_setup.py")
for f in fl.files:
outf, copied = file_util.copy_file(f, os.path.join(tmp_src, f), update=1)
if copied and outf.endswith(".py") and outf != dist_script:
@@ -46,7 +46,7 @@ exec(init_file.read(), d)
init_file.close()
SETUP_COMMANDS = d['__all__']
-VERSION = "0.6.50"
+VERSION = "0.7.8"
from setuptools import setup, find_packages
from setuptools.command.build_py import build_py as _build_py
@@ -55,7 +55,12 @@ from setuptools.command.test import test as _test
scripts = []
console_scripts = ["easy_install = setuptools.command.easy_install:main"]
-if os.environ.get("DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT") is None:
+
+# Gentoo distributions manage the python-version-specific scripts themselves,
+# so they define an environment variable to suppress the creation of the
+# version-specific scripts.
+if os.environ.get("SETUPTOOLS_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT") in (None, "", "0") and \
+ os.environ.get("DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT") in (None, "", "0"):
console_scripts.append("easy_install-%s = setuptools.command.easy_install:main" % sys.version[:3])
# specific command that is used to generate windows .exe files
@@ -82,7 +87,7 @@ class build_py(_build_py):
class test(_test):
"""Specific test class to avoid rewriting the entry_points.txt"""
def run(self):
- entry_points = os.path.join('distribute.egg-info', 'entry_points.txt')
+ entry_points = os.path.join('setuptools.egg-info', 'entry_points.txt')
if not os.path.exists(entry_points):
_test.run(self)
@@ -107,32 +112,6 @@ class test(_test):
f.close()
-# if we are installing Distribute using "python setup.py install"
-# we need to get setuptools out of the way
-def _easy_install_marker():
- return (len(sys.argv) == 5 and sys.argv[2] == 'bdist_egg' and
- sys.argv[3] == '--dist-dir' and 'egg-dist-tmp-' in sys.argv[-1])
-
-def _buildout_marker():
- command = os.environ.get('_')
- if command:
- return 'buildout' in os.path.basename(command)
-
-def _being_installed():
- if os.environ.get('DONT_PATCH_SETUPTOOLS') is not None:
- return False
- if _buildout_marker():
- # Installed by buildout, don't mess with a global setuptools.
- return False
- # easy_install marker
- if "--help" in sys.argv[1:] or "-h" in sys.argv[1:]: # Don't bother doing anything if they're just asking for help
- return False
- return 'install' in sys.argv[1:] or _easy_install_marker()
-
-if _being_installed():
- from distribute_setup import _before_install
- _before_install()
-
readme_file = open('README.txt')
# the release script adds hyperlinks to issues
if os.path.exists('CHANGES (links).txt'):
@@ -140,12 +119,17 @@ if os.path.exists('CHANGES (links).txt'):
else:
# but if the release script has not run, fall back to the source file
changes_file = open('CHANGES.txt')
-long_description = readme_file.read() + changes_file.read()
+long_description = readme_file.read() + '\n' + changes_file.read()
readme_file.close()
changes_file.close()
+package_data = {'setuptools': ['site-patch.py']}
+if sys.platform == 'win32':
+ package_data.setdefault('setuptools', []).extend(['*.exe'])
+ package_data.setdefault('setuptools.command', []).extend(['*.xml'])
+
dist = setup(
- name="distribute",
+ name="setuptools",
version=VERSION,
description="Easily download, build, install, upgrade, and uninstall "
"Python packages",
@@ -154,11 +138,11 @@ dist = setup(
license="PSF or ZPL",
long_description = long_description,
keywords = "CPAN PyPI distutils eggs package management",
- url = "http://packages.python.org/distribute",
+ url = "https://pypi.python.org/pypi/setuptools",
test_suite = 'setuptools.tests',
src_root = src_root,
packages = find_packages(),
- package_data = {'setuptools':['*.exe', 'site-patch.py'], 'setuptools.command':['*.xml']},
+ package_data = package_data,
py_modules = ['pkg_resources', 'easy_install'],
@@ -229,9 +213,20 @@ dist = setup(
Topic :: System :: Systems Administration
Topic :: Utilities
""").strip().splitlines(),
- scripts = scripts,
+ extras_require = {
+ "ssl:sys_platform=='win32'": "wincertstore==0.1",
+ "ssl:sys_platform=='win32' and python_version=='2.4'": "ctypes==1.0.2",
+ "ssl:python_version in '2.4, 2.5'":"ssl==1.16",
+ "certs": "certifi==0.0.8",
+ },
+ dependency_links = [
+ 'https://pypi.python.org/packages/source/c/certifi/certifi-0.0.8.tar.gz#md5=dc5f5e7f0b5fc08d27654b17daa6ecec',
+ 'https://pypi.python.org/packages/source/s/ssl/ssl-1.16.tar.gz#md5=fb12d335d56f3c8c7c1fefc1c06c4bfb',
+ 'https://pypi.python.org/packages/source/w/wincertstore/wincertstore-0.1.zip#md5=2f9accbebe8f7b4c06ac7aa83879b81c',
+ 'https://bitbucket.org/pypa/setuptools/downloads/ctypes-1.0.2.win32-py2.4.exe#md5=9092a0ad5a3d79fa2d980f1ddc5e9dbc',
+ 'https://bitbucket.org/pypa/setuptools/downloads/ssl-1.16-py2.4-win32.egg#md5=3cfa2c526dc66e318e8520b6f1aadce5',
+ 'https://bitbucket.org/pypa/setuptools/downloads/ssl-1.16-py2.5-win32.egg#md5=85ad1cda806d639743121c0bbcb5f39b',
+ ],
+ scripts = [],
+ # tests_require = "setuptools[ssl]",
)
-
-if _being_installed():
- from distribute_setup import _after_install
- _after_install(dist)