i have a package (lets call it test-package) that has a pyproject.toml file but also has setup.py
if i install it locally with python -m pip install -e . --no-use-pep517
with pip>=20.1.3, the package is installed.python -c "import inspect, test_package; print(inspect.getfile(test_package))"
works and points to local file
if i python -m pip install -e .
in a virtual env, python -c "import inspect, test_package; print(inspect.getfile(test_package))"
works
if i python -m pip install --no-build-isolation -e .
python -c "import inspect, test_package; print(inspect.getfile(test_package))"
works
but python -m pip install -e .
is successful, yet python -c "import inspect, test_package; print(inspect.getfile(test_package))"
results in an error ModuleNotFoundError: No module named 'test_package'
.
I tried reading pep517 and pep518. i still don't understand how to reason about above behavior. i was wondering if someone can please explain to me