Let’s say I have a package abc
that I’ve published to PyPI.
I have other local projects that use abc
. Of course, I’d like to be able to update abc
locally and test against this version before pushing out to PyPI.
Here’s one approach I’m using:
- Make sure package is not in
pip list
output. I.e. uninstall if necessary. - Set
PYTHONPATH
to include the path to the local package
Then, if I want to test against the officially published abc
package later, I can have another venv
environment in which to install abc
and test again there.
The benefit to the PYTHONPATH
approach is that any change made to abc
locally will immediately be available to any project importing it.
Question
Is this the recommended workflow? Is there another recommended way?