6

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.

2

1 Answer 1

15

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.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.