diff options
-rw-r--r-- | .hgtags | 1 | ||||
-rw-r--r-- | CHANGES.txt | 24 | ||||
-rw-r--r-- | ez_setup.py | 23 | ||||
-rw-r--r-- | setuptools.egg-info/entry_points.txt | 90 | ||||
-rw-r--r-- | setuptools.egg-info/requires.txt | 14 | ||||
-rw-r--r-- | setuptools/dist.py | 142 | ||||
-rwxr-xr-x | setuptools/package_index.py | 3 | ||||
-rw-r--r-- | setuptools/version.py | 2 |
8 files changed, 97 insertions, 202 deletions
@@ -93,3 +93,4 @@ e0a6e225ad6b28471cd42cfede6e8a334bb548fb 0.9.8 aba16323ec9382da7bc77c633990ccb3bd58d050 1.0b2 8a98492f0d852402c93ddbbf3f07081909a9105f 1.0b3 c385fdf1f976fb1d2a6accc9292d8eca419180fa 1.0 +d943b67fe80dbd61326014e4acedfc488adfa1c9 1.1 diff --git a/CHANGES.txt b/CHANGES.txt index 9f1d15b3..928673bc 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -3,17 +3,25 @@ CHANGES ======= --- +1.1 +--- + +* Issue #71 (Distribute #333): EasyInstall now puts less emphasis on the + condition when a host is blocked via ``--allow-hosts``. +* Issue #72: Restored Python 2.4 compatibility in ``ez_setup.py``. + +--- 1.0 --- -* On Windows, Setuptools supports deferring to Vinay Sajip's `pylauncher - <https://bitbucket.org/pypa/pylauncher>`_ (included with Python 3.3) to - launch console and GUI scripts and not install its own launcher - executables. This experimental functionality is currently only enabled if - the ``SETUPTOOLS_LAUNCHER`` environment variable is set to "natural". - In the future, this behavior may become default, but only after it has - matured and seen substantial adoption. The ``SETUPTOOLS_LAUNCHER`` also - accepts "executable" to force the default behavior of creating launcher +* Issue #60: On Windows, Setuptools supports deferring to another launcher, + such as Vinay Sajip's `pylauncher <https://bitbucket.org/pypa/pylauncher>`_ + (included with Python 3.3) to launch console and GUI scripts and not install + its own launcher executables. This experimental functionality is currently + only enabled if the ``SETUPTOOLS_LAUNCHER`` environment variable is set to + "natural". In the future, this behavior may become default, but only after + it has matured and seen substantial adoption. The ``SETUPTOOLS_LAUNCHER`` + also accepts "executable" to force the default behavior of creating launcher executables. * Issue #63: Bootstrap script (ez_setup.py) now prefers Powershell, curl, or wget for retrieving the Setuptools tarball for improved security of the diff --git a/ez_setup.py b/ez_setup.py index 40db5a57..13d0949f 100644 --- a/ez_setup.py +++ b/ez_setup.py @@ -29,7 +29,7 @@ try: except ImportError: USER_SITE = None -DEFAULT_VERSION = "1.1" +DEFAULT_VERSION = "1.2" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): @@ -170,9 +170,10 @@ def has_powershell(): cmd = ['powershell', '-Command', 'echo test'] devnull = open(os.path.devnull, 'wb') try: - subprocess.check_call(cmd, stdout=devnull, stderr=devnull) - except: - return False + try: + subprocess.check_call(cmd, stdout=devnull, stderr=devnull) + except: + return False finally: devnull.close() return True @@ -187,9 +188,10 @@ def has_curl(): cmd = ['curl', '--version'] devnull = open(os.path.devnull, 'wb') try: - subprocess.check_call(cmd, stdout=devnull, stderr=devnull) - except: - return False + try: + subprocess.check_call(cmd, stdout=devnull, stderr=devnull) + except: + return False finally: devnull.close() return True @@ -204,9 +206,10 @@ def has_wget(): cmd = ['wget', '--version'] devnull = open(os.path.devnull, 'wb') try: - subprocess.check_call(cmd, stdout=devnull, stderr=devnull) - except: - return False + try: + subprocess.check_call(cmd, stdout=devnull, stderr=devnull) + except: + return False finally: devnull.close() return True diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index df9b9c2d..abcafd65 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,62 +1,62 @@ -[distutils.commands] -install_scripts = setuptools.command.install_scripts:install_scripts -install = setuptools.command.install:install -setopt = setuptools.command.setopt:setopt -register = setuptools.command.register:register -easy_install = setuptools.command.easy_install:easy_install -test = setuptools.command.test:test -sdist = setuptools.command.sdist:sdist -alias = setuptools.command.alias:alias -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -egg_info = setuptools.command.egg_info:egg_info -bdist_egg = setuptools.command.bdist_egg:bdist_egg -build_py = setuptools.command.build_py:build_py -upload_docs = setuptools.command.upload_docs:upload_docs -install_lib = setuptools.command.install_lib:install_lib -develop = setuptools.command.develop:develop -rotate = setuptools.command.rotate:rotate -build_ext = setuptools.command.build_ext:build_ext -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -saveopts = setuptools.command.saveopts:saveopts -install_egg_info = setuptools.command.install_egg_info:install_egg_info +[console_scripts] +easy_install = setuptools.command.easy_install:main +easy_install-3.3 = setuptools.command.easy_install:main + +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap [distutils.setup_keywords] -tests_require = setuptools.dist:check_requirements -install_requires = setuptools.dist:check_requirements -package_data = setuptools.dist:check_package_data -use_2to3_exclude_fixers = setuptools.dist:assert_string_list exclude_package_data = setuptools.dist:check_package_data -dependency_links = setuptools.dist:assert_string_list +eager_resources = setuptools.dist:assert_string_list convert_2to3_doctests = setuptools.dist:assert_string_list -use_2to3_fixers = setuptools.dist:assert_string_list -test_loader = setuptools.dist:check_importable -use_2to3 = setuptools.dist:assert_bool test_suite = setuptools.dist:check_test_suite -namespace_packages = setuptools.dist:check_nsp -zip_safe = setuptools.dist:assert_bool +package_data = setuptools.dist:check_package_data packages = setuptools.dist:check_packages -eager_resources = setuptools.dist:assert_string_list +use_2to3 = setuptools.dist:assert_bool +entry_points = setuptools.dist:check_entry_points include_package_data = setuptools.dist:assert_bool +use_2to3_exclude_fixers = setuptools.dist:assert_string_list extras_require = setuptools.dist:check_extras -entry_points = setuptools.dist:check_entry_points - -[console_scripts] -easy_install-3.3 = setuptools.command.easy_install:main -easy_install = setuptools.command.easy_install:main +test_loader = setuptools.dist:check_importable +install_requires = setuptools.dist:check_requirements +use_2to3_fixers = setuptools.dist:assert_string_list +tests_require = setuptools.dist:check_requirements +dependency_links = setuptools.dist:assert_string_list +namespace_packages = setuptools.dist:check_nsp +zip_safe = setuptools.dist:assert_bool -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl [egg_info.writers] -entry_points.txt = setuptools.command.egg_info:write_entries -PKG-INFO = setuptools.command.egg_info:write_pkg_info +dependency_links.txt = setuptools.command.egg_info:overwrite_arg requires.txt = setuptools.command.egg_info:write_requirements namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -dependency_links.txt = setuptools.command.egg_info:overwrite_arg +entry_points.txt = setuptools.command.egg_info:write_entries +depends.txt = setuptools.command.egg_info:warn_depends_obsolete eager_resources.txt = setuptools.command.egg_info:overwrite_arg +PKG-INFO = setuptools.command.egg_info:write_pkg_info top_level.txt = setuptools.command.egg_info:write_toplevel_names -depends.txt = setuptools.command.egg_info:warn_depends_obsolete -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl +[distutils.commands] +easy_install = setuptools.command.easy_install:easy_install +build_ext = setuptools.command.build_ext:build_ext +install = setuptools.command.install:install +saveopts = setuptools.command.saveopts:saveopts +install_egg_info = setuptools.command.install_egg_info:install_egg_info +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +test = setuptools.command.test:test +install_scripts = setuptools.command.install_scripts:install_scripts +egg_info = setuptools.command.egg_info:egg_info +upload_docs = setuptools.command.upload_docs:upload_docs +sdist = setuptools.command.sdist:sdist +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +alias = setuptools.command.alias:alias +rotate = setuptools.command.rotate:rotate +register = setuptools.command.register:register +develop = setuptools.command.develop:develop +bdist_egg = setuptools.command.bdist_egg:bdist_egg +install_lib = setuptools.command.install_lib:install_lib +build_py = setuptools.command.build_py:build_py +setopt = setuptools.command.setopt:setopt diff --git a/setuptools.egg-info/requires.txt b/setuptools.egg-info/requires.txt index c06a8a0b..6d385dc7 100644 --- a/setuptools.egg-info/requires.txt +++ b/setuptools.egg-info/requires.txt @@ -1,13 +1,13 @@ -[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
\ No newline at end of file +certifi==0.0.8 + +[ssl:sys_platform=='win32'] +wincertstore==0.1 + +[ssl:sys_platform=='win32' and python_version=='2.4'] +ctypes==1.0.2
\ No newline at end of file diff --git a/setuptools/dist.py b/setuptools/dist.py index 5c84b8d4..c5b02f99 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -1,18 +1,19 @@ __all__ = ['Distribution'] import re +import os import sys import warnings +import distutils.log +import distutils.core +import distutils.cmd from distutils.core import Distribution as _Distribution +from distutils.errors import (DistutilsOptionError, DistutilsPlatformError, + DistutilsSetupError) + from setuptools.depends import Require -from setuptools.command.install import install -from setuptools.command.sdist import sdist -from setuptools.command.install_lib import install_lib from setuptools.compat import numeric_types, basestring -from distutils.errors import DistutilsOptionError, DistutilsPlatformError -from distutils.errors import DistutilsSetupError -import setuptools, pkg_resources, distutils.core, distutils.dist, distutils.cmd -import os, distutils.log +import pkg_resources def _get_unpatched(cls): """Protect against re-patching the distutils if reloaded @@ -135,38 +136,6 @@ def check_packages(dist, attr, value): ) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - class Distribution(_Distribution): """Distribution with support for features, tests, and package data @@ -250,7 +219,7 @@ class Distribution(_Distribution): dist._version = pkg_resources.safe_version(str(attrs['version'])) self._patched_dist = dist - def __init__ (self, attrs=None): + def __init__(self, attrs=None): have_package_data = hasattr(self, "package_data") if not have_package_data: self.package_data = {} @@ -367,23 +336,6 @@ class Distribution(_Distribution): self.global_options = self.feature_options = go + self.global_options self.negative_opt = self.feature_negopt = no - - - - - - - - - - - - - - - - - def _finalize_features(self): """Add/remove features and resolve dependencies between them""" @@ -401,7 +353,6 @@ class Distribution(_Distribution): feature.exclude_from(self) self._set_feature(name,0) - def get_command_class(self, command): """Pluggable version of get_command_class()""" if command in self.cmdclass: @@ -421,10 +372,6 @@ class Distribution(_Distribution): self.cmdclass[ep.name] = cmdclass return _Distribution.print_commands(self) - - - - def _set_feature(self,name,status): """Set feature's inclusion status""" setattr(self,self._feature_attrname(name),status) @@ -439,8 +386,8 @@ class Distribution(_Distribution): if self.feature_is_included(name)==0: descr = self.features[name].description raise DistutilsOptionError( - descr + " is required, but was excluded or is not available" - ) + descr + " is required, but was excluded or is not available" + ) self.features[name].include_in(self) self._set_feature(name,1) @@ -488,7 +435,6 @@ class Distribution(_Distribution): if p.name != package and not p.name.startswith(pfx) ] - def has_contents_for(self,package): """Return true if 'exclude_package(package)' would do something""" @@ -498,15 +444,6 @@ class Distribution(_Distribution): if p==package or p.startswith(pfx): return True - - - - - - - - - def _exclude_misc(self,name,value): """Handle 'exclude()' for list/tuple attrs without a special handler""" if not isinstance(value,sequence): @@ -578,17 +515,6 @@ class Distribution(_Distribution): ) list(map(self.exclude_package, packages)) - - - - - - - - - - - def _parse_command_opts(self, parser, args): # Remove --with-X/--without-X options when processing command args self.global_options = self.__class__.global_options @@ -615,21 +541,6 @@ class Distribution(_Distribution): return nargs - - - - - - - - - - - - - - - def get_cmdline_options(self): """Return a '{cmd: {opt:val}}' map of all command-line options @@ -670,7 +581,6 @@ class Distribution(_Distribution): return d - def iter_distribution_names(self): """Yield all packages, modules, and extension names in distribution""" @@ -689,7 +599,6 @@ class Distribution(_Distribution): name = name[:-6] yield name - def handle_display_options(self, option_order): """If there were any non-global "display-only" options (--help-commands or the metadata display options) on the command @@ -731,24 +640,6 @@ for module in distutils.dist, distutils.core, distutils.cmd: module.Distribution = Distribution - - - - - - - - - - - - - - - - - - class Feature: """ **deprecated** -- The `Feature` facility was never completely implemented @@ -816,8 +707,7 @@ class Feature: ) def __init__(self, description, standard=False, available=True, - optional=True, require_features=(), remove=(), **extras - ): + optional=True, require_features=(), remove=(), **extras): self.warn_deprecated() self.description = description @@ -869,8 +759,6 @@ class Feature: for f in self.require_features: dist.include_feature(f) - - def exclude_from(self,dist): """Ensure feature is excluded from distribution @@ -887,8 +775,6 @@ class Feature: for item in self.remove: dist.exclude_package(item) - - def validate(self,dist): """Verify that feature makes sense in context of distribution @@ -908,7 +794,3 @@ class Feature: " doesn't contain any packages or modules under %s" % (self.description, item, item) ) - - - - diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 9c9d76a1..d949063e 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -343,7 +343,8 @@ class PackageIndex(Environment): s = URL_SCHEME(url) if (s and s.group(1).lower()=='file') or self.allows(urlparse(url)[1]): return True - msg = "\nLink to % s ***BLOCKED*** by --allow-hosts\n" + msg = ("\nNote: Bypassing %s (disallowed host; see " + "http://bit.ly/1dg9ijs for details).\n") if fatal: raise DistutilsError(msg % url) else: diff --git a/setuptools/version.py b/setuptools/version.py index 439eb0cd..64477cf2 100644 --- a/setuptools/version.py +++ b/setuptools/version.py @@ -1 +1 @@ -__version__ = '1.1' +__version__ = '1.2' |