diff options
| author | PJ Eby <distutils-sig@python.org> | 2005-08-06 17:56:58 +0000 |
|---|---|---|
| committer | PJ Eby <distutils-sig@python.org> | 2005-08-06 17:56:58 +0000 |
| commit | a762d97ea517f64a405d82ad7acaa85d3eb30c39 (patch) | |
| tree | 4524d91b9b4c2fe0818dc213e932d24f5673ce87 /pkg_resources.py | |
| parent | f1e355b26b01275b070dc69457562c7623f8aea5 (diff) | |
| download | python-setuptools-git-a762d97ea517f64a405d82ad7acaa85d3eb30c39.tar.gz | |
Allow specifying an environment and/or installer for entry-point loading.
This will be used by setuptools to automatically install eggs that may be
needed as part of a build process, or to invoke a particular command.
--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041179
Diffstat (limited to 'pkg_resources.py')
| -rw-r--r-- | pkg_resources.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg_resources.py b/pkg_resources.py index 1a9b594c..6e040d08 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1622,8 +1622,8 @@ class EntryPoint(object): def __repr__(self): return "EntryPoint.parse(%r)" % str(self) - def load(self, require=True): - if require: self.require() + def load(self, require=True, env=None, installer=None): + if require: self.require(env, installer) entry = __import__(self.module_name, globals(),globals(), ['__name__']) for attr in self.attrs: try: @@ -1632,11 +1632,11 @@ class EntryPoint(object): raise ImportError("%r has no %r attribute" % (entry,attr)) return entry - def require(self): + def require(self, env=None, installer=None): if self.extras and not self.dist: raise UnknownExtra("Can't require() without a distribution", self) map(working_set.add, - working_set.resolve(self.dist.requires(self.extras))) + working_set.resolve(self.dist.requires(self.extras),env,installer)) #@classmethod def parse(cls, src, dist=None): |
