Handle nested wildcards in package includes correctly. Fixes: #1379.#1592
Handle nested wildcards in package includes correctly. Fixes: #1379.#1592
Conversation
sdispater
left a comment
There was a problem hiding this comment.
Thanks for your first contribution! :-)
Overall great job 👍 However, we need tests for this use case in the sdist builders because I think they will fail since we check for the presence of an __init__.py file in one other place: https://github.com/sdispater/poetry/blob/master/poetry/masonry/builders/sdist.py#L237
| # The __init__.py file should be first | ||
| # Packages no longer need an __init__.py in python3 | ||
| root = self._elements[0] | ||
| if root.name != "__init__.py": |
There was a problem hiding this comment.
I think we can change this line to check if there is at least one Python file, regardless of whether it's a __init__.py file or not. If there is no Python file, it's not a package and we should raise the exception.
There was a problem hiding this comment.
Thanks, I've also added it now in commit 1d0e99d.
…not necessarily an __init__.py file) will be included.
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Pull Request Check List
This PR fixes #1379. I've also added some unit tests for
PackageInclude.