A similar question has been asked before, but this time I am asking for the newer setuptools config file — setup.cfg
.
Consider my use case, where I have a project with multiple Python packages that depends on each other. For simplicity let's say mypkg1
depends on mypkg2
:
mypkg1/
mypkg1/
setup.cfg
mypkg2/
mypkg2/
setup.cfg
How do I write the setup.cfg
file for mypkg1
such that it depends on a local copy of mypkg2
?
[metadata]
name = mypkg1
version = 0.0.1
[options]
packages = find:
python_requires = >= 3.7
install_requires =
../mypkg2 # Does not work
The answer cannot be to distribute mypkg2
to a package repository (e.g., PyPI) or some VCS release (e.g., GitHub Release) as these solutions makes the package external and no local.
Related Questions
How to include and install local dependencies in setup.py in Python?
This question is for
setup.py
which does not work forsetup.cfg
.https://github.com/pypa/setuptools/issues/1951
The discussion does not indicate any support for this nor any plans for this to be a feature.