[Distutils] setup_requires not caching downloaded packages?

P.J. Eby pje at telecommunity.com
Tue Jun 23 05:40:28 CEST 2009


At 06:09 PM 6/22/2009 -0400, Barry Warsaw wrote:
>We have a suite of tools in the 'lazr' namespace that we've begun to
>release as open source.  All of these packages are maintained under
>bzr and it's really nice to be able to add this to our setup.py:
>
>setup_requires=['setuptools_bzr']
>
>This extends setuptools so that we can use bzr instead of the built-in
>revision control systems.  With that, 'python setup.py sdist' pulls in
>the right stuff.  All of our packages are buildout based.
>
>The problem is that when we buildout the package, the download cache
>is never consulted and setuptools_bzr is /always/ downloaded.

I don't know what the "download cache" is, so I can't speak to 
that.  However, what I can say is that if you're using "sdist" for 
distribution, you probably don't need that setup_requires line in the 
first place.

When you build an sdist using setuptools, it includes a pre-generated 
file manifest, along with a setup.cfg that forces the right revision 
tag information in the project's version number (if 
applicable).  This is specifically designed so that the person 
building your sdist doesn't need the same revision control system installed.

In short, the only person who needs setuptools_bzr installed is the 
person who's generating the sdists.  So, feel free to drop it from 
setup_requires and be happy.  ;-)



More information about the Distutils-SIG mailing list