A cookiecutter template for python projects intended to be pip-installed, based on cookiecutter
- Testing environment with tox for Python 2.7 and 3.6, with
- Continuous integration with Travis-CI
- Coverage with coveralls
- Automated PyPI releases via Travis-CI
- Configuration for
-
Generate a Python package project with cookiecutter as in
pip install cookiecutter cookiecutter https://github.com/martibosch/cookiecutter-pipproject.git
You will be asked about your basic info (name, project name, short description, etc.), which will be used in your new project.
-
Create a git repository for the project
-
Add the repository to your Travis-CI account
-
Add the repository to your coveralls account
-
Register your project to PyPI e.g. via twine
pip install twine python setup.py sdist bdist_wheel twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
-
Add your encrypted PyPI password to the
.travis.yml
file for automated PyPI deployment. Note that this requires the Travis command line tooltravis encrypt --add deploy.password
Thereupon, each time you push a tag to the master branch, successful Travis-CI builds will automatically deploy your package to PyPI