cookbook 'backslasher-python', '~> 0.4.1'
backslasher-python (14) Versions 0.4.1 Follow0
Installs/Configures python and python accessories
cookbook 'backslasher-python', '~> 0.4.1', :supermarket
knife supermarket install backslasher-python
knife supermarket download backslasher-python
backslasher-python-cookbook
A cookbook for managing python-related resources in a simple way
This is mostly a ripoff of the python cookbook, since it's both deprecated and has its resource names stolen by poise-python cookbook
Resources:
-
backslasher_python_pip_installer
: Makes sure a python envrionment has pip installed -
backslasher_python_pip
: A pip package -
backslasher_python_virtualenv
: A virtual environment
Supported Platforms
Should work on normal Linux boxes. Possibly on Windows.
I'm testing on:
- Ubuntu 14.04
- CentOS 6 (6.7)
- CentOS 7 (7.1)
Attributes
-
['backslasher-python']['install_method']
: How to install python. Defaults topackage
. I'm currently not supoorting any other method.
Recipes
backslasher-python::default
The works - installs Python, pip and virtualenv.
Python is installed according to ['backslasher-python']['install_method']
backslasher-python::package
Installs python using the repo's packages.
Provides both python runtime and Python development headers
backslasher-python::pip
Installs pip on the "regular" Python (the one available as python
)
backslasher-python::virtualenv
Installs the virtualenv pip package on the "regular" Python. Also makes sure pip is installed.
Resources
backslasher_python_pip_installer
Installs pip on a specific python executable
Properties
-
python_path
: Python binary to install pip on.
Defaults topython
, which should find the "system" python
Note: This action might overwrite the "primary" pip binary. There is no easy way to avoid this since there is no way to instruct setuptools
not to create "entry points". I'll happily accept a PR for fixing this.
backslasher_python_pip
Installs/removed/upgrades a pip package
Actions
-
install
: Install the pip package -
upgrade
: Upgrade the pip package if it is uninstalled / has version mismatch. Will upgrade to latest by default. -
remove
: Remove the pip package if installed
Properties
-
python_path
: Python binary to install on.
Not relevant if usingvirtualenv
property.
Defaults topython
, which should find the "system" python. -
package_name
: Pip package to install. Defaults to the resource's name - `
package_url
: Optional. Used to specify a URL to install the package from (e.g.pip install git+git://git.myproject.org/MyProject#egg=MyProject
) -
version
: Optional. Specifies a pip version to install -
virtualenv
: Optional. Specifies a virtualenv path to install/remove the pip package in -
timeout
: Time allotted for pip commands. Defaults to 900 seconds (15 min) - `
user
: User to run the commands under -
group
: Group to run the commands under -
environment
: Hash of environment variables to pass to the pip commands -
install_options
: An array of arguments to pass to the pip commands when installing / upgrading packages -
smart\_install
: Uses a python script to check if package should be installed. Avoids running pip (and marking the resource as updated) "for nothing". Does not work in edge cases, so disabled by default.
backslasher_virtualenv
Manages a python virtualenv
Actions
-
create
: Creates the virtualenv -
delete
: Deletes the virtualenv
Properties
-
path
: Location inside the filesystem of the virtualenv. Defaults to the resource's name -
interpreter
: Optional. Python binary used for venv. Defaults to the system python -
owner
: Optional. Owning user of the virtualenv -
group
: Optional. Owning group of the virtualenv -
options
: Optional. A string of arguments to pass the virtualenv creator
License and Authors
Licensed GPL v2
Author: Nitzan Raz (backslasher)
I'll be happy to accept contributions or to hear from you!
Dependent cookbooks
yum-epel ~> 0.6 |
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
0.4.1
- [backslasher] Added travis test harness
0.4.0
- [OmriManor] smart_install no longer compiles packages
0.3.3
- [backslasher] Improved smart_install - now emulates pip better
0.3.2
- [backslasher] Improved testing of smart_install
0.3.1
- [backslasher] Fixed error in Chef client with cookbook location detection
0.3.0
- [backslasher] Added smart_install to avoid running pip "needlessly"
0.2.1
- [backslasher] Improved load_current_resource
0.2.0
- [backslasher] Modified syntax to old resource style
0.1.6
- [backslasher] Removed version constraint on compat_resource
0.1.5
- [backslahser] Fixed environment usage in pip
0.1.4
- [backslasher] Finally fixed
new_resource
0.1.3
- [backslasher] Disposing of new_resource
0.1.2
- [backslasher] Avoid return inside code block
0.1.1
- [backslasher] Foodcritic issues
0.1.0
- [backslasher] Initial release of backslasher-python
Collaborator Number Metric
0.4.1 failed this metric
Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
0.4.1 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
0.4.1 failed this metric
FC064: Ensure issues_url is set in metadata: backslasher-python/metadata.rb:1
FC065: Ensure source_url is set in metadata: backslasher-python/metadata.rb:1
FC066: Ensure chef_version is set in metadata: backslasher-python/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: backslasher-python/metadata.rb:1
FC069: Ensure standardized license defined in metadata: backslasher-python/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.4.1 passed this metric
Testing File Metric
0.4.1 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
0.4.1 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
0.4.1 failed this metric
0.4.1 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
0.4.1 failed this metric
FC064: Ensure issues_url is set in metadata: backslasher-python/metadata.rb:1
FC065: Ensure source_url is set in metadata: backslasher-python/metadata.rb:1
FC066: Ensure chef_version is set in metadata: backslasher-python/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: backslasher-python/metadata.rb:1
FC069: Ensure standardized license defined in metadata: backslasher-python/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.4.1 passed this metric
Testing File Metric
0.4.1 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
0.4.1 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
0.4.1 failed this metric
FC065: Ensure source_url is set in metadata: backslasher-python/metadata.rb:1
FC066: Ensure chef_version is set in metadata: backslasher-python/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: backslasher-python/metadata.rb:1
FC069: Ensure standardized license defined in metadata: backslasher-python/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
0.4.1 passed this metric
Testing File Metric
0.4.1 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
0.4.1 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
0.4.1 failed this metric
0.4.1 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