python-package-template
is a copier template to create and update Python packages. Copier uses git to merge changes from the original template into your instance, so you can keep all of your Python packages up to date and consistent.
pipx install copier
copier copy https://github.com/sabard/python-package-template /path/to/project
cd /path/to/project
./setup.sh
Dependencies:
Installation is made simple with pyenv-installer.
Once you have installed pyenv, install the rest of python-package-template
's dependencies with the setup script:
./setup.sh
Add new dependencies to requirements.in
and then run:
./update-deps.sh
Single dependencies can be updated with:
./update-deps.sh --upgrade-package <package>
TODO add pipx install copier
or provide another install method than running the setup script
cd
into your project directory and run:
pyenv activate python-package-template
copier copy path/to/python-package-template path/to/your_project
-or-
copier copy gh:sabard/python-package-template .
After making changes to the template:
cd path/to/your_project
pyenv activate python-package-template
copier update
pyenv deactivate
Run the upload script which tags and releases the package via a push-triggered CI workflow:
./upload.sh
Make sure TWINE_REPOSITORY
, TWINE_USERNAME
, and TWINE_PASSWORD
environment variables are available in your CI environment.