Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use empty package-dir in pyproject.toml (#715)
fixes: #868 this appears to be a known issue stemming from the use of import hooks to comply with pep 660 - see for example python/mypy#13392 and pypa/setuptools#3518. What's happening is that for editable installs `setuptools` creates files like `.../site-packages/__editable__.general_superstaq-0.5.5.pth` which are supposed to point python to the source directory. Previously these would just be text files containing a single path, e.g. ``` /<...>/client-superstaq/general-superstaq ``` but after switching to pyproject.toml it becomes an executable hook, e.g. ```python import __editable___general_superstaq_0_5_5_finder; __editable___general_superstaq_0_5_5_finder.install() ``` where `__editable___general_superstaq_0_5_5_finder.py` is another file saved in the site-packages directory. this breaks static analysis tools because they won't execute the required code afaict this pr seems to be the cleanest workaround - after these changes setuptools seems to generate the old-style `.pth` files (i.e. text files containing paths to the source directories), and `mypy` behaves as expected (at least for me)
- Loading branch information