tech-pkg archive

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

Re: patch: handling python distutils and egg files

Thomas Klausner <> writes:

> On Sat, Jul 24, 2010 at 08:37:19AM -0400, Greg Troxel wrote:
>> I realize your goal, but I don't follow your proposed mechanism.  I
>> think that a distutils-using PLIST needs to contain:
>>   ${PLIST.eggfile}${PYSITELIB}/${EGG_FILE}
>> to have the egg file for 2.5+ and not for 2.4.  My awk pattern was
>> intended to generate that.  Can you say what line should be in the
> I had hoped the gsub would work and
> would be sufficient.

I don't quite follow; the gsub is only for print-PLIST; the real issue
is what should be in PLIST.

That's not sufficient, because when the package is built with Python
2.4, there will be no egg file created, and thus there should be no
PLIST entry for it.

If python 2.4 were removed from pkgsrc, we could make the following

  remove notion of PY_NO_EGG and python2[56]/patches/patch-av

  remove all this condition eggfile stuff and just put
  ${PYSITELIB}/${EGG_FILE} in PLIST of distutils packages.

> Do all distutils eggs look like ${PYSITELIB}/${EGG_FILE} ?

I don't know.  I have just come to understand all of this because it was
necessary to in order to package tahoe-lafs.

> Then we could add a ${PYDISTUTILS_EGG} line in PLIST, which would get
> replaced with a @comment for python2.4 and with the proper filename
> for newer pythons. What do you think of that?

Yes, that probably is ok, but then if we find a distutils package that
doesn't install an eggfile, we'll have a mess, but I suppose we can add
a variable to declare that and suppress the PLIST entry.  Perhaps
"EGG_FILE= #empty" would sufice.  (PY_NO_EGG is not that variable;
that's a _command_ to the python infrastructure not to create an egg
file when it otherwise would.)

I find the ${PLIST.eggfile} method to have reduced magic compared to
automatically inserted entries, and thus IMHO easier to figure out.
OTOH, not needing to touch PLIST makes converting packages to use easier.

If you want to hack on this, I certainly don't object.  Certainly fixing
the PRINT_PLIST_AWK production to work would be really nice, but perhaps
it's easier to make it automatic and skip that.

I am not inclined to go on a PYDISTUTILSPKG=YES/ => conversion rampage.
But now people can convert packages when the egg file is needed.

Attachment: pgpUIURVLeBAr.pgp
Description: PGP signature

Home | Main Index | Thread Index | Old Index