- Simple and basic configuration for make a package and publish in pypi
- Python 3.6 or higger https://www.python.org/
- Pip https://pip.pypa.io/en/stable/installing/
Install cookiecutter
pip install --user cookiecutterUse this command
cookiecutter https://github.com/ActivandoIdeas/Python-Package-Cookiecutter- Use setuptools
It's the standard packaging library for Python.
distributehas merged back intosetuptools, anddistutilsis less capable. - setup.py should not import anything from the package
When installing from source, the user may not have the packages dependencies installed, and importing the package is likely to raise an
ImportError. - setup.py should be the canonical source of package dependencies
There is no reason to duplicate dependency specifiers (i.e. also using a
requirements.txtfile). See the testing section below for testing dependencies.
- Use Tox to manage test environments Tox provides isolation, runs tests across multiple Python versions, and ensures the package can be installed.
- Uses pytest as the default test runner This can be changed easily, though pytest is a easier, more powerful test library and runner than the standard library's unittest.
- Define testing dependencies in
tox.iniAvoid duplicating dependency definitions, and usetox.inias the canonical description of how the unittests should be run. testsdirectory should not be a package Thetestsdirectory should not be a Python package unless you want to define some fixtures. But the best practices are to use PyTest fixtures which provides a better solution. Therefore, thetestsdirectory has no__init__.pyfile.
python -m pip install --user --upgrade setuptools wheel
python setup.py sdist bdist_wheel
python -m pip install --user --upgrade twine
python -m twine upload dist/*BSD 3-Clause "New" or "Revised" License View in https://github.com/ActivandoIdeas/Cookiecutter-Django-AppEngine-GitLab/blob/master/LICENSE
Contributors are always welcome! Feel free to raise an issue or submit a PR. Read the code of Conduct here: https://github.com/ActivandoIdeas/Codigo-de-Conducta-y-Guia-Rapida
This project is based on cuokiecutter:
- Read this for project contribution: