Python packages are complex but not complicated, I believe that once you have created one package you will develop confidence and experience to publish more of them. While trying to deploy my project on pypi, I followed the following two guides quite helpful:
- https://packaging.python.org/guides/distributing-packages-using-setuptools/
- https://python-packaging.readthedocs.io/en/latest/index.html
I mostly stuck to the first tutorial and only used the second one for additional reference and a different perspective. You can see my setup.py file for reference. To get an idea about which commands I run to build and distribute the project you can see my Makefile. If you do not use a virtual environment for your project I will suggest you to look into pipenv, It helps a lot in managing dependencies required for the project and is very simple to use.
I do think that there is a lot of room for improvement in the packaging system of python in general. Let us hope that they simplify the commands and streamline the process.
If you get stuck on anything, feel free to reach out!
Pip freeze for Ubuntu in virtual env adds pkg-resources
package to the requirements which is fucked up because this is a fuck up. More details can be found at: What is “pkg-resources==0.0.0” in output of pip freeze command.
Recommended solution:
freeze:
pip freeze | grep -v "pkg-resources" > requirements.txt