At 10:41 AM 3/15/2006 -0600, Ian Bicking wrote: >Phillip J. Eby wrote: >>At 10:31 AM 3/15/2006 -0600, Ian Bicking wrote: >> >>>Phillip J. Eby wrote: >>> >>>>That's because you're using 'install' rather than 'bdist_rpm'. If for >>>>some reason you can't use bdist_rpm, you should use the >>>>--single-version-externally-managed option to the 'install' command, >>>>which tells easy_install that you're building a system package, so it >>>>won't try to do dependencies and it won't build an egg file or >>>>directory. Instead, it will install packages in the "traditional" way, >>>>with the addition of a .egg-info/ directory that contains the package's >>>>metadata so it will still work correctly at runtime. >>> >>> >>>One thing that came up is that --single-version-... doesn't seem to work >>>with Paste's namespace packages. >> >>How so? > >Well, I should say, it *works*, but as RPMs it doesn't work, because they >all write to the same __init__.py. They all write the same content to >__init__.py, but RPM doesn't like that.
Well, you can work around this, but it's a pain because it makes it impossible for you to use setup.py develop. What you do is delete the __init__.py from all the packages, except for a special extra project that includes only the __init__.py. Then you make all the packages depend on that one. (And each package with a missing __init__ needs to have the package name explicitly listed in setup(), since find_packages() won't see it's there otherwise.) At that point, setuptools will add automatically-created __init__.py files into any eggs it makes, but it will not include them in --single-version-externally-managed installs. The downside, however, is that it makes "setup.py develop" useless for the original source packages. IOW, right now there isn't a good solution for using namespace packages with system packagers that use --single-version-externally-managed, and which don't accept any files in common between different system packages. Ideas for solutions are welcome. :) _______________________________________________ Distutils-SIG maillist - [email protected] http://mail.python.org/mailman/listinfo/distutils-sig
