Re: [Distutils] setuptools passing arguments/settings to dependencies' dependencies
At 12:42 PM 5/4/2010 -0700, Kent wrote:
To accomplish this, with version c9, I added the following lines to setup.cfg: ------------------------------------------- [easy_install] find_links = ../../thirdparty -------------------------------------------
Does this still work if you run "easy_install ." instead of "setup.py install"?
Does this still work if you run "easy_install ." instead of "setup.py install"?
No, when I try this it attempts to download from the internet: "Downloading http://pypi.python.org/packages/source/P/Paste/Paste-1.7.3.1.tar.gz#md5=743d..." while processing a dependency's dependency. This happens despite the fact that I have this section in setup.cfg: ========================================= [easy_install] index_url = ../../thirdparty # only allow thirdparty installations, so we don't have version # incompatibilties by downloading from web... allow_hosts = None ========================================= Like I mentioned, I do have a workaround in place that is working for me. I post it here in case it may help others: ________________________________________________________________________________________ ________________________________________________________________________________________ try: from setuptools import setup, find_packages except ImportError: from ez_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages #kb, now create a .pydistutils.cfg file in the home directory # so that we have control over dependencies' dependencies. # for example, when we instead tg.devtools below, we don't # want it to go to the internet either. import os thirdparty_location = os.path.abspath(os.path.dirname(__file__) + '../../thirdparty') cfgfilename=os.path.expanduser('~/.pydistutils.cfg') cfgfile = open(cfgfilename, 'w') cfgfile.write(""" [easy_install] index_url = """ + thirdparty_location + """ allow_hosts = None """) cfgfile.close() setup( name='pylotengine', version='0.1', ... [ reset of setup() function call] ... ) #kb # now remove our .pydistutils.cfg os.unlink(cfgfilename) ________________________________________________________________________________________ ________________________________________________________________________________________
participants (2)
-
Kent
-
P.J. Eby