
At 10:25 PM 12/7/2005 -0800, tgreenwood wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
I'm new to distutils/and the egg system. I have not researched the archives as much as I should, so please excuse me if this is familiar territory...
Q: Is it possible for dependency checks to work for non pipy deployed eggs? - A.egg - B.egg (setup_requires and install_requires A.egg) - email A and B eggs to friend - tell friend to : easy_install B - but B.egg does not install A...in fact, in my test case, it fails b/c it cannot find A in pipy
This will work if the eggs are both in the current directory: easy_install -f. B -f (aka --find-links) specifies URLs or directories that will be scanned *before* going to PyPI to meet dependencies.
- in this example, what happens if friend does not have net connection on target machine? how can they install from the eggs alone and get the dep checking to work?
No net connection is necessary if all dependencies can be found using -f directories.
Q: How does my friend run the unittests on the egg that they have just installed? As I am developing, I frequently run the unittests and after every bdist_egg build, I also run the unit tests that way, too. How can the consumer do the same?
Well, if it's a unit test suite that's contained within the egg, then they could use the unittest utility just as they normally would.
Q: One of my apps is a command line app, say foo.py is a command line app that takes arg1, arg2,... How can the user run this app when it is encased in an egg?
EasyInstall generates wrapper scripts during installation that ensure the needed eggs are on sys.path and run the scripts. This works for both standard distutils scripts (specified using setup(scripts=[...])) and for entry point scripts (see the setuptools doc). The --script-dir argument to easy_install controls where scripts are installed; it defaults to the same as the installation directory if an installation directory is manually specified; otherwise it defaults to wherever the distutils are configured to install scripts.
Q: How do I define my own pipy? While I like the idea of deploying there for the overall community, I don't want to send my half baked code into the wild. But I'd like to try the general functionality of having a deploy site for my beta customers. How can I set this up?
Using -f with the URL of a web page with download links to your eggs or source distributions. See http://turbogears.org/download/ for one example. In the simplest case, a simple Apache directory listing will do the trick; see http://peak.telecommunity.com/snapshots/ for an example of that approach. Simply having someone use a URL like that with -f ensures that any download links on the page will be given precedence over PyPI listings, if it's possible to meet all requirements that way. Only if a dependency can't be satisfied by links on a -f page, will PyPI be consulted.