[Distutils] .egg in Debian summary?

Vincenzo Di Massa hawk78_it at yahoo.it
Wed Nov 23 16:39:58 CET 2005


Alle 07:17, mercoledì 23 novembre 2005, Bob Tanner ha scritto:

> 1. Do nothing, go with the status quo as documented in the Debian python
> policy, which is no .egg's and unpackage everything into a sub-directory of
> site-packages.
>
> 2. Investigate easydeb <http://cheeseshop.python.org/pypi/easydeb/>
>
> 3. Using Phillip's .egg-info solution
> <http://permalink.gmane.org/gmane.comp.python.distutils.devel/2567>
>
2 & 3 can be merged using easy-deb with the right template of debian/rules.

even 1 & 1 can be merged using easy-deb to create a package that the debian 
developer will manually patch to remove/change egg functionality.

I think setuptools could really help Debian developer as well as Fedora, 
Mandriva, Gentoo... by:
1) providing functionality to install files outside of egg dir/zip (for 
example one could install code to site-packages and data-files to /usr/share/ 
or somewhere else)
2) providing a "fakeroot" option to fool setup.py (for example I want 
setuptools to install the files in debian/tmp/usr/lib/pythonX.Y/site-packages 
and scripts in debian/tmp/usr/bin and everithing must work when it copied 
to /usr/{bin,lib}.
2) providing a paseable output with setup process data like: dependencies 
(meet and unmett), files installed, author, license, and so on

All this will let people just "convert" the output of setuptools into an rpm 
specfile, debian dir, gentoo ebuild and so on.
All that is needed is just a common metadata format that can be parsed by 
tools like easy-deb, easy-rmp easy-ebuild easy-(???).
This way setuptools provides the information to distribution maintainers in a 
well documented, api independent way. Distribution maintainers can use this 
info to reorganize, repackage, invent new package formats, but without 
involving setuptools and python developers.

About the pythonpath and pth files handlind:
if a project A really wants to use project B eggs it can easily require them 
without the need for a pth file.
If project C wants to use project B, but project C is not setuptools aware one 
could patch project C (just adding require() to it) instead of paching 
project B and project A removing egg support from them.

Onother possible solution would be to have:
python-A
python-pypi-A
python-B
python-pypi-B
python-C

Where 
python-B) depends on python-pypi-A and just provides the pth file (handled 
like easy-deb does)
python-pypi-B) contains the egg

So project C will depend on python-B, which will install the pth. But if 
project B is required just by project A which is setuptools aware the 
dependency will be on python-pypi-B: the pth file will not be installed.

Vincenzo

	

	
		
___________________________________ 
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB 
http://mail.yahoo.it


More information about the Distutils-SIG mailing list