aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/dist.py
diff options
context:
space:
mode:
authorPJ Eby <distutils-sig@python.org>2006-03-29 19:23:55 +0000
committerPJ Eby <distutils-sig@python.org>2006-03-29 19:23:55 +0000
commit4da195dc370305433ac4f448c647af8d9fa3691d (patch)
tree9c9c9f115cb1fc758018537f19289d3ee7f5b412 /setuptools/dist.py
parenta8ab614c9791958ee84829221fab38c81a01f816 (diff)
downloadexternal_python_setuptools-4da195dc370305433ac4f448c647af8d9fa3691d.tar.gz
external_python_setuptools-4da195dc370305433ac4f448c647af8d9fa3691d.tar.bz2
external_python_setuptools-4da195dc370305433ac4f448c647af8d9fa3691d.zip
Implement dependency_links feature, courtesy of Tres Seaver's rough
draft of a patch. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4043423
Diffstat (limited to 'setuptools/dist.py')
-rw-r--r--setuptools/dist.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/setuptools/dist.py b/setuptools/dist.py
index 06e7a71a..8e34f35d 100644
--- a/setuptools/dist.py
+++ b/setuptools/dist.py
@@ -211,16 +211,16 @@ class Distribution(_Distribution):
self.features = {}
self.dist_files = []
self.patch_missing_pkg_info(attrs)
+ # Make sure we have any eggs needed to interpret 'attrs'
+ if attrs and 'dependency_links' in attrs:
+ self.dependency_links = attrs.pop('dependency_links')
+ assert_string_list(self,'dependency_links',self.dependency_links)
if attrs and 'setup_requires' in attrs:
- # Make sure we have any eggs needed to interpret 'attrs'
self.fetch_build_eggs(attrs.pop('setup_requires'))
-
for ep in pkg_resources.iter_entry_points('distutils.setup_keywords'):
if not hasattr(self,ep.name):
setattr(self,ep.name,None)
-
_Distribution.__init__(self,attrs)
-
if isinstance(self.metadata.version, (int,long,float)):
# Some people apparently take "version number" too literally :)
self.metadata.version = str(self.metadata.version)
@@ -246,7 +246,6 @@ class Distribution(_Distribution):
def finalize_options(self):
_Distribution.finalize_options(self)
-
if self.features:
self._set_global_opts_from_features()
@@ -256,7 +255,6 @@ class Distribution(_Distribution):
ep.require(installer=self.fetch_build_egg)
ep.load()(self, ep.name, value)
-
def fetch_build_egg(self, req):
"""Fetch an egg needed for building"""
try:
@@ -273,18 +271,20 @@ class Distribution(_Distribution):
for key in opts.keys():
if key not in keep:
del opts[key] # don't use any other settings
+ if self.dependency_links:
+ links = self.dependency_links[:]
+ if 'find_links' in opts:
+ links = opts['find_links'][1].split() + links
+ opts['find_links'] = ('setup', links)
cmd = easy_install(
dist, args=["x"], install_dir=os.curdir, exclude_scripts=True,
always_copy=False, build_directory=None, editable=False,
- upgrade=False, multi_version=True
+ upgrade=False, multi_version=True, no_report = True
)
cmd.ensure_finalized()
self._egg_fetcher = cmd
-
return cmd.easy_install(req)
-
-
def _set_global_opts_from_features(self):
"""Add --with-X/--without-X options based on optional features"""