Using eggs

Discussion in 'Python' started by oj, Jan 11, 2008.

  1. oj

    oj Guest

    Hi all!

    As is about to become apparent, I really don't know what I'm doing
    when it comes to using eggs.

    I'm writing some software that is going to be deployed on a machine as
    a number of eggs. Which is all well and good.

    These eggs all end up depending on each other; modules in egg A want
    to import modules in egg B etc.

    It's not really practical to add the path to each individual egg to
    the PYTHONPATH (although there's all in a directory that is in
    PYTHONPATH).

    Do I have to add boiler-plate code to the beginning of all the modules
    with these dependencies to check if modules are available and require
    the eggs if they aren't? Or is there a way I can have stuff 'just
    work' as it does in the development environment when the modules
    haven't been bundled up into eggs?

    On a similar note, I can't seem to get the automatic script creation
    stuff in setuptools to create scripts that have additional
    requirements. I tried defining extra requires giving the names of
    other eggs that will be required, and then specifying these as extras
    to the console_scripts, but the generated scripts were no different.
    Am I doing something wrong? Or am I just not understanding something?

    I'm muddling through getting this all working at the moment, but I get
    the distinct impression that there's a better (correct?) way that I'm
    not aware of.

    Sorry for such a vague posting.

    -Oli
    oj, Jan 11, 2008
    #1
    1. Advertising

  2. oj

    Mike Guest

    On Jan 11, 10:33 am, oj <> wrote:
    > Hi all!
    >
    > As is about to become apparent, I really don't know what I'm doing
    > when it comes to using eggs.
    >
    > I'm writing some software that is going to be deployed on a machine as
    > a number of eggs. Which is all well and good.
    >
    > These eggs all end up depending on each other; modules in egg A want
    > to import modules in egg B etc.
    >
    > It's not really practical to add the path to each individual egg to
    > the PYTHONPATH (although there's all in a directory that is in
    > PYTHONPATH).
    >
    > Do I have to add boiler-plate code to the beginning of all the modules
    > with these dependencies to check if modules are available and require
    > the eggs if they aren't? Or is there a way I can have stuff 'just
    > work' as it does in the development environment when the modules
    > haven't been bundled up into eggs?
    >
    > On a similar note, I can't seem to get the automatic script creation
    > stuff in setuptools to create scripts that have additional
    > requirements. I tried defining extra requires giving the names of
    > other eggs that will be required, and then specifying these as extras
    > to the console_scripts, but the generated scripts were no different.
    > Am I doing something wrong? Or am I just not understanding something?
    >
    > I'm muddling through getting this all working at the moment, but I get
    > the distinct impression that there's a better (correct?) way that I'm
    > not aware of.
    >
    > Sorry for such a vague posting.
    >
    > -Oli


    I know when I've asked questions about eggs and setup-tools, I was
    referred to the Distutils user group. I would cross-post there for
    double the fun!

    http://mail.python.org/mailman/listinfo/distutils-sig

    Mike
    Mike, Jan 11, 2008
    #2
    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. Rene Pijlman
    Replies:
    22
    Views:
    727
    Fredrik Lundh
    Dec 10, 2003
  2. Stephen Ferg
    Replies:
    2
    Views:
    287
    Stephen Ferg
    May 20, 2004
  3. Replies:
    9
    Views:
    474
    Paul Boddie
    Jan 4, 2006
  4. Christoph Zwerschke

    ihooks and Python eggs

    Christoph Zwerschke, Mar 1, 2006, in forum: Python
    Replies:
    0
    Views:
    356
    Christoph Zwerschke
    Mar 1, 2006
  5. Marcus
    Replies:
    2
    Views:
    386
Loading...

Share This Page