Skip to content
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

Update 'packaging' 20.4 -> 20.8 #3530

Closed
wants to merge 1 commit into from
Closed

Update 'packaging' 20.4 -> 20.8 #3530

wants to merge 1 commit into from

Conversation

emanueljacob
Copy link

closes #3458

Pull Request Check List

Resolves: #3458

  • Added tests for changed code.
  • Updated documentation for changed code.

@barentsen
Copy link

I tried this fix by installing poetry@pr3530 on OSX Big Sur v11.1 in an Intel x86 terminal as follows:

pipx install --suffix @pr3530 'poetry @ git+https://github.com/emanueljacob/poetry@dev/update-packaging-20-8'

...however I found that poetry@pr3530 install continued to install packages like numpy and scipy from source rather than from their wheels, i.e. this PR did not appear to fix the issue for me.

I do not have a deep understanding of the internals of poetry, however I suspect it is vendors/pyproject.toml over in poetry-core we need to update:

https://github.com/python-poetry/poetry-core/blob/master/vendors/pyproject.toml

Changing that file to require packaging = "^20.8", followed by running make vendor/sync and pip install . in the root of poetry-core fixed #3458 for me.

@henryiii
Copy link

Is there a way to help with this? Poetry on macOS Big Sur (the Intel version) cannot install binary wheels; since NumPy doesn't build out of the box on macOS, this means no NumPy in poetry. :'( Bumping to 20.8 will fix Intel Big Sur (and the next release will fix Apple Silicon Big Sur).

@alexifm
Copy link

alexifm commented Jan 21, 2021

This PR only changes the lock file. It needs to update the pyproject.toml file.

@barentsen is correct, poetry-core needs to be updated too. PR 125 seems to do it but I haven't fully tested.

Here's how I got pipx to work (note: I'm using a branch from my fork of poetry, not the branch for this PR but I don't know what the version of packaging does on poetry vs poetry-core):

$ pipx install --suffix @pr3530 'poetry @ git+https://github.com/alexifm/poetry@packaging-20-8'
$ rm -rf ~/.local/pipx/venvs/poetry@pr3530/lib/python3.8/site-packages/poetry_core* \
   ~/.local/pipx/venvs/poetry@pr3530/lib/python3.8/site-packages/poetry/core  # injection wouldn't overwrite.  had to manually clear it out.  Maybe a pip uninstall would work?
$ pipx inject poetry@pr3530 'poetry-core @ git+https://github.com/gi0baro/poetry-core@packaging-20-8'
$ cat ~/.local/pipx/venvs/poetry@pr3530/lib/python3.8/site-packages/poetry/core/_vendor/packaging/__about__.py| grep "__version__ ="      
__version__ = "20.8"

Could someone on Big Sur test this out (haven't migrated because of issues like this, among many others) so we can see if we can get a patch for people. Or at least have a recipe for Big Sur folks.

@alexifm
Copy link

alexifm commented Jan 21, 2021

Was able to test on another machine with Big Sur. Didn't seem to work.

@gi0baro
Copy link

gi0baro commented Jan 22, 2021

Was able to test on another machine with Big Sur. Didn't seem to work.

@alexifm do you have any details?

@alexifm
Copy link

alexifm commented Jan 22, 2021

@alexifm do you have any details?

Yea, I guess "it didn't work" isn't helpful. But unfortunately I don't have much else to say. Installing numpy worked but it took a while so I suspected it wasn't a wheel. I tried pyarrow instead and that confirmed it was compiling the source. I don't really know what else to look for. I couldn't see anything in the verbose poetry logs that indicated anything about wheel vs source.

@henryiii
Copy link

I just tested the lines above (on Python 3.9, but otherwise the same), and it worked just fine. NumPy installed in about 2 seconds (and NumPy can't build from source in the default environment, I haven't set up the site cfg or variables requires to build it on macOS).

@alexifm
Copy link

alexifm commented Jan 22, 2021

Okay, so I botched a couple of things. One of them really dumb and not something I want to talk about. But, I got it to work. One key thing is pip needs to be updated too, naturally. The other is there actually needs to be a wheel for the package (pyarrow doesn't have a wheel for 3.9)

@alexifm
Copy link

alexifm commented Jan 22, 2021

I did another test: I just installed the latest published poetry. New first line in the steps above:

$ pipx install --suffix @pr125  'poetry'

Worked just fine. Seems like we just need to get @gi0baro's PR merged in and then upgrade to the new poetry-core.

@ryboe
Copy link

ryboe commented Feb 10, 2021

The fix has landed in poetry-core 1.0.2, but poetry is still using poetry-core 1.0.0. Can we bump the poetry-core version please?

@henryiii
Copy link

I just got my M1 machine a few minutes ago, I can test something if helpful. I released boost-histogram with a Universal2 wheel, but it depends on NumPy, so can't use it without system site packages yet. :/

@max-sixty
Copy link
Contributor

If a project changes from poetry to:

requires = ["poetry-core>=1.0.2"]

...will Big Sur work for that package without an update to this repo?

@ryboe
Copy link

ryboe commented Feb 16, 2021

Unfortunately, no, @max-sixty. poetry needs to update poetry-core itself.

@jrmlhermitte
Copy link
Contributor

Looks like this was done here 9 days ago and so this is no longer needed?

Does anyone know when this latest version will be released with this commit?

@max-sixty
Copy link
Contributor

What would it take to make a release, assuming that's what's require for poetry to work with Big Sur?

@gi0baro
Copy link

gi0baro commented Feb 25, 2021

FYI I just published a binary version of Poetry that might solve the issue on Big Sur (intel).
Mind that it also might introduce other issues, so use it at your own risk :)
https://github.com/gi0baro/poetry-bin

@jrmlhermitte
Copy link
Contributor

Looks like this is fixed in https://github.com/python-poetry/poetry/releases/tag/1.1.5
from #3677
and that this PR may not be needed anymore.

I have tested this version and I am now downloading wheels rather than building from source for the packages I would expect.

Thanks for the discussion and thanks @sdispater for having released this fix.

@abn
Copy link
Member

abn commented Mar 12, 2021

Closing this as this does not seem to be needed anymore as per above comments.

@abn abn closed this Mar 12, 2021
Copy link

github-actions bot commented Mar 1, 2024

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Poetry does not install from wheels on macOS Big Sur
9 participants