[Python-checkins] python/nondist/sandbox/setuptools pkg_resources.py, 1.57, 1.58
pje@users.sourceforge.net
pje at users.sourceforge.net
Sat Aug 6 19:57:08 CEST 2005
Update of /cvsroot/python/python/nondist/sandbox/setuptools
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31572
Modified Files:
pkg_resources.py
Log Message:
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.
Index: pkg_resources.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/setuptools/pkg_resources.py,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -d -r1.57 -r1.58
--- pkg_resources.py 6 Aug 2005 02:30:52 -0000 1.57
+++ pkg_resources.py 6 Aug 2005 17:56:58 -0000 1.58
@@ -1622,8 +1622,8 @@
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 @@
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):
More information about the Python-checkins
mailing list