-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
migrate packaging to pyproject.toml #9056
base: master
Are you sure you want to change the base?
migrate packaging to pyproject.toml #9056
Conversation
6344069
to
42d468b
Compare
OK, it's almost ready except:
|
8c65e6d
to
6e67258
Compare
This is unrelated to your PR and I fixed it with #9129 |
6e67258
to
b16826c
Compare
Wow. It works indeed. Thank you so much. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to hold this off for now. As we got other priorities.
Sure. A vague estimation of when it would become envisageable ? |
To merge after #9210, I hope. |
it was automatically migrated but flake8 doesn't support the pyproject.toml format
zip-safe is deprecated and doesn't do anything. exclude 'tests*' is already the default behaviour
12a5a0b
to
cf25dcd
Compare
watch-out: this PR is intended to be squash-merged |
So... this is a good example of a nice little pr that's a bit stalled. I don't really have any extra bandwidth to keep this moving, given existing commitments. Should we be having a discussion about getting the project into jazzband.co so that we've got a lower barrier of entry for new maintainers? |
Hey, that's a very interesting decision that is (way) beyond the scope of my humble little PR. Maybe let's open a dedicated issue ou GitHub discussion? |
Can we reconsider this in the priorities of the project to reflect the latest changes in the Python environment and the problem which was caused by |
88a9c7f
to
6f8da97
Compare
05958fb
to
c8030fc
Compare
@tomchristie that's ready to merge (let's not forget to squash merge). |
2dfb5ed
to
1278968
Compare
@deronnax Id be happy to see a release, tho someone else would need to take the lead on it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks better then before, but I want to do some more study before merging this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple comments I had when looking over this change
pyproject.toml
Outdated
[tool.setuptools.packages.find] | ||
namespaces = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason you're disabling namespaces? I believe you can also just specify the packages directly since there is only one:
[tool.setuptools.packages.find] | |
namespaces = false | |
packages = ["rest_framework"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I disabled them because they were disabled originally, using find_packages
in the setup.py instead of find_namespace_packages
. I tried your suggestion but it broke the CI, so I reverted it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, thanks for trying. It appears I misunderstood the default behavior for nested packages.
You'd need to try the following:
[tool.setuptools.packages.find] | |
namespaces = false | |
[tool.setuptools.packages.find] | |
include = ["rest_framework*"] |
I used the build
module to build a wheel and with my original suggestion it was warning that the sub-packages were not being included, but with the include
statement it worked as intended and bundled the sub-packages.
Do you mind running that by the CI?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure. But as it is changing the behavior, even if it works, I would like it in a separate PR :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well what you used doesn't match the original either, since you're missing the exclude so I'd just switch to the new style using include and you can leave off the namespace disabling or turn it off if you really prefer it to be off. I just don't think it needs to be off.
thanks to @terencehonles Co-authored-by: Terence Honles <[email protected]>
Co-authored-by: Terence Honles <[email protected]>
This reverts commit ea10c54.
@auvipy can you give a deadline at which you would have done this study? I think (and some other) that's it's pretty important PR and it should not get spiraled into oblivion. |
Co-authored-by: Terence Honles <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like my comment was stuck pending 🤦
pyproject.toml
Outdated
[tool.setuptools.packages.find] | ||
namespaces = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well what you used doesn't match the original either, since you're missing the exclude so I'd just switch to the new style using include and you can leave off the namespace disabling or turn it off if you really prefer it to be off. I just don't think it needs to be off.
Just an initiative of my own.
Don't forget to squash merge the PR.