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.
A Gemfile is a file that is created to describe the gem dependencies required to run a Ruby program. A Gemfile should always be placed in the root of the project directory.
A gemfile is automatically created when you start a new rails application. type rails new appName and then it will be generated automatically. It will also be populated with some gems.
Ruby comes with RubyGems by default since version 1.9, previous Ruby versions require RubyGems to be installed by hand.
Open up the 'Software Center' app from your launcher and type in `RubyGems` without quotes into the application search box at the top right, and press [enter]. RubyGems then can be installed by just clicking on the button labeled 'Install', thats it.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With