The problem I\'m facing is small but annoying:
A colleague is working on one project in version control system X (VCS-X). Another colleague is working in another versi
Nobody should be doing sys.path.append
! This is a workflow problem that you should address first and foremost.
In this situation it will be appropriate to package the toolbox
into a distribution. The developer who just wants to use the code from toolbox
, i.e. via an import statement or command line script, will execute:
pip install --user toolbox
The developer who wants to work on the toolbox
code should also be using pip install. However, this developer should clone the repo, create/activate a virtual environment, and execute:
pip install --editable .
In both situations, pip will sort out the necessary sys.path
stuff for you in the correct way.
Follow the PyPA Python Packaging User Guide for the details on how to create a distribution.