Templete#
for offical documentation refer to the documentation @ packaging.python.org
Usage#
Create your custom module#
- rename
mymoduleto your module name. -
in
mymodule/__init__.pyyou need to put your super logic/code -
Final step in
setup.pyput your metadata and make sure name is matching module folder in directory.
Publishing#
DevOps / GitHub Actions way pushing#
-
Add two actions secrets
PY_PASSWORDandPY_USERNAME -
Enable
Actionsinmain.ymlyou will find config. -
In
Actionsyou can run yourworkflow_dispatchmanually
Alternatively
- On
releaseyour module/workflow will be deployed/initiates on PyPi.
Note: you need to change your version number in setup.py otherwise an oopsie may occur
Manual Push#
Requirements#
python3 -m pip install --upgrade pip
python3 -m pip install setuptools wheel twine
Enviromental Variables#
adgsenpai@adgstudios $ PYPI_USERNAME='myusername'
adgsenpai@adgstudios $ PYPI_PASSWORD='mysupersecretpassword'
Deployment#
python3 setup.py sdist bdist_wheel
python3 -m twine upload dist/*