diff options
author | Tarek Ziade <tarek@ziade.org> | 2010-03-13 16:53:19 -0500 |
---|---|---|
committer | Tarek Ziade <tarek@ziade.org> | 2010-03-13 16:53:19 -0500 |
commit | 38ae8ecbdc6a9f285a56add8c695b10b2786c679 (patch) | |
tree | 420cfd5eba1d375bfa3471218cf3cdda07cb18ef /setuptools/command/easy_install.py | |
parent | 9b4f204172ebab821cb677c978625c2e2479de5e (diff) | |
download | external_python_setuptools-38ae8ecbdc6a9f285a56add8c695b10b2786c679.tar.gz external_python_setuptools-38ae8ecbdc6a9f285a56add8c695b10b2786c679.tar.bz2 external_python_setuptools-38ae8ecbdc6a9f285a56add8c695b10b2786c679.zip |
added the --no-find-links option
--HG--
branch : distribute
extra : rebase_source : fc2cbd4d369f7d5c77cae03e39354245b185cc60
Diffstat (limited to 'setuptools/command/easy_install.py')
-rwxr-xr-x | setuptools/command/easy_install.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 366ac7bc..33b14bf7 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -91,6 +91,8 @@ class easy_install(Command): ('allow-hosts=', 'H', "pattern(s) that hostnames must match"), ('local-snapshots-ok', 'l', "allow building eggs from local checkouts"), ('version', None, "print version information and exit"), + ('no-find-links', None, + "Don't load find-links defined in packages being installed") ] boolean_options = [ 'zip-ok', 'multi-version', 'exclude-scripts', 'upgrade', 'always-copy', @@ -112,6 +114,7 @@ class easy_install(Command): self.editable = self.no_deps = self.allow_hosts = None self.root = self.prefix = self.no_report = None self.version = None + self.no_find_links = None # Options not specifiable via command line self.package_index = None @@ -153,6 +156,9 @@ class easy_install(Command): if self.script_dir is None: self.script_dir = self.install_dir + if self.no_find_links is None: + self.no_find_links = False + # Let install_dir get set by install_lib command, which in turn # gets its info from the install command, and takes into account # --prefix and --home and all that other crud. @@ -204,7 +210,8 @@ class easy_install(Command): self.find_links = [] if self.local_snapshots_ok: self.package_index.scan_egg_links(self.shadow_path+sys.path) - self.package_index.add_find_links(self.find_links) + if not self.no_find_links: + self.package_index.add_find_links(self.find_links) self.set_undefined_options('install_lib', ('optimize','optimize')) if not isinstance(self.optimize,int): try: @@ -229,7 +236,7 @@ class easy_install(Command): self.outputs = [] def run(self): - if self.verbose<>self.distribution.verbose: + if self.verbose != self.distribution.verbose: log.set_verbosity(self.verbose) try: for spec in self.args: @@ -523,7 +530,8 @@ Please make the appropriate changes for your system and try again. self.install_egg_scripts(dist) self.installed_projects[dist.key] = dist log.info(self.installation_report(requirement, dist, *info)) - if dist.has_metadata('dependency_links.txt'): + if (dist.has_metadata('dependency_links.txt') and + not self.no_find_links): self.package_index.add_find_links( dist.get_metadata_lines('dependency_links.txt') ) |