| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Installs and configures Python. Also includes LWRPs for managing python packages with pip and virtualenv isolated Python environments.
Poise-python is a vastly better cookbook for managing Python-related things. This cookbook will remain for compatibility but any future release will only be to gut it and turn it into a wrapper for poise-python.
NOTE: The yum cookbook is a dependency of the cookbook, and will be used to install EPEL on RedHet/CentOS 5.x systems to provide the Python 2.6 packages.
See attributes/default.rb for default values.
The file also contains the following attributes:
This cookbook includes LWRPs for managing:
Install packages using the new hotness in Python package management...pip. Yo dawg...easy_install is so 2009, you better ask your local Pythonista if you don't know! The usage semantics are like that of any normal package provider.
# install latest gunicorn into system path
python_pip "gunicorn"
# target a virtualenv
python_pip "gunicorn" do
virtualenv "/home/ubuntu/my_ve"
end# install Django 1.1.4
python_pip "django" do
version "1.1.4"
endvirtualenv is a great tool that creates isolated python environments. Think of it as RVM without all those hipsters and tight jeans.
# create a 2.6 virtualenv owned by ubuntu user
python_virtualenv "/home/ubuntu/my_cool_ve" do
owner "ubuntu"
group "ubuntu"
action :create
end# create a Python 2.4 virtualenv
python_virtualenv "/home/ubuntu/my_old_ve" do
interpreter "python2.4"
owner "ubuntu"
group "ubuntu"
action :create
end# create a Python 2.6 virtualenv with access to the global packages owned by ubuntu user
python_virtualenv "/home/ubuntu/my_old_ve" do
owner "ubuntu"
group "ubuntu"
options "--system-site-packages"
action :create
endInclude default recipe in a run list, to get python, pip and virtualenv. Installs python by package or source depending on the platform.
Installs Python from packages.
Installs Python from source.
Installs pip from source.
Installs virtualenv using the python_pip resource.
Copyright:: 2011, Chef Software, Inc
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
| Back | FazBrowse Home | New Git URL |