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
Use PEP-517 build process for Pipenv, others #11754
Conversation
Notifying maintainers: |
Oh, forgot that I wasn't the maintainer of Dulwich, sorry! |
It's OK, you can go ahead. |
we'll probably need a change like this at some point, but before making changes to the python PG it should be tested properly on more than a few ports to make sure this will work correctly. This is the suggestion that was made by upstream when I asked about Before potentially merging it we should at least have @jmroot weigh in on the suggested changes. |
@danchr the logs also show |
python/py-build/Portfile
Outdated
port:py${python.version}-pep517 \ | ||
port:py${python.version}-toml | ||
|
||
if {${python.branch} < 3.8} { |
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.
the typical way here would be if {${python.version} < 38} {
. I am not sure if this should work, but there is the error with importlib_resources
- is that needed here as well (didn't check myself yet...)
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.
After a bit of digging, I think it was actually py-python-install
that was missing a dependency. I've fixed it to use the usual style, thanks.
@@ -295,12 +295,13 @@ proc python_set_pep517 {option action args} { | |||
return | |||
} | |||
global python.pep517 python.version subport name | |||
if {$subport ne $name} { | |||
if {[info exists python.version]} { |
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.
what's the reason for this change?
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.
Without that change, you cannot use PEP-517 builds in single-version ports using python.version
directly, such as pipenv
.
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'll look at refactoring this. It would probably work better as a callback anyway.
Without this, py36-black cannot build using pep517
34858a2
to
29ab540
Compare
Not many ports use the option, so I've added a commit to rev-bump them all. |
OK, I'll first clear up a few points brought up here and in the originating ticket.
|
Thank you for elaborating — those are very valid reasons for not mucking too much about with the PortGroup 🙂 The build also failed with an obscure error in one of the ports, so I've removed the parts of the PR that touched the group. I assume it's still somewhat desirable to use PEP-517 for ports? |
Yes, if maintainers want to switch their python module ports to use pep517, that's fine except in the case of the dependencies needed for that build style. That is a direction we should try to be moving in generally. But things do break sometimes, and each port needs to be tested. |
And TBH I would just wait for a version update to do the switch to pep517, rather than rev bumping just for that. But that's up to the maintainers. I will also look into whether using |
I've updated the portgroup to use The changes to the portgroup and py-python-install in this PR are no longer needed. Enabling pep517 in the other ports should be fine. |
thanks @jmroot, let's just close this PR then...? |
Description
This is related to https://trac.macports.org/ticket/63320 — we should probably use that for more ports, so I tried to enable it for a few of the Python ports I maintain.
Type(s)
Tested on
macOS x.y
Xcode x.y
Verification
Have you
port lint
?sudo port test
?sudo port -vst install
?