[Distutils] custom egg metadata

"Lutz Pälike" lutz_p at gmx.net
Tue Jan 9 12:34:34 CET 2007

> Your custom writer has to be on sys.path in order to work, but your 
> package_dir isn't on sys.path.

Well this is the case, since i want to use a general setuptools writer and need no fancy custom writer (yet).

> You'll have to either install the writer as a separate egg and use 
> setup_requires to ensure it gets on the path, or else move your 
> package_dir to the setup.py directory.

Ok. But the writer just needs to be importable right? there is no real need to have the package_dir directly alongside the setup.py ?
I have only a single setup.py, but lots of subprojects that i want to keep in subfolders. And there are no setup.py in the project subfolders
but everything is controlled through the single setup.py and a config file within each project.

> The general intention of the design, however, was for egg_info writers to 
> live in a different egg than the one being built, and to be activated 
> using setup_requires.

Ok that's fine.

> Still, you *can* make it work, it's just that you'll have to run the 
> egg_info command (or a command that runs egg_info) more than once in 
> order to get your custom metadata written, because the first time the 
> egg_info is written, your entry points won't be on disk yet.  The second > time, it will.

Ok i tried now what you suggested and it worked as you described if i split the build process in 2 steps.
However it does not if i want to put the two steps in a single script, which indicates that some data is persistent 
and the freshly generated meta information is not yet respected.
I tried to set pkg_resources.working_set , but it does not seem to have the necessary impact for the bdist_egg command.
I guess  the working_set instance is imported at an earlier stage into setuptools and thus does'nt get updated. 

I think the main problems i got is because i want to use setuptools from an api perspective and not from a tool perspective.
Finally i want to integrate the setup script into a gui and make the building accessible to non-developers (this is a necessity).
And because i want to catch exceptions and all that i don't like to use something like os.system() to launch different steps of
the build.

Maybe you can give me some more hints why this fails.
At present i invoke the egg_info and the bdist_egg build step by setting the 'script_args' parameter for each step and call
setup(). As already mentioned this fails.


Lutz Paelike
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

More information about the Distutils-SIG mailing list