bernd / fpm-cookery

A tool for building software packages with fpm.
Other
460 stars 88 forks source link

support for virtualenv #137

Closed skoenig closed 8 years ago

skoenig commented 8 years ago

Because the support for Python virtualenvs has been added to fpm in https://github.com/jordansissel/fpm/commit/ae443f9b7ca0794d1285f96462432f7f1ec6a6f9, it would be nice to have fpm-cookery support it also. This PR implements this.

bernd commented 8 years ago

Thank you for the PR! Can you show me an example recipe so I can understand how will be used? :smile:

skoenig commented 8 years ago

Sure, here is one real-world example:

class ZalandoZcloud < FPM::Cookery::VirtualenvRecipe
  description "Package containing CLI, agent and additional scripts for installing nodes via zCloud"

  name     "zalando-zcloud"
  version  "0.2.8"
  revision  201508101129
  arch     "all"

  homepage      "https://stash.zalando.net/projects/PYMODULES/repos/zalando-zcloud/browse"
  maintainer    "Sören König <soeren.koenig@zalando.de>"

  build_depends "python-virtualenv", "python-setuptools"
  virtualenv_fix_name false
  virtualenv_install_location "/opt/"

end

(There are no further dependencies for this package, because all the Python dependencies are defined in it's setup.py in the install_requires attribute.)

bernd commented 8 years ago

Awesome, thank you! :smile:

bernd commented 8 years ago

@skoenig I just released version 0.31.0 to rubygems. This includes the virtualenv support.

beddari commented 8 years ago

Thanks :heart: