Bundling an application with third-party modules
Ben Finney
bignose+hates-spam at benfinney.id.au
Wed Jun 14 20:57:15 EDT 2006
"Serge Orlov" <Serge.Orlov at gmail.com> writes:
> Ben Finney wrote:
> > That's a large part of my question. How can I lay out these
> > modules sensibly during installation so they'll be easily
> > available to, but specific to, my application?
>
> Put them in a directory "lib" next to the main module and start the
> main module with the following blurb:
> ------------------------------------------------
> import sys, os
> sys.path.insert(1, os.path.join(sys.path[0],"lib"))
> ------------------------------------------------
The application consists of many separate programs to perform various
tasks, some larger than others. There's no sensible place for a "main
module".
There probably will be a library directory for common code,
though. Are you suggesting that the third-party libraries should go
within the application-native library?
What's a good way to get from upstream source code (some of which is
eggs, some of which expects 'distutils' installation, and some of
which is simple one-file modules) to a coherent set of application
library code, that is automatable in an install script?
I could muddle through and hack something together, of course. I'm
asking what are the ways that have already been found to work well.
--
\ "Friendship is born at that moment when one person says to |
`\ another, 'What! You too? I thought I was the only one!'" -- |
_o__) C.S. Lewis |
Ben Finney
More information about the Python-list
mailing list