Skip to content

fix subpackage check for setup.py generation#17

Merged
abn merged 1 commit intopython-poetry:masterfrom
abn:issue/2283
Apr 9, 2020
Merged

fix subpackage check for setup.py generation#17
abn merged 1 commit intopython-poetry:masterfrom
abn:issue/2283

Conversation

@abn
Copy link
Copy Markdown
Member

@abn abn commented Apr 8, 2020

This is a forward port of python-poetry/poetry#1626.

Resolves: python-poetry/poetry#2283

@abn abn self-assigned this Apr 8, 2020
@abn
Copy link
Copy Markdown
Member Author

abn commented Apr 8, 2020

Unrelated failures in CI.

is_subpkg = any(
[filename.endswith(".py") for filename in filenames]
) and not all(
[
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be extracted out to a different variable to make it easier to read? It took me a while to understand that this was checking that all of the Python files are not part of the excluded files.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree; but I wanted to keep this at par with the fix we have already merged in poetry pr. That might be a seperate change.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, makes sense. Then this PR looks good to go.

Copy link
Copy Markdown
Member

@kasteph kasteph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@abn abn merged commit 948a496 into python-poetry:master Apr 9, 2020
@abn abn deleted the issue/2283 branch April 9, 2020 14:56
@sdispater sdispater mentioned this pull request Apr 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sdist: find packages incorrectly including non-package directories during setup.py generation

3 participants