Using eggs

O

oj

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
 
M

Mike

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,120
Latest member
ShelaWalli
Top