setuptools
package to write a
setup.py
file that is then processed by the pip install
command.pip install -e
command. This just redirects the python
interpreter to your project directory.Beyond greatly facilitating code reuse, writing a python package (as opposed to a loosely organised collection of modules) enables a clear organisation of your software into modules and possibly sub-packages. It makes it much easier for others, as well as yourself, to understand the structure of your software, i.e what-does-what.
Moreover, organising your python software into a package gives you access to a myriad of fantastic tools used by thousands of python developers everyday. Examples include pytest for automated testing, sphinx for building you documentation, tox for automation of project-level tasks.
Next, we’ll talk about python virtual environments. But before, fancy a little break?