Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

The python cookbook has been deprecated

Author provided reason for deprecation:

The python cookbook has been deprecated and is no longer being maintained by its authors. Use of the python cookbook is no longer recommended.

You may find that the poise-python cookbook is a suitable alternative.

RSS

python (19) Versions 1.4.6

Installs Python, pip and virtualenv. Includes LWRPs for managing Python packages with `pip` and `virtualenv` isolated Python environments.

Policyfile
Berkshelf
Knife
cookbook 'python', '~> 1.4.6', :supermarket
cookbook 'python', '~> 1.4.6'
knife supermarket install python
knife supermarket download python
README
Dependencies
Quality 0%

python Cookbook

Build Status

Installs and configures Python. Also includes LWRPs for managing python packages with pip and virtualenv isolated Python environments.

Requirements

Platforms

  • Debian, Ubuntu
  • CentOS, Red Hat, Fedora

Cookbooks

  • build-essential
  • yum

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.

Attributes

See attributes/default.rb for default values.

  • node["python"]["install_method"] - method to install python with, default package.

The file also contains the following attributes:

  • platform specific locations and settings
  • source installation settings

Resource/Provider

This cookbook includes LWRPs for managing:

  • pip packages
  • virtualenv isolated Python environments

python_pip

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.

Actions

  • :install: Install a pip package - if version is provided, install that specific version (default)
  • :upgrade: Upgrade a pip package - if version is provided, upgrade to that specific version
  • :remove: Remove a pip package
  • :user: User to run pip as, for using with virtualenv
  • :group: Group to run pip as, for using with virtualenv
  • :purge: Purge a pip package (this usually entails removing configuration files as well as the package itself). With pip packages this behaves the same as :remove

Attribute Parameters

  • package_name: name attribute. The name of the pip package to install
  • version: the version of the package to install/upgrade. If no version is given latest is assumed.
  • virtualenv: virtualenv environment to install pip package into
  • options: Add additional options to the underlying pip package command
  • timeout: timeout in seconds for the command to execute. Useful for pip packages that may take a long time to install. Default 900 seconds.

Examples

# install latest gunicorn into system path
python_pip "gunicorn"

# target a virtualenv
python_pip "gunicorn" do
  virtualenv "/home/ubunut/my_ve"
end
# install Django 1.1.4
python_pip "django" do
  version "1.1.4"
end
# use this provider with the core package resource
package "django" do
  provider Chef::Provider::PythonPip
end

python_virtualenv

virtualenv is a great tool that creates isolated python environments. Think of it as RVM without all those hipsters and tight jeans.

Actions

  • :create: creates a new virtualenv
  • :delete: deletes an existing virtualenv

Attribute Parameters

  • path: name attribute. The path where the virtualenv will be created
  • interpreter: The Python interpreter to use. default is null (i.e. use whatever python the virtualenv command is using).
  • owner: The owner for the virtualenv
  • group: The group owner of the file (string or id)
  • options : Command line options (string)

Examples

# 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
end

Usage

default

Include default recipe in a run list, to get python, pip and virtualenv. Installs python by package or source depending on the platform.

package

Installs Python from packages.

source

Installs Python from source.

pip

Installs pip from source.

virtualenv

Installs virtualenv using the python_pip resource.

License & Authors

Copyright:: 2011, Opscode, 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.

Dependent cookbooks

build-essential >= 0.0.0
yum-epel >= 0.0.0

Contingent cookbooks

