A template repo to act as skeleton for any python package
Refer Packaging python to understand python packages and configurations in detail
-
Clone the repository or use this template when creating repository
git clone https://github.com/TheForeverLost/PythonPackageSkeleton.git cd PythonPackageSkeleton -
install setuptools wheel to latest version
python3 -m pip install --user --upgrade setuptools wheel
-
A makefile has been setup to automate all your commands update setup.py with your project details rename the sample folder to
<your package name>and runmake init
make sure your dependencies are well setup in setup.py install_requires and requirements.txt check this article for further clarification
-
This particular uses pytest for testing so once you have added programs in your package add tests in tests/ and run
make test -
You can use the dist command to build distributables
make dist
-
Commands have been added for test deployment to testpypi as well as pypi
make testdeploy
You'll need a pypi account before you deploy it to pypi
make deploy
-
If you do deploy to pypi then you can install this package for use in other projects using
pip install <package>you can directly install from github as well
pip install git+https://github.com/TheForeverLost/PythonPackageSkeleton.git#egg=sample
replace your repo link and package name