https://github.com/ionelmc/cookiecutter-pylibrary-minimal
This has been merged into https://github.com/ionelmc/cookiecutter-pylibrary - use that instead!
https://github.com/ionelmc/cookiecutter-pylibrary-minimal
Last synced: 3 months ago
JSON representation
This has been merged into https://github.com/ionelmc/cookiecutter-pylibrary - use that instead!
- Host: GitHub
- URL: https://github.com/ionelmc/cookiecutter-pylibrary-minimal
- Owner: ionelmc
- Created: 2014-06-05T19:31:37.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-11-13T23:56:25.000Z (almost 10 years ago)
- Last Synced: 2025-04-11T10:39:11.290Z (6 months ago)
- Language: Python
- Homepage:
- Size: 316 KB
- Stars: 12
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
==================================================================
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.
.. list-table::
:stub-columns: 1
* - *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
--------* BSD 2-clause license.
* Tox_ for testing Python 2.6, 2.7, 3.3, PyPy etc.
* Travis-CI_ and Coveralls_ for continuous testing and coverage tracking (using Tox_).
* Documentation with Sphinx_, ready for ReadTheDocs_.
* Configurations for:* `isort `_
* `bumpversion `_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
..
.. list-table:: The variables
:stub-columns: 1* - 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 masterThen:
* `Enable the repository in your Travis CI account `_.
* `Enable the repository in your Coveralls account `_.
* `Add the repo to your ReadTheDocs account `_ + turn on the ReadTheDocs
service hook. Don't forget to enable virtualenv and specify ``docs/requirements.txt`` as the requirements file in
`Advanced Settings`.
* Release your package. This template comes with a tox environment (``check``) that will:* Check if your ``README.rst`` is valid.
* Check if the ``MANIFEST.in`` has any issues.
* Run ``flake8`` (a combo of PEP8, pyflakes and McCabe checks)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.
.. _Travis-CI: http://travis-ci.org/
.. _Tox: http://testrun.org/tox/
.. _Sphinx: http://sphinx-doc.org/
.. _Coveralls: https://coveralls.io/
.. _ReadTheDocs: https://readthedocs.org/
.. _Setuptools: https://pypi.python.org/pypi/setuptools
.. _Pytest: http://pytest.org/