471,354 Members | 1,851 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,354 software developers and data experts.

Using eggs

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
Jan 11 '08 #1
1 1122
On Jan 11, 10:33 am, oj <ojee...@gmail.comwrote:
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
Jan 11 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Stephen Ferg | last post: by
1 post views Thread by Srijit Kumar Bhadra | last post: by
3 posts views Thread by Mike Orr | last post: by
2 posts views Thread by nisimura | last post: by
17 posts views Thread by Harry George | last post: by
reply views Thread by XIAOLAOHU | last post: by

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.