tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

python egg info

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

After including lang/python/, 'make package' (DESTDIR mode) fails

  usage: [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: --help [cmd1 cmd2 ...]
     or: --help-commands
     or: cmd --help

  error: option --single-version-externally-managed not recognized

If I comment out that argument in, 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)]


1) Why does PY_NO_EGG default to yes?  Should it be set to NO in
Or is that about not installing egg metadata in the package directory

2) Is a python module that has 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 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%.

Attachment: pgpkDVTsjafYt.pgp
Description: PGP signature

Home | Main Index | Thread Index | Old Index