python-poetry / poetry

Python packaging and dependency management made easy
https://python-poetry.org
MIT License
31.17k stars 2.25k forks source link

Poetry doesn't recognize setuptools based project if it has no setup.py (only setup.cfg) #5692

Closed fmagin closed 2 years ago

fmagin commented 2 years ago

Issue

the angr project has various subprojects that only have a setup.cfg file and no setup.py file. This results in poetry throwing an exception when trying to use them as a local path package: i.e. Directory /home/fmagin/Projects/angr-dev/archinfo does not seem to be a Python package. in poetry/core/packages/directory_dependency.py:54. Specifically this happens because the check only checks if a setup.py exists or if the pyproject.toml has tool.poetry keys. Both aren't true for the angr subprojects. If I edit the poetry source code and add a check for the existence of setup.cfg file then poetry works as expected (and like if I had specified the dependency as a pinned git commit from GitHub directly), so I am considering this a bug

abn commented 2 years ago

@fmagin can you try the fix at https://github.com/python-poetry/poetry-core/pull/368#issue-1246356001 please?

fmagin commented 2 years ago

@abn yep that fix works! I searched the previous issues for setup.cfg and didn't find any, so I didn't realize there was such a recent issue/PR for this already

github-actions[bot] commented 6 months ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.