Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > round-trip from egg to code and back to egg

Reply
Thread Tools

round-trip from egg to code and back to egg

 
 
Catherine
Guest
Posts: n/a
 
      08-17-2007
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

 
Reply With Quote
 
 
 
 
Bruno Desthuilliers
Guest
Posts: n/a
 
      08-20-2007
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 !-)
 
Reply With Quote
 
 
 
 
John Nagle
Guest
Posts: n/a
 
      10-08-2007
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
linecache vs egg - reading line of a file in an egg R. Bernstein Python 3 12-21-2008 10:07 AM
how to do easy_install to source code, not egg? dmitrey Python 1 09-18-2008 09:08 AM
Chick and egg,which comes first? Jack Dowson Java 18 09-21-2007 01:36 PM
egg and modpython Wensheng Python 8 09-13-2006 09:36 AM
Data Binding and Edit/Update/Cancel Chicken-and-Egg Problem dcouture@tycoint.com ASP .Net Datagrid Control 1 04-06-2005 11:38 PM



Advertisments