Here is a sample scenario :

Start from a new directory say /myapps . Install a separate (pre-compiled or source) python to say ./usr/bin (relative to installation directory and not system /usr/bin) and install various eggs to this custom python . This can be done using perhaps something like buildout .

Now another user having the same OS version just rsync's the folder maitaining the exact folder structure, will he be able to use python just like the other user . Does he have to really install stuff again ?

I thought most of the Linux package manager works like this with /myapps analogous to what /usr is i.e a default convention as to where files should be kept . Compilation is not mandatory unless you want to optimize like the gentoo installation . In other words I think what most package manager do is :

1) Requirements check

2) Copy/Paste of pre-compiled stuff to a standard location like /usr/lib /usr/bin

3) Do a menu update

Some preconditions in the first machine :

Install everything within this directory and not outside of it . It is run as a normal user and no sudo .

In Windows I think this is going to be challenging because of registry etc which I am not sure like normal file system concept . But in *nix should this work as simple as that ?

  • It looks like a virtualization layer is what would solve this issue . Its mainly how we could avoid unneccesary building stuff when its there already . – Nishant Aug 12 '14 at 14:44
  • Docker.com is interesting . It isolates the build from the OS . – Nishant Aug 12 '14 at 15:47

It's perfectly possible (but usually you achieve the same result with making virtualenv and bundling your entire virtualenv root). You'll get in troubles if some of python packages need external libraries and other user doesn't have them installed (that's why you usually do it with virtualenv and pip bundle/pip freeze).

Package manager runs so-called install scripts. They can contain any code but usually they add required users/groups, edit some other configs (because you can't "install" a line in config; the movement to split all *.conf's to *.conf.d helps a bit but we're not even close to finishing it yet) but with most python packages, you'll be fine.

| improve this answer | |
  • Yeah if the scripts start installing to system or skip dependencies then its going to be a mess . But ours is pretty straight forward . We do a type of virtualenv setup - I 'll read up more on virtaulenv though since that is what we really want . – Nishant Aug 12 '14 at 14:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.