Background
We have project with the following high-level directory structure*
./datascience/
├── core
│ └── setup.py
├── notebooks
│ └── Pipfile
└── web
└── Pipfile
*Excluded all the irrelevant files and directories for brevity.
The core package is a library. It's a dependency of both the notebooks and web applications.
The core package, being a library, has its dependencies specified in setup.py
import setuptools
setuptools.setup(
install_requires=[
'some-dependency',
'another-dependency'
]
)
The web and notebooks applications are using pipenv for dependency management. Their dependencies are specified in a Pipfile.
For example, here's how the web dependencies are specified in web/Pipfile:
[packages]
datascience-core = {path = "./../core"}
flask = "~= 1.0"
Notice how the core dependency is a local dependency, hence the relative path.
Problem
Doing a pipenv install from inside the the web or notebooks directory, does not install the dependencies of the core library as I expected!
I also tried using a Pipfile for core, hoping that pipenv would pick it up in its graph and download all the nested dependencies. But it doesn't.
How can dependencies of the core app be installed automatically when pipenv is installing dependencies for the web or notebooks app?