Skip to content

BLD: fix build error for PyPy on macOS (#26536) #26862

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

Merged
merged 3 commits into from
Jun 21, 2019

Conversation

robbuckley
Copy link
Contributor

@robbuckley robbuckley commented Jun 14, 2019

This change should have no effect on CPython, and may fix a crash in when trying to install using PyPy (see #26536).

I've given this a very quick check by installing locally with pip install -e (cpython 3.6 on mac). I dont have an easy way to check it on PyPy, so Im hoping the OP from #26536 can do this (@bhy)

@codecov
Copy link

codecov bot commented Jun 14, 2019

Codecov Report

Merging #26862 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #26862      +/-   ##
==========================================
- Coverage   91.88%   91.87%   -0.01%     
==========================================
  Files         179      179              
  Lines       50696    50696              
==========================================
- Hits        46581    46576       -5     
- Misses       4115     4120       +5
Flag Coverage Δ
#multiple 90.46% <ø> (ø) ⬆️
#single 41.09% <ø> (-0.08%) ⬇️
Impacted Files Coverage Δ
pandas/io/gbq.py 88.88% <0%> (-11.12%) ⬇️
pandas/core/frame.py 96.88% <0%> (-0.12%) ⬇️
pandas/util/testing.py 90.84% <0%> (-0.11%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 430f0fd...85ed4f8. Read the comment docs.

@codecov
Copy link

codecov bot commented Jun 14, 2019

Codecov Report

Merging #26862 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #26862      +/-   ##
==========================================
- Coverage   91.88%   91.86%   -0.02%     
==========================================
  Files         179      180       +1     
  Lines       50696    50710      +14     
==========================================
+ Hits        46581    46584       +3     
- Misses       4115     4126      +11
Flag Coverage Δ
#multiple 90.45% <ø> (-0.02%) ⬇️
#single 41.09% <ø> (-0.09%) ⬇️
Impacted Files Coverage Δ
pandas/io/gbq.py 88.88% <0%> (-11.12%) ⬇️
pandas/core/frame.py 96.88% <0%> (-0.12%) ⬇️
pandas/core/arrays/datetimelike.py 97.92% <0%> (-0.01%) ⬇️
pandas/core/internals/managers.py 95.21% <0%> (-0.01%) ⬇️
pandas/core/internals/blocks.py 94.38% <0%> (-0.01%) ⬇️
pandas/core/arrays/datetimes.py 97.79% <0%> (-0.01%) ⬇️
pandas/io/api.py 100% <0%> (ø) ⬆️
pandas/core/internals/construction.py 95.93% <0%> (ø) ⬆️
pandas/io/spss.py 46.15% <0%> (ø)
pandas/io/formats/format.py 97.91% <0%> (ø) ⬆️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 430f0fd...1398e30. Read the comment docs.

@WillAyd WillAyd added the Build Library building on various platforms label Jun 15, 2019
@bhy
Copy link

bhy commented Jun 15, 2019

Thanks for the work! I'm testing this. Just to be sure, am I correct that pandas already dropped support for Python 2? pip install fails with invalid syntax on Python 2.

@bhy
Copy link

bhy commented Jun 15, 2019

@robbuckley I've commented the line that needs minor fix (str(current_system)). With it fixed, the build will pass on pypy3.

Thank you!

@jbrockmendel
Copy link
Member

Yes, py2 has been dropped.

@robbuckley
Copy link
Contributor Author

@bhy thanks for testing, and pointing out the issue. I've fixed it in a slightly different way - would you mind giving the new code a check to make sure it installs with PyPy? thanks!

@bhy
Copy link

bhy commented Jun 16, 2019

@robbuckley I tested again. Now installation works without any problem on PyPy. Thanks!

@robbuckley robbuckley changed the title BLD: fix build error for PyPy (#26536) BLD: fix build error for PyPy on macOS (#26536) Jun 16, 2019
Copy link
Contributor

@TomAugspurger TomAugspurger left a comment

Choose a reason for hiding this comment

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

Can you add a release note under the build changes section?

@TomAugspurger TomAugspurger added this to the 0.25.0 milestone Jun 16, 2019
@jreback
Copy link
Contributor

jreback commented Jun 16, 2019

lgtm ex @TomAugspurger comment. ping on green.

@robbuckley
Copy link
Contributor Author

all done

@jreback
Copy link
Contributor

jreback commented Jun 17, 2019

@robbuckley does this pass on the wheel building? if you can test

@TomAugspurger
Copy link
Contributor

TomAugspurger commented Jun 17, 2019 via email

@robbuckley
Copy link
Contributor Author

I should be able to run the wheel builder script tomorrow.

@jreback
Copy link
Contributor

jreback commented Jun 17, 2019

thanks @robbuckley that would be great

@robbuckley
Copy link
Contributor Author

I ran the daily wheelbuilder on my fork, all passed.

But them I realised that the changed code would not have been executed under the wheel builder scripts, thanks to:

https://github.com/MacPython/pandas-wheels/blob/f3b5695939662666e69fb92d6a8eceeb26d0209a/config.sh#L12

since the changes are inside a check for:
if 'MACOSX_DEPLOYMENT_TARGET' not in os.environ:.

So I pip installed the 3 macOS wheels built off my fork in suitable environments. That at least ensures the changed code has been executed. That plus @bhy's check that the PyPy issue seems to be fixed should be enough.

@jreback
Copy link
Contributor

jreback commented Jun 19, 2019

@robbuckley do we need < 10.9 supported any longer? (for going forwards in 0.25.0), I don't remember why we needed that in the first place.

@robbuckley
Copy link
Contributor Author

@jreback we need it to build Python 3.5 wheels, since python.org don’t provide a 10’9 version of that

@jreback
Copy link
Contributor

jreback commented Jun 21, 2019

@robbuckley so reading your comments, this is good to go and pandas-wheels doesn't need any changing?

@robbuckley
Copy link
Contributor Author

Yes, that’s right. I have a PR pending in pandas-wheels, but it’s independent of this one

@jreback jreback merged commit dfcd2b2 into pandas-dev:master Jun 21, 2019
@jreback
Copy link
Contributor

jreback commented Jun 21, 2019

thanks @robbuckley ping us on pandas-wheels for the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build Library building on various platforms
Projects
None yet
Development

Successfully merging this pull request may close these issues.

With MacOS and PyPy installation fails: AttributeError: 'LooseVersion' object has no attribute 'version'
6 participants