Skip to content

Latest commit

 

History

History
98 lines (72 loc) · 3.61 KB

README.rst

File metadata and controls

98 lines (72 loc) · 3.61 KB

Deprecated. Use cookiecutter-pylibrary instead!

Cookiecutter template for a Python python library. This is largely designed to address this blog post about packaging python libraries.

There's a bare library using this template (if you're curious about the final result): https://github.com/ionelmc/python-nameless-minimal.

Note: You should use cookiecutter-pylibrary instead - it's just like this (just use no for the test_matrix_configurator option) but with py.test as the test runner.

Features

Requirements

Projects using this template have these minimal dependencies:

  • Tox - for running the tests
  • Setuptools - for building the package, wheels etc. Now-days Setuptools is widely available, it shouldn't pose a problem :)

Usage

Generate your project:

cookiecutter https://github.com/ionelmc/cookiecutter-pylibrary-minimal.git
The variables
project_name Verbose project name, used in headings (docs, readme, etc)
repo_name Repository name on github
package_name Python package name (whatever you would import)
distribution_name PyPI distribution name (what you would pip install)

After this you can create the initial repository (make sure you create an empty Github project):

git init .
git add .
git commit -m "Initial skel."
git remote add origin git@github.com:ionelmc/python-nameless.git
git push -u origin master

Then:

Not Exactly What You Want?

There's more intricate variant of this template that:

  • Has a generator script for the test matrix (there's a configure script that generates tox.ini/.travis.yml).
  • Uses Pytest for the test runner.
  • Has support for building C extensions.

If you have criticism or suggestions please open up an Issue or Pull Request.