Question

So I have a ruby sinatra program that runs on a server and I have a Gem file to ensure all its dependancies are installed. However it calls a python script which has its own python module dependancies. Thus when it deploy to server all the ruby gems dependancies are fine but not they python dependancies.

Is there a python equivalent of a Gem file? Or is there a way for me to install the python modules via the Gem file?

buildr has been suggested to me but that seems to be for a java based program.

Any help would be much appreciated.

Was it helpful?

Solution

Installing packages (gem install)

pip install mypackage

Dependencies and bulk-install(gemfile)

Use pip's requirements.txt files. It's a txt document of the required packages with any version contraints. Example:

django==1.5
fabric>1.2
South==0.7.3

You would then install those dependencies with:

$ pip install -r requirements.txt

You can then execute those files after install. Example:

$ pip install gunicorn
$ gunicorn -h

Package gems for install. For that, there is pip bundle and pip zip/unzip

That's the only way I know to bundle and deploy dependencies with python. Hope that helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top