airflow Applicable Versions
aminator Applicable Versions
ansible-tower Applicable Versions
application Applicable Versions
application_python Applicable Versions
artifact-deployer Applicable Versions
askbot Applicable Versions
aws-ec2-assign-elastic-ip Applicable Versions
aws_see_spots_run Applicable Versions
awscli Applicable Versions
backupdir Applicable Versions
base_install Applicable Versions
beanstalkd Applicable Versions
beaver Applicable Versions
boilerplate Applicable Versions
boilerplate_php Applicable Versions
butterfly Applicable Versions
cabot Applicable Versions
carbon Applicable Versions
cassandra-opscenter Applicable Versions
celery-flower Applicable Versions
ceph_micro Applicable Versions
chef_cfn Applicable Versions
chef_install_configure_collectd Applicable Versions
cloudformation-magic Applicable Versions
co-cloudmonkey Applicable Versions
collectd-abiquo Applicable Versions
cyclesafe_chef Applicable Versions
devpi Applicable Versions
diamond_lwrp Applicable Versions
disco Applicable Versions
django Applicable Versions
docker-registry2 Applicable Versions
docker_registry Applicable Versions
duplicity_ng Applicable Versions
elkstack Applicable Versions
et_mesos Applicable Versions
exabgp Applicable Versions
flower Applicable Versions
foreflight_build_agent Applicable Versions
frog Applicable Versions
ftp-cloudfs Applicable Versions
gitlab Applicable Versions
gitlab-server Applicable Versions
gitlabhq Applicable Versions
gitpaste Applicable Versions
glances Applicable Versions
gmvault Applicable Versions
graphite Applicable Versions
graphite-api Applicable Versions
graphite-influxdb Applicable Versions
graphite_lwrp Applicable Versions
grinder Applicable Versions
gunicorn Applicable Versions
harstorage Applicable Versions
htpasswd Applicable Versions
httpie Applicable Versions
infochimps_graphite Applicable Versions
ipynb Applicable Versions
jellyfish Applicable Versions
jones Applicable Versions
kagent Applicable Versions
logstash Applicable Versions
luigi Applicable Versions
mandrel Applicable Versions
mediacore Applicable Versions
meetbot Applicable Versions
meetbot-cookbook Applicable Versions
mercurial Applicable Versions
minecraft Applicable Versions
mirage Applicable Versions
mongodb Applicable Versions
netdevops Applicable Versions
newrelic Applicable Versions
newrelic-ng Applicable Versions
newrelic_meetme_plugin Applicable Versions
oclint Applicable Versions
opencv Applicable Versions
openstack-clients Applicable Versions
openstack-mistral Applicable Versions
openvpnas Applicable Versions
opsworks_python Applicable Versions
pentester Applicable Versions
plexconnect Applicable Versions
polyglot Applicable Versions
postgresql_lwrp Applicable Versions
pygster Applicable Versions
pypi-mirror Applicable Versions
pythonstack Applicable Versions
raxmon-cli Applicable Versions
robot Applicable Versions
sc-mongodb Applicable Versions
scipy Applicable Versions
sentry Applicable Versions
shinken Applicable Versions
skyline Applicable Versions
stack_commons Applicable Versions
stackstorm Applicable Versions
statsite Applicable Versions
subliminal Applicable Versions
supermarket Applicable Versions
supervisor Applicable Versions
tango Applicable Versions
tarsnap Applicable Versions
taskwarrior Applicable Versions
taurus Applicable Versions
thrift Applicable Versions
thumbor Applicable Versions
thumbor_ng Applicable Versions
ut_workstation Applicable Versions
uwsgi Applicable Versions
virtualenvwrapper Applicable Versions
wal-e Applicable Versions
yara Applicable Versions
zeoserver Applicable Versions

Collaborator Number Metric
            

1.4.6 failed this metric

Failure: Cookbook has 1 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric
            

1.4.6 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file

Foodcritic Metric
            

1.4.6 failed this metric

FC064: Ensure issues_url is set in metadata: python/metadata.rb:1
FC065: Ensure source_url is set in metadata: python/metadata.rb:1
FC066: Ensure chef_version is set in metadata: python/metadata.rb:1
FC069: Ensure standardized license defined in metadata: python/metadata.rb:1
FC074: LWRP should use DSL to define resource's default action: python/resources/pip.rb:1
FC074: LWRP should use DSL to define resource's default action: python/resources/virtualenv.rb:1
FC085: Resource using new_resource.updated_by_last_action to converge resource: python/providers/pip.rb:48
FC085: Resource using new_resource.updated_by_last_action to converge resource: python/providers/pip.rb:62
FC085: Resource using new_resource.updated_by_last_action to converge resource: python/providers/pip.rb:74
FC085: Resource using new_resource.updated_by_last_action to converge resource: python/providers/virtualenv.rb:42
FC121: Cookbook depends on cookbook made obsolete by Chef 14: python/metadata.rb:1
FC122: Use the build_essential resource instead of the recipe: python/recipes/source.rb:21
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

No Binaries Metric
            

1.4.6 failed this metric

Failure: Cookbook should not contain binaries. Found:
python/files/default/get-pip.py (size > 1048576 bytes)

Testing File Metric
            

1.4.6 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file

Version Tag Metric
            

1.4.6 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number