summaryrefslogtreecommitdiff
path: root/setuptools/command
diff options
context:
space:
mode:
authorphillip.eby <phillip.eby@6015fed2-1504-0410-9fe1-9d1591cc4771>2006-09-27 01:56:48 +0000
committerphillip.eby <phillip.eby@6015fed2-1504-0410-9fe1-9d1591cc4771>2006-09-27 01:56:48 +0000
commit698b03e634a533a2d0e71dccd918830052356aef (patch)
tree4f6010c4fcdb9edc7889d4503e3686a74c1cf4ea /setuptools/command
parentd5db924f1539c07a75c4235c9935abd778b0b8db (diff)
downloadpython-setuptools-698b03e634a533a2d0e71dccd918830052356aef.tar.gz
Allow explicit selection of Sourceforge mirror(s) with --sf-mirror, and
further refine download/retry algorithm. git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@52012 6015fed2-1504-0410-9fe1-9d1591cc4771
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 2b53cf5..84f2593 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)