Build and runtime dependencies

Chris Angelico rosuav at gmail.com
Fri Dec 21 11:03:10 EST 2012


On Fri, Dec 21, 2012 at 9:11 AM, Jack Silver <jacksilver045 at gmail.com> wrote:
> On the first one (the server), I want to build install python 3.3.0 in a
> shared filesystem and access it from the second one (the client).

Correct me if I'm wrong, but my understanding of your description is this:

System #1 ("server"): Full development environment, C compiler, etc, etc.
System #2 ("client"): Run-time only, uses the Python built on System #1.
System #3->N: Identical to System 2.

This is definitely a viable setup, but you need to make sure the
server and clients are running "broadly similar" systems - for
instance, they should both be the same architecture (eg amd64), and
for convenience, probably should be similar Linux kernel versions and
file system layouts, so you don't have to worry about pathing messes
and so on.

On the server, you'll need all the development tools, all the dev
packages for your libraries, and so on (as Hans said, Debian has
packages like libbz2-1.0 and libbz2-dev); on the clients, you need
only the run-times. The easiest way, I've found, is an iterative
process of build, see what didn't work, grab another package (in my
case, "apt-get install"), rinse and repeat; in this case, you'll want
to do this exercise on the server, grabbing -dev packages, and then
repeat it on the client, referring to your list of libraries as a
"will likely need this" hint set. (But you might not; chances are you
have some of the runtimes already.)

One thing to beware of. You say you're planning to use a shared
filesystem; that may cause some hassles when you come to do a
recompile. I would recommend, at the very least, running some kind of
separate "install" step after building, copying the necessary files
onto the shared filesystem - that way, if you upgrade to a new version
of Python and it doesn't build for some reason (back to needing more
packages, perhaps, or maybe you like to live on the edge and you
picked up the very latest and it happened to not work), you haven't
toasted all your clients. But this might not be an issue for you.

ChrisA



More information about the Python-list mailing list