First things first, I am still in the process of learning Python (its best-practices and how things work regarding the whole distribution system), so I am NOT an expert.
I need to create a single package containing a specific Python binary (let's say v2.6), a Python script wrote by me and its module dependencies (2 modules -argparse
and yaml
-).
I want them all packaged for the following reasons :
- The boxes on which I'll deploy the script don't have the same Python version (ranges from v2.3x to v2.6x)
- I cannot rely on installing manually the Python modules because they are not always packaged on the repositories
- I cannot write my code without at least one of the modules because it is needed to parse a YAML file
- I obviously cannot upgrade Python on all the boxes
What I tried :
- I used
cx_Freeze
to create a bundle (containing my script + theargparse
andyaml
modules) but since some of the methods used throughout the code are not Python2.3-compliant, it refused to run - I tried creating a self-executing Python egg but either I did
something wrong or I was faced with the same problems as with
cx_Freeze
I hope I am not asking for the impossible but, at least, I would like to have some feedbacks about developping Python script on such an heterogeneous environment (Python v2.3 to v2.7) and its dependencies nightmare.
Thank you all in advance.
Regards.