I am packaging some python modules/packages in order to have dependencies for tahoe-lafs, and finding egg metadata file usage in pkgsrc confusing. The particular package in question is security/py-crypto. After including lang/python/egg.mk, 'make package' (DESTDIR mode) fails with: usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: setup.py --help [cmd1 cmd2 ...] or: setup.py --help-commands or: setup.py cmd --help error: option --single-version-externally-managed not recognized If I comment out that argument in egg.mk, the package builds, but then I have no installed egg info. In python26/patches/patch-av, installation of egg metadata files is disabled unless PY_NO_EGG is defined to other than yes. Setting it to NO in the package causes egg metadata to be installed. It seems the python way is to install these files so that the python requirement system works. There are other egg metadata files installed. With removing --single-version-externally-managed and setting PY_NO_EGG to NO, I get an egg metadata file installed and require works: > python2.6 -c 'import pkg_resources;print pkg_resources.require("pycrypto")' [pycrypto 2.1.0 (/usr/pkg/lib/python2.6/site-packages)] So, 1) Why does PY_NO_EGG default to yes? Should it be set to NO in egg.mk? Or is that about not installing egg metadata in the package directory itself? 2) Is a python module that has setup.py and doesn't implement --single-version-externally-managed broken? My tentative conclusions are: A) that --single-version-externally-managed is the python way for an egg-aware package to be told 1) there will only be one version of this package installed, and 2) the egg data should be in .../site-package so that it will be found by require B) py-crypto is not really 'egg aware' in the modern mainstream sense, but in some more limited sense that still allows require to find it. Do we need to all EGG_OLD_STYLE=YES to cause egg.mk to not add --single-version-externally-managed not set PY_NO_EGG to YES Or perhaps there's another approach - I think the odds my understanding is correct is only about 50%.
Description: PGP signature