From 2762c22f7a4dd3a288c04bb10af98605114bb08e Mon Sep 17 00:00:00 2001 From: nibrahim Date: Mon, 22 Feb 2010 18:17:37 -0500 Subject: Added an os.makedirs so that Tarek's solution will work --HG-- branch : distribute extra : rebase_source : 91e7070818115d6ff2bcbf6db1912788e70b8d59 --- setuptools/command/easy_install.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'setuptools/command') diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 421d0c09..366ac7bc 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -9,7 +9,7 @@ file, or visit the `EasyInstall home page`__. __ http://peak.telecommunity.com/DevCenter/EasyInstall """ -import sys, os.path, zipimport, shutil, tempfile, zipfile, re, stat, random +import sys, os, os.path, zipimport, shutil, tempfile, zipfile, re, stat, random from glob import glob from setuptools import Command from setuptools.sandbox import run_setup @@ -360,6 +360,7 @@ Please make the appropriate changes for your system and try again. ok_exists = os.path.exists(ok_file) try: if ok_exists: os.unlink(ok_file) + os.makedirs(os.path.dirname(ok_file)) f = open(pth_file,'w') except (OSError,IOError): self.cant_write_to_target() -- cgit v1.2.1 From 38ae8ecbdc6a9f285a56add8c695b10b2786c679 Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Sat, 13 Mar 2010 16:53:19 -0500 Subject: added the --no-find-links option --HG-- branch : distribute extra : rebase_source : fc2cbd4d369f7d5c77cae03e39354245b185cc60 --- setuptools/command/easy_install.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'setuptools/command') 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') ) -- cgit v1.2.1 From b99d0e8aefe94a718630cb6be3369e290a6ec060 Mon Sep 17 00:00:00 2001 From: Yannick Gingras Date: Mon, 15 Mar 2010 22:13:19 -0400 Subject: removed unsused imports --HG-- branch : distribute extra : rebase_source : 6c1870024a04c1b5393c85a5782809ef409c66a6 --- setuptools/command/easy_install.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'setuptools/command') diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 33b14bf7..c96a43fd 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -9,7 +9,7 @@ file, or visit the `EasyInstall home page`__. __ http://peak.telecommunity.com/DevCenter/EasyInstall """ -import sys, os, os.path, zipimport, shutil, tempfile, zipfile, re, stat, random +import sys, os.path, zipimport, shutil, tempfile, zipfile, re, stat, random from glob import glob from setuptools import Command from setuptools.sandbox import run_setup @@ -18,7 +18,7 @@ from distutils.sysconfig import get_python_lib from distutils.errors import DistutilsArgError, DistutilsOptionError, \ DistutilsError from setuptools.archive_util import unpack_archive -from setuptools.package_index import PackageIndex, parse_bdist_wininst +from setuptools.package_index import PackageIndex from setuptools.package_index import URL_SCHEME from setuptools.command import bdist_egg, egg_info from pkg_resources import * -- cgit v1.2.1 From dee0ec5d40f2be83be1596fd12dbdb9b5eb159d0 Mon Sep 17 00:00:00 2001 From: Yannick Gingras Date: Mon, 15 Mar 2010 22:24:45 -0400 Subject: updated links to the new location of the easy_install docs --HG-- branch : distribute extra : rebase_source : 9d757c4d6c0d0c0b14b381961af69907e079d0ce --- setuptools/command/easy_install.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'setuptools/command') diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index c96a43fd..843c261c 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -7,7 +7,8 @@ A tool for doing automatic download/extract/build of distutils-based Python packages. For detailed documentation, see the accompanying EasyInstall.txt file, or visit the `EasyInstall home page`__. -__ http://peak.telecommunity.com/DevCenter/EasyInstall +__ http://packages.python.org/distribute/easy_install.html + """ import sys, os.path, zipimport, shutil, tempfile, zipfile, re, stat, random from glob import glob @@ -349,7 +350,7 @@ variable. For information on other options, you may wish to consult the documentation at: - http://peak.telecommunity.com/EasyInstall.html + http://packages.python.org/distribute/easy_install.html Please make the appropriate changes for your system and try again. """ @@ -1084,7 +1085,7 @@ Here are some of your options for correcting the problem: * You can set up the installation directory to support ".pth" files by using one of the approaches described here: - http://peak.telecommunity.com/EasyInstall.html#custom-installation-locations + http://packages.python.org/distribute/easy_install.html#custom-installation-locations Please make the appropriate changes for your system and try again.""" % ( self.install_dir, os.environ.get('PYTHONPATH','') -- cgit v1.2.1