473,320 Members | 1,900 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 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 1347
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: joeandtel | last post by:
If I have a value that is 53.123499999, how can I round it to 53.12?
2
by: Matias Silva | last post by:
Can anybody tell me why I am getting rounding errors using the ROUND function. 3.7125 rounds to 3.70 when I use the following: TRUNCATE(ROUND(units_pay_amount * fees_amount, 2),2))) The correct...
6
by: Penguin | last post by:
At some long ago time Steve Jorgensen answered thus: Subject: Re: How can I round a time? Newsgroups: comp.databases.ms-access Date: 1998/12/11 Access represents a date internally as a double...
17
by: nomenklatura | last post by:
Hi, System.Math.Round function is confused me. for example i want to round 3.245 in with decimal symbol Result should be = 3.25 When i try to this in vb: A = 3.245 X = Round(A, 2) then...
4
by: Fuzzydave | last post by:
I have been using a round command in a few places to round a value to zero decimal places using the following format, round('+value+', 0) but this consistantly returns the rounded result of...
7
by: kkmigas | last post by:
Can some one explain if this can be fixed using php.ini settings ? echo "round 20.545 -".round(20.545,2)."<br>"; echo "round 20.555 -".round(20.555,2)."<br>"; echo "number_format 20.545...
3
by: Krishna.K.1900 | last post by:
Does round() always perfectly return the output expected or are there some artifacts which don't allow perfect functionality Using python 2.5: 12.23 12.234 12.199999999999999 but was...
4
by: =?Utf-8?B?UmVuZQ==?= | last post by:
Hello everyone I have a problem with Math.Round, it´s ocurring some strange: Math.Round(12.985) = 12.98, it´s wrong. It should be: 12.99 Why?? What is the problem? Help ME !!!!
9
by: josh logan | last post by:
Hello, I need a round function that _always_ rounds to the higher integer if the argument is equidistant between two integers. In Python 3.0, this is not the advertised behavior of the built-in...
0
by: Edwin.Madari | last post by:
>>round(76.1, -2) 100.0 80.0 76.0 builtin function round, will work for you...... Help on built-in function round in module __builtin__: round(...) round(number) -floating point number
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.