[Distutils] setuptools: .egg-info/ and PKG-INFO
Phillip J. Eby
pje at telecommunity.com
Sat Oct 29 03:14:20 CEST 2005
At 04:30 PM 10/25/2005 -0500, Ian Bicking wrote:
>I'm trying to figure out how I should deal with the .egg-info directory,
>Right now PKG-INFO is being generated from setup.py. So I don't want to
>put it in my source control repository, since it is derivative. But I'm
>maintaining by hand some other files in the .egg-info directory, usually
>custom package metadata that we consume internally, so I need those
>files (and .egg-info) in the repository, and hence in the checkout.
>However, without PKG-INFO lots of things break, as pkg_resources gives a
>ValueError during some operations (e.g.: ValueError: ("Missing
>'Version:' header and/or PKG-INFO file", ProjectName [unknown version]
>(/usr/home/ianb/co/IscapeLib/tests/appsetup/output/Proj-05))) -- this
>happens anytime I iterate over entry points, including when setuptools
>iterates over entry points, which means lots of setup.py commands are
>broken. They are broken simply because the incomplete .egg-info
>directory is on the path, even though I don't need direct access to it.
> I can run setup.py egg_info (creating PKG-INFO) for some reason (that
>I have not yet determined), but not my own custom setup.py extensions.
>This includes stuff like "python setup.py egg_info my_custom_command",
>so I have to write PKG-INFO in a completely separate command.
'setup.py develop' should create the info and put the directory on the path
for you. Likewise, so does 'setup.py test'. Which other commands are
giving you problems?
>So... what do I do here? Should pkg_resources really just ignore
>packages without a PKG-INFO file? At least during scan? If I have to
>live with running setup.py egg_info until 0.6a7, that's fine.
How would pkg_resources then determine what version your package is, if
it's under development? It has to know the version in order to be able to
detect duplicates during scanning, and also to order available packages by
More information about the Distutils-SIG