472,143 Members | 1,580 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,143 software developers and data experts.

round-trip from egg to code and back to egg

I'd like to use Scriptaculous with TurboGears on Python 2.5.
Unfortunately, Scriptaculous is currently in the Cheese Shop only as a
Python 2.4 egg.

If I had the setup.py that was used to generate the egg, I think it
would be really easy to generate a new Python 2.5 egg from the
existing 2.4 egg. In fact, it would be gruntwork we could easily
offload from the package authors.

The trouble is, an egg doesn't include setup.py. Is there any direct
way to round-trip a Python package from egg to installed code and into
a new egg? I might be able to mine enough information from the files
in EGG-INFO to reconstruct setup.py - reverse-engineering - but that
seems unnervingly like work.

Three possibilities come to mind -

1. I'm missing something simple
2. setuptools could be modified to include the original setup.py with
the egg
3. a script could mine EGG-INFO to regenerate setup.py - maybe such a
script has already been written?

Can somebody who understands eggs better comment?

Thanks very much!
- Catherine
http://catherinedevlin.blogspot.com

Aug 17 '07 #1
2 1297
Catherine a écrit :
I'd like to use Scriptaculous with TurboGears on Python 2.5.
Unfortunately, Scriptaculous is currently in the Cheese Shop only as a
Python 2.4 egg.

If I had the setup.py that was used to generate the egg, I think it
would be really easy to generate a new Python 2.5 egg from the
existing 2.4 egg. In fact, it would be gruntwork we could easily
offload from the package authors.

The trouble is, an egg doesn't include setup.py. Is there any direct
way to round-trip a Python package from egg to installed code and into
a new egg?

I might be able to mine enough information from the files
in EGG-INFO to reconstruct setup.py - reverse-engineering - but that
seems unnervingly like work.

Three possibilities come to mind -

1. I'm missing something simple
Probably. I'd say, something like unzip <your-egg-file>.egg !-)
Aug 22 '07 #2
Bruno Desthuilliers wrote:
Catherine a écrit :
>Three possibilities come to mind -

1. I'm missing something simple

Probably. I'd say, something like unzip <your-egg-file>.egg !-)
That's generally the solution to "egg" files. They usually
do the wrong thing, and the "egg" system is still in beta.
They're really .zip files, so just unzip them and ignore the
"egg" crap.

My experience is that every .egg file adds about a half
hour of headaches to an install, since you have to figure
out why it didn't work, or why Python is still using the
old version, or something.

John Nagle
Oct 8 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by joeandtel | last post: by
2 posts views Thread by Matias Silva | last post: by
17 posts views Thread by nomenklatura | last post: by
4 posts views Thread by Fuzzydave | last post: by
7 posts views Thread by kkmigas | last post: by
3 posts views Thread by Krishna.K.1900 | last post: by
4 posts views Thread by =?Utf-8?B?UmVuZQ==?= | last post: by
9 posts views Thread by josh logan | last post: by
reply views Thread by Edwin.Madari | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.