5. Deployment
Generate pip package
Follow steps to Test Pypi: https://packaging.python.org/tutorials/packaging-projects/
The next step are similar, but use the official Pypi:
- Create setup.py
- Update wheel and setuptools:
python3 -m pip install --upgrade setuptools wheel - Generate dist folder with distributing files:
python3 setup.py sdist bdist_wheel - Register user in pypi: https://pypi.org/account/register/
- Create API Token in pypi web (inside accounts settings)
- With generated token, create the ~/.pypirc how to say the previous step
- Install twine (tools to upload the distribution package):
python3 -m pip install --upgrade twine - Run twine and upload files:
python3 -m twine upload --repository pypi dist/* - We can install our package: pip install flamapy
Steps to create new version
-
Change version in setup.py
-
Create new git tag
$git tag -a vX.Y.Z -m "build: release X.Y.Z"
$git push --tags
- Add changelog in releases
# Each change should be attach with (#ISSUE_NUMBER) and SHA_COMMIT
* Discover catch exception and show message instead throw exception (#2) 416fef590a734e0b2dca255b788f47c7fc028672
- Update Pypi package
# With the clean repository and previous steps finished
$python3 setup.py sdist bdist_wheel
$python3 -m twine upload --repository pypi dist/*