[Distutils] Limitations of setup_requires

Joshua Boverhof JRBoverhof at lbl.gov
Tue Oct 3 03:04:56 CEST 2006


I have a package specified in both "setup_requires" and  
"install_requires", the package is downloaded and used during setup  
but it is never installed in site-packages like the other entry.   
This is happening on both my Mac and a Linux box.

This fails for me with setuptools-0.6c3, python2.5, but works with w/ 
python2.4

Here is what I'm doing:

           install_requires=[
               "ZSI >= 1.2.0rc2", "4Suite-XML >= 1.0rc4",
           ],

           setup_requires=[
               "ZSI >= 1.2.0rc2",
           ],

ssh1:%python setup.py install


Now if I remove it from "setup_requires" and remove the egg  
(otherwise it does nothing):

%rm ZSI-2.0_rc2-py2.5.egg


           install_requires=[
               "ZSI >= 1.2.0rc2", "4Suite-XML >= 1.0rc4",
           ],

           setup_requires=[
           ],


boverhof at pabst(341)-ssh1:%rm ZSI-2.0_rc2-py2.5.egg
boverhof at pabst(342)-ssh1:%rm -rf pyGridWare.egg-info/boverhof at pabst 
(343)-ssh1:%python setup.py install --force

It now installs.

Reading http://www.python.org/pypi/ZSI/2.0-rc2
Best match: ZSI 2.0-rc2
Downloading http://cheeseshop.python.org/packages/source/Z/ZSI/ 
ZSI-2.0-rc2.tar.gz#md5=25b3ab7a3ff8285d51c35c223359c060
Processing ZSI-2.0-rc2.tar.gz
Running ZSI-2.0-rc2/setup.py -q bdist_egg --dist-dir /tmp/ 
easy_install-kps9vS/ZSI-2.0-rc2/egg-dist-tmp-pQbxQp
zip_safe flag not set; analyzing archive contents...
Adding ZSI 2.0-rc2 to easy-install.pth file


Has anyone else noticed this behavior?
-josh



On Oct 1, 2006, at 6:40 PM, Phillip J. Eby wrote:

> At 06:20 PM 10/1/2006 -0700, Joshua Boverhof wrote:
>> Yes it is since I'm "generating" code when I do
>> "make_generated_packages".
>
> Okay, then before you call setup() in your setup script, create an  
> instance of setuptools.dist.Distribution() that has setup_requires  
> set, but doesn't include any packages; and don't do anything  
> besides create it.  Then, run your package generation, and finally  
> run setup().  You do not need a custom Distribution subclass, as  
> far as I can tell.
>
> The only disadvantage to doing it this way is that if somebody does  
> "setup.py --help", your package is still going to do dependency  
> downloads and code generation.  But then, that also happens the way  
> you're doing it now.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2526 bytes
Desc: not available
Url : http://mail.python.org/pipermail/distutils-sig/attachments/20061002/f3ddcd3c/attachment.bin 


More information about the Distutils-SIG mailing list