A wercker box with python 2.7 and 3.2 installed. For both versions of python setuptools, wheel, pip and virtualenv are installed.
There are two steps by default added to the wercker.yml:
virtualenv
which sets up a python virtual environment. Which is common practice in the python community. The virtual environment will also create/ enable some local caching for wercker.pip-install
. This command by default tries to install the packages specified in therequirements.txt
. There are several options for this. You can find more information in the steps directory on wercker
By default wercker will try to use wheel. Wheel is a built-package format which can speed up the build process. The wheel files are stored in your applications cache, which at this moment is stored for about two weeks. It may be a good idea to clear this cache every now and then.
The following is the default wercker.yml for python:
box: wercker/python
services:
# - wercker/postgresql # Don't forget to add your databases as a service
# Build definition
build:
# The steps that will be executed on build
steps:
- virtualenv:
name: setup virtual environment
- pip-install:
requirements_file: "requirements.txt" # Optional argument.
# A custom script step, name value is used in the UI
# and the code value contains the command that get executed
- script:
name: echo python information
code: |
echo "python version $(python --version) running"
echo "pip version $(pip --version) running"
pip freeze
For guides on how to use python on wercker, see our devcenter. We also have guides:
- Getting started with Flask
- Getting started with Flask and redis
- Getting started with Django and Postgres
- And a small blog post on how to deploy to pypi.
- Changed
ubuntu12.04-webessentials
to version1.0.0
The MIT License (MIT)
Copyright (c) 2013 wercker
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- newer version of virtualenv installed 1.11.4
- version increased to 1.0.0 to reflect stable status
- pip (outside of virtualenv) is now also the latest version
- wheel is now disabled in the default yaml for this box.
- Changed
ubuntu12.04-webessentials
to version1.0.0
- force pip for python 2.7 to be deafult
- switch for default pip (python 2.7 one or 3.2)
- Python 3.2 added by default
- pip updated to 1.4.1
- setuptools updated to latest version 1.3.1
- default wercker.yaml template updated
- Update web-essentials to 0.0.12 (pgdg-keyring update)
- Update
web-essentials
to 0.0.11
- Lock apt cookbook to 1.8.2
- Update readme
- Initial release