Skip to content

BLD: Allow building with NumPy nightlies and use it for nightlies #55594

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 1 commit into from
Oct 25, 2023

Conversation

seberg
Copy link
Contributor

@seberg seberg commented Oct 19, 2023

I am not sure that this is uncontested that this is a good version pin change. I also took the liberty of removing the current use of oldest-support-numpy, since Python 3.9 means that you should normally always get 1.25 anyway and that should work for any NumPy version.

The <=2.0.0.dev0 is a way to explicitly allow NumPy nightly wheels, although of course you need the additional URL to use it. In a release version, it might be nicer to not have it, but it also should not really hurt since the you are unlikely to have the NumPy dev wheels available unless you really want them.

(Not sure how to best test that the changes work as is.)


@lithomas1 I suppose you are the one to discuss this? I am not sure that others will agree that changing the version pin as I did is a viable approach, yet.
Maybe there is some reason why removing oldest-support-numpy seems terrible also?! To me it seems like it should be safe, assuming it works.

@seberg seberg requested a review from mroeschke as a code owner October 19, 2023 12:45
@mroeschke mroeschke added the Build Library building on various platforms label Oct 19, 2023
@seberg
Copy link
Contributor Author

seberg commented Oct 20, 2023

Maybe the better path is to just install NumPy explicitly. cibuildwheel shouldn't use build isolation by default (I think). So adding an explicit install to the pre-build step should work. (And no need for changing the version pin.)

Copy link
Member

@lithomas1 lithomas1 left a comment

Choose a reason for hiding this comment

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

Thanks, this looks good to me.

Just one minor comment.

pyproject.toml Outdated
# NumPy versions (if not it is presumably compatible with their version).
# Pin <2.0 for releases until tested against an RC. But explicitly allow
# testing the `.dev0` nightlies (which require the extra index).
"numpy<=2.0.0.dev0",
Copy link
Member

Choose a reason for hiding this comment

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

Can you set numpy >= 1.22.4 here to?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Some disucssion on NumPy after I did this, Ralf preferred to just remove the pin on main (it doesn't matter much) and solve the wheel building using no-build-isolation (which ignores the version pin anyway). This is the route astropy is going right now.

Added the lower pin, but also happy to try the other variant either way! (This might really be trying to be smart and failing.)

@lithomas1 lithomas1 added this to the 2.2 milestone Oct 24, 2023
I am not sure that this is uncontested that this is a good version
pin change.  I also took the liberty of removing the current use of
oldest-support-numpy, since Python 3.9 means that you should normally
always get 1.25 anyway and that should work for any NumPy version.

The `<=2.0.0.dev0` is a way to explicitly allow NumPy nightly wheels,
although of course you need the additional URL to use it.
In a release version, it might be nicer to not have it, but it also
should not really hurt since the you are unlikely to have the NumPy dev
wheels available unless you really want them.

(Not sure how to best test that the changes work as is.)
@seberg seberg force-pushed the numpy-pre-release branch from 9a1509f to d28400a Compare October 24, 2023 15:26
@lithomas1 lithomas1 merged commit aae33c0 into pandas-dev:main Oct 25, 2023
@lithomas1
Copy link
Member

thanks @seberg.

Let's put this in as is for now. I'll fiddle with it a little more if it ends up breaking something.

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.

3 participants