aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command
diff options
context:
space:
mode:
authorPJ Eby <distutils-sig@python.org>2006-09-27 01:58:22 +0000
committerPJ Eby <distutils-sig@python.org>2006-09-27 01:58:22 +0000
commitc542669d4d7a6a2ee3a797a14362eef2a69ed089 (patch)
treed0674b377275e29a83364a3fc89fdc26127e577f /setuptools/command
parent1286031284718b85ce85465a583724b53373cd04 (diff)
downloadexternal_python_setuptools-c542669d4d7a6a2ee3a797a14362eef2a69ed089.tar.gz
external_python_setuptools-c542669d4d7a6a2ee3a797a14362eef2a69ed089.tar.bz2
external_python_setuptools-c542669d4d7a6a2ee3a797a14362eef2a69ed089.zip
Allow explicit selection of Sourceforge mirror(s) with ``--sf-mirror``, and
further refine download/retry algorithm. (backport from trunk) --HG-- branch : setuptools-0.6 extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4052013
Diffstat (limited to 'setuptools/command')
-rwxr-xr-xsetuptools/command/easy_install.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
index b049ce58..29558d71 100755
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -70,6 +70,7 @@ class easy_install(Command):
('editable', 'e', "Install specified packages in editable form"),
('no-deps', 'N', "don't install dependencies"),
('allow-hosts=', 'H', "pattern(s) that hostnames must match"),
+ ('sf-mirrors=', None, "Sourceforge mirror(s) to use"),
]
boolean_options = [
'zip-ok', 'multi-version', 'exclude-scripts', 'upgrade', 'always-copy',
@@ -79,7 +80,6 @@ class easy_install(Command):
negative_opt = {'always-unzip': 'zip-ok'}
create_index = PackageIndex
-
def initialize_options(self):
self.zip_ok = None
self.install_dir = self.script_dir = self.exclude_scripts = None
@@ -90,7 +90,7 @@ class easy_install(Command):
self.optimize = self.record = None
self.upgrade = self.always_copy = self.multi_version = None
self.editable = self.no_deps = self.allow_hosts = None
- self.root = self.prefix = self.no_report = None
+ self.root = self.prefix = self.no_report = self.sf_mirrors = None
# Options not specifiable via command line
self.package_index = None
@@ -166,10 +166,10 @@ class easy_install(Command):
hosts = [s.strip() for s in self.allow_hosts.split(',')]
else:
hosts = ['*']
-
if self.package_index is None:
self.package_index = self.create_index(
- self.index_url, search_path = self.shadow_path, hosts=hosts
+ self.index_url, search_path = self.shadow_path, hosts=hosts,
+ sf_mirrors = self.sf_mirrors
)
self.local_index = Environment(self.shadow_path+sys.path)