PolicyStat / terrarium

Package and ship relocatable python virtualenvs, like a boss.
https://terrarium.readthedocs.io/en/latest
BSD 3-Clause "New" or "Revised" License
171 stars 14 forks source link

Add option to include distribution/platform name in the remote key format #54

Open kylegibson opened 9 years ago

kylegibson commented 9 years ago

Currently, the default remote-key-format does not distinguish between platforms or distributions.

For example, a terrarium created on ubuntu 10.04 may not be compatible with ubuntu 12.04, even if the architecture and python versions are identical. This can occur if the build had to compile and link against libraries that while present in 10.04, are not present in 12.04. This problem could occur for cross-distribution environments, for example, between ubuntu and say, centos, or RHL.

One benefit of the current default is that for those requirement sets that don't compile and link, you get cross-platform compatibility for free, without having to build separate terrariums for each platform you want to support.

In the meanwhile, for those that do need to distinguish between distributions, you can manually set the remote-key-format to include that information. For example:

terrarium --remote-key-format "%(arch)s-%(python_vmajor)s.%(python_vminor)s-%(digest)s-$(lsb_release -sc)" install requirements.txt

This solution requires the existence of the lsb_release command, and only includes the codename of the release. More information may be desired, so check the options of lsb_release to tailor it to your specific needs.

littleq0903 commented 9 years ago

did you start working on this yet?

I could help out.

kylegibson commented 9 years ago

Hi Colin,

We have not started working on this. It'll probably be a long time before I have the time to address it. Do you have some ideas on how to handle it?

-Kyle