-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tool.poetry.packages handles wildcards * and ** incorrectly in pyproject.toml #1379
Comments
FYI @sdispater, @brycedrennan. |
Hello, that's the code that is responsible for this: So, whenever a glob is used, the poetry builder expect to find a To fix this issue, it is necessary to define the expected behavior. Is one allowed to include module files only? If a package should be included, is a fin swimmer |
@sdispater , @stephsamson: I would like to work on that, but need some guidance/decision about what should actually get included if the Would be nice if you find some time to discuss this :) |
@finswimmer thanks for volunteering to work on this issue :) I am already currently working on this ticket actually which is why this has been self-assigned but there are other bugs in the low priority lane here which need help! But indeed you are right, the work necessary to be done is in |
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. |
Issue
The documentation gives the following example for using the
tool.poetry.packages
property of thepyproject.toml
file:However the command
poetry build
raises the following error when the"extra_package/**/*.py"
path pattern matches multiple files/directories in at least one the of its path segments:with the following directory layout:
Here the last
*.py
path segment of the"extra_package/**/*.py"
path pattern matchesbaz.py
andqux.py
, which triggers theValueError
. Deleting theproject/extra_package/bar/qux.py
file removes theValueError
. And adding aproject/extra_package/quux
directory raises the sameValueError
, since this time the second**
path segment of the"extra_package/**/*.py"
path pattern matchesbar
andqux
. So it seems that matching multiple files/directories in the path segments of a path pattern is not allowed. It looks like a bug, because each item of thetool.poetry.packages
list is supposed to include a single top-level module or package and optionally specific submodules (like"extra_package/**/*.py"
which includes the top-levelextra_package
package and submodules that have a.py
extension).Also, since the
tool.poetry.packages
property of thepyproject.toml
file can include both directories and files, that is to say both packages and non-package modules, I think we should rename totool.poetry.modules
.The text was updated successfully, but these errors were encountered: