round-trip from egg to code and back to egg

Discussion in 'Python' started by Catherine, Aug 17, 2007.

  1. Catherine

    Catherine Guest

    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
     
    Catherine, Aug 17, 2007
    #1
    1. Advertising

  2. 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 !-)
     
    Bruno Desthuilliers, Aug 20, 2007
    #2
    1. Advertising

  3. Catherine

    John Nagle Guest

    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
     
    John Nagle, Oct 8, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Peter Row
    Replies:
    1
    Views:
    703
    vMike
    Nov 26, 2003
  2. =?Utf-8?B?WWFuaXI=?=

    Sort table without round trip

    =?Utf-8?B?WWFuaXI=?=, Apr 6, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    759
    Steve Drake
    Apr 6, 2004
  3. Rathtap
    Replies:
    2
    Views:
    514
    Janaka
    Aug 24, 2004
  4. Tony Girgenti
    Replies:
    7
    Views:
    338
    Jasbird
    Apr 1, 2007
  5. Mark Lawrence

    How to round trip python and sqlite dates

    Mark Lawrence, Nov 17, 2013, in forum: Python
    Replies:
    1
    Views:
    97
    Paul Simon
    Nov 17, 2013
Loading...

Share This Page