At 08:24 PM 12/8/2006 +0200, Ilias Lazaridis wrote:
Retrieving a few values directly from the setup.py (instead from an egg-info) would be fast and without any dependency.
In order to invoke run_setup to get the data, you must import, *at absolute minimum*: distutils distutils.cmd distutils.core distutils.dist distutils.util distutils.errors distutils.command distutils.command.install distutils.command.sdist distutils.command.install_lib setuptools setuptools.dist setuptools.depends setuptools.extension setuptools.command setuptools.command.install setuptools.command.sdist setuptools.command.install_lib Pyrex.Distutils.build_ext (if it's installed) And I didn't even go through all of these modules to see what *they* import. It also ignores any customization features usage. And you want to do all this, to avoid writing cache files?
If a project uses custom egg-info or other setuptools extensions, you must import those as well. All of this, to avoid writing some data to disk that could then be read simply and directly without involving any of those other imports! The redundancy you're complaining about is a major enhancement to startup performance.
eggs can cover 'light' needs and 'heavy' needs.
Possibly for the 'heavy' needs its an enhancement.
But for the 'light' needs, the overall overhead is (from my point of view) inacceptable.
That's because you're not paying attention to anyone's needs but your own. The use cases you consider "heavy" may be considered "light" by other people. Anything that one person does not happen to need, they will consider "heavy". Someone who doesn't use entry points, for example, will consider *your* use of them to be "heavy", even as you consider their other egg_info uses to be "heavy" instead of "light", as they consider those uses to be. Thus, your view of the situation is extremely self-centered, especially since you've received plenty of help in how to minimize the overhead -- it requires you to run a single command before checkin or source distribution, and *only* in the case where you have changed your version number or entry points. If that's too much work for you, then this is indeed the wrong toolset for you. You should instead spend large amounts of time developing and testing your own system, so that you can save that handful of keystrokes needed to type "setup.py egg_info" every once in a while. Good luck to you on that. :)
As I've said, an ability to auto-generate egg_info if a setup.py is newer than the corresponding PKG-INFO might be a useful feature. However, trying to do without generating it at all, simply isn't going to happen.
I understand.
Thus the only way to avoid "egg-info" is to avoid setuptools.
Correct. Your choices are as follows: 1. get used to typing "setup.py egg_info" when you change your project's version number or entry points 2. write a script or alias to do it for you whenever you check your code in, or 3. reinvent the wheel so you can save a minute or two doing one of the above. If you choose #3, I sure hope it is because you're doing this for a hobby or personal project, because if you aren't, then you are defrauding your employer or client by diverting their funds for your personal enjoyment at wheel reinventing, while providing them with no additional benefits.