FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 04-14-2008, 04:00 PM
"Thomas Moschny"
 
Default python packaging, egg-info file vs. directory

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?

- Thomas

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 04-14-2008, 10:13 PM
Toshio Kuratomi
 
Default python packaging, egg-info file vs. directory

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?

If not, then the answer is simply to not provide eggs on F7 and F8.
Note: If you've already pushed out packages for F7 and F8 you'll need to
wait until the next upstream release to make this change.


-Toshio

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 04-15-2008, 11:49 AM
"Thomas Moschny"
 
Default python packaging, egg-info file vs. directory

2008/4/15, Toshio Kuratomi <a.badger@gmail.com>:
> Do you have a reason to need eggs on F7 and F8?

Not really. Just for completeness.

> If not, then the answer is simply to not provide eggs on F7 and F8. Note:
> If you've already pushed out packages for F7 and F8 you'll need to wait
> until the next upstream release to make this change.

They are only in f7/f8-updates-testing, so I could also make the
change now, I guess.

Nevertheless, I wonder why rpm can't replace an (unaltered) directory
with a file. A deinstall/install cycle would work without problems.

- Thomas

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 04-15-2008, 03:20 PM
Toshio Kuratomi
 
Default python packaging, egg-info file vs. directory

Thomas Moschny wrote:

2008/4/15, Toshio Kuratomi <a.badger@gmail.com>:

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


Not really. Just for completeness.


If not, then the answer is simply to not provide eggs on F7 and F8. Note:
If you've already pushed out packages for F7 and F8 you'll need to wait
until the next upstream release to make this change.


They are only in f7/f8-updates-testing, so I could also make the
change now, I guess.

Nevertheless, I wonder why rpm can't replace an (unaltered) directory
with a file. A deinstall/install cycle would work without problems.

I believe, but someone else may correct me, that it's because of the way
rpm handles the update transaction. It first lays the new files down on
the filesystem then removes the old ones that have not been replaced.
Since a file can't replace a directory at this level, rpm can't do it
either. (To solve this, you'd have to handle the case where a directory
isn't empty when rpm wants to replace it with a file... something that
strikes me as non-trivial.)


-Toshio

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 04-15-2008, 03:26 PM
Joel Andres Granados
 
Default python packaging, egg-info file vs. directory

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.



If not, then the answer is simply to not provide eggs on F7 and F8.
Note: If you've already pushed out packages for F7 and F8 you'll need to
wait until the next upstream release to make this change.


-Toshio



--
Joel Andres Granados

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 04-15-2008, 03:39 PM
Toshio Kuratomi
 
Default python packaging, egg-info file vs. directory

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

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 04-15-2008, 03:44 PM
"Thomas Moschny"
 
Default python packaging, egg-info file vs. directory

2008/4/15, Toshio Kuratomi <a.badger@gmail.com>:
> 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.)

Why do you consider it optional?

The point was, that software like Trac depends on eggs to find its
needed libraries. Creating them should therefore not be optional, even
for older fedora releases.

- Thomas

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 04-15-2008, 04:09 PM
Toshio Kuratomi
 
Default python packaging, egg-info file vs. directory

Thomas Moschny wrote:

2008/4/15, Toshio Kuratomi <a.badger@gmail.com>:

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.)


Why do you consider it optional?

The point was, that software like Trac depends on eggs to find its
needed libraries. Creating them should therefore not be optional, even
for older fedora releases.

Does trac use this library? If not, then it should definitely be
optional. eggs are only generated if 1) the upstream package uses
setuptools or 2) python-2.5 is being used. For trac to depend on
packages providing eggs that don't build with setuptools is limiting
trac to python-2.5.


Our addition of setuptools to provide eggs when upstream does not use
setuptools itself, is something of a kludge. We should not use it
unless the packager deems it to provide useful value for the particular
package they are working on.


Note: F-8's python-2.5 which disables egg generation in distutils is
also a kludge. And one that turned out to have poor side effects. So
the guidelines give us a method to workaround that deficiency. But when
there's no problem (because nothing is depending on the egg-info in
order to function) there's no reason to kludge around the kludge.


-Toshio

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 04-15-2008, 04:32 PM
Joel Andres Granados
 
Default python packaging, egg-info file vs. directory

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.
"
What do you think about this?

--
Joel Andres Granados

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 04-15-2008, 04:35 PM
"Thomas Moschny"
 
Default python packaging, egg-info file vs. directory

2008/4/15, Toshio Kuratomi <a.badger@gmail.com>:
> Does trac use this library? If not, then it should definitely be optional.
> [...]

Ok, thanks for the explanation.

I'll remove the egg, and consider the question, what were if trac used
that library, of having only academical value

- Thomas

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

Thread Tools




All times are GMT. The time now is 04:31 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org