Skip to content

How do I support pip editable (-e) installs with pyproject.toml + setup.py (or setup.cfg)? #3821

Answered by abravalheri
fndrplayer39 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @fndrplayer39, I think what is happening here is that you are hitting a limitation of editable installations for flat-layouts, due to the where you are running your test commands from. This limitation is described in the docs:

File system entries in the current working directory whose names coincidentally match installed packages may take precedence in Python’s import system. Users are encouraged to avoid such scenarios [2].

If you change directory before running your test script, it should be fine:

> docker run --rm -it python:3.10 /bin/bash


mkdir -p /tmp/mypkg/mypkg
cd /tmp/mypkg
python3.10 -m venv /tmp/.venv
cat <<EOF > pyproject.toml
[build-system]
requires = ["setuptools"]
bui…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@fndrplayer39
Comment options

Answer selected by fndrplayer39
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants