Re: python packaging, egg-info file vs. directory

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

 



Joel Andres Granados wrote:
Toshio Kuratomi wrote:
Joel Andres Granados wrote:
Toshio Kuratomi wrote:
Thomas Moschny wrote:
Hi!

Recently encountered a problem with the python-demjson rpm I maintain:
The demjson package does not use setuptools, so, in accordance with
the python packaging guidelines, I used the trick of preloading
setuptools prior to executing setup.py, for F7 and F8 only. This
produces an egg-info directory, fine.

Now, for F9, egg-info is generated automatically, but it turns out
that this produces an egg-info file instead of an directory. This in
turn causes problems when upgrading from F8 to F9, because rpm can't
replace a dir with a file.

Any advices on how to solve this?


Do you have a reason to need eggs on F7 and F8?

Thats strange, I thought it was added because of policy as opposed to reason. Firstaidkit has no need for eggs, but the reviewer insisted on adding to them. FWI, firstaidkit chooses to handle the plugins with rpm, which is a valid alternative to eggs.

Maybe the Guidelines need rewording. Can you point at something in the Guidelines that could be improved to show that using setuptools to add eggs in F7/F8 is optional? (All packages must handle the egg files in F9+ and they must handle eggs created by packages which use setuptools normally. The optional part is when adding eggs to a package which doesn't provide them on its own.)

-Toshio

maybe change it a little:
Change the "when to provide eggs" in http://fedoraproject.org/wiki/Packaging/Python/Eggs
"
Starting with Fedora 9, our python package provides egg-info for any distutils and setuptools packages. Since this establishes a base of functionality that upstream authors can expect, we need to be sure we include those files when needed. In Fedora 8 and below eggs can be provided when the package uses setuptools. In this case eggs are optional. In F9+ eggs have to be provided when the upstream package provides them and are optional when the upstream package does not provide them.
"

That seems a bit confusing to me as it seems to say that if a package builds eggs it is optional whether to include them. We really want to be saying: "If the package builds eggs, you must include them. If the package does not produce eggs you can use this optional setuptools trickery to produce them." Maybe this is clearer:

'''
Since eggs establish a base of functionality that upstream authors can expect, we need to be sure to include the egg files if a package builds them. Starting with Fedora 9, our python package providses egg-info for any package that uses setuptools or distutils to build. In Fedora 8 or less, only setuptools packages build eggs. If you need to provide eggs for a distutils package on Fedora 8 or less, "Providing Eggs using Setuptools" describes a method of substituting setuptools for distutils in the build process so egg-info is built.
'''

If this wording is better, I'll change the page to reflect this.
-Toshio

Attachment: signature.asc
Description: OpenPGP digital signature

-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux