I need to call easy_install as a function to install some Python eggs from a bunch of servers. Precisely what I install and where I get it from is determined at run-time: For example which servers I use depends on the geographic location of the computer.
Since I cannot guarantee that any single server will always be available, it has been decided that my script needs to check a number of servers. Some locations have prohibitive web-filtering so I need to check a UNC path. Other locations require me to check a mix, as in this example:
myargs = ['-vv', '-m', '-a', '-f', '//filesrver/eggs http://webserver1/python_eggs http://webserver2/python_eggs, 'myproject==trunk-99']
setuptools.command.easy_install.main( myargs )
It seems to work just fine when I do not provide a find-links option (-f) (in this case it just picks up the defaults from distutils.cfg), when I try to specify an additional find-links the option all I get is:
Traceback (most recent call last):
File
"D:\workspace\pythonscripts_trunk\javapy_egg\Scripts\test_javapy.py",
line 20, in ?
result = pyproxy.requireEgg( eggspec , True, hosts )
File
"d:\workspace\pythonscripts_trunk\javapy_egg\src\calyon\javapy\pyproxy.py", line 141, in requireEgg
pkg_resources.require(eggname)
File "d:\python24\lib\site-packages\setuptools-0.6c9-py2.4.egg\pkg_resources.
py", line 626, in require
needed = self.resolve(parse_requirements(requirements))
File "d:\python24\lib\site-packages\setuptools-0.6c9-py2.4.egg\pkg_resources.py", line 524, in resolve
raise DistributionNotFound(req) # XXX put more info here
pkg_resources.DistributionNotFound: myproject==trunk-99
Can somebody confirm the correct way to do this? For example do I use Windows or UNIX slashes in the arguments? What character must be used to seperate multiple URLs?
I'm using setuptools 0.6c9 on Windows32