Setup Script¶
The setup.py file is a swiss knife for various tasks.
Start by creating a virtual python environment:
$ python -m venv .
You now can use this isolated clean python environment:
$ bin/python --version
Python 3.5.2
You may also activate it for the current shell. POSIX shells would use:
$ . bin/activate
running tests¶
We use py.test for running tests because it is amazing. Run it by invoking the simple test alias of setup.py:
$ bin/python setup.py test
This will also check codestyle and test coverage.
checking code style¶
We use flake8 for enforcing coding standards. Run it by invoking the simple lint alias of setup.py:
$ bin/python setup.py lint
building binary distributions¶
Use the wheel distribution standard:
$ bin/python setup.py bdist_wheel
building html documentation¶
Use setup.py to build the documentation:
$ bin/python setup.py docs
A make implementation is not required on any platform, thanks to the
setup.Documentation
class.
cleaning your workspace¶
We also included a custom command which you can invoke through setup.py:
$ bin/python setup.py clean
The setup.Clean
command is set to clean the following file patterns: