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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

BLD: require numpy>=2.0.0rc1 at compile time #144

Merged
merged 1 commit into from
Apr 5, 2024

Conversation

neutrinoceros
Copy link
Contributor

As discussed in #143

This isn't just for the sake of following guidelines: it's actually helpful to anyone that would build pyerfa from source and would like to easily switch back and forth between versions of numpy, which, if we can't have pre-built wheels for macOS AMD (see #143 (comment)), includes me 馃槄

setup.cfg Outdated
zip_safe = False
tests_require = pytest-doctestplus
setup_requires = setuptools_scm
install_requires = numpy>=1.19
install_requires = numpy>=2.0.0rc1
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this line seems entirely redundant with pyproject.toml, however, it's been a while since I actually used setup.cfg so I'm only 99% confident. If that's desired, I'm game to pull the band aid and merge those two files together (which is essentially automated with the right tooling)

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's do that in a separate PR...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Of course

Copy link
Contributor

Choose a reason for hiding this comment

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

We don't want to pin numpy>2.0rc1 in install_requires - this is for runtime dependencies!

Copy link
Contributor

Choose a reason for hiding this comment

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

(this is different from setup_requires which is the old way of specifying build-time dependencies)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh my you're right. I meant to touch the previous line and didn't realize my mistake in review... will fix !

@neutrinoceros
Copy link
Contributor Author

I'm not convinced that failures are related. I'll try to refresh this later today and see if it's reproducible

@neutrinoceros neutrinoceros marked this pull request as ready for review April 2, 2024 09:56
Copy link
Contributor

@mhvk mhvk left a comment

Choose a reason for hiding this comment

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

I think I should have gotten this PR in before trying to put out a new pyerfa version. I had not realized our wheel building was dependent on what exactly was going on - pretty bad form really.

I still find the whole pip description of building things excruciating, but to be honest cannot quite care enough any more to try to make sense of it. If this works to get the right wheels on pypi, then let's just roll with it.

setup.cfg Outdated
zip_safe = False
tests_require = pytest-doctestplus
setup_requires = setuptools_scm
install_requires = numpy>=1.19
install_requires = numpy>=2.0.0rc1
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's do that in a separate PR...

setup.py Outdated
@@ -96,7 +96,10 @@ def get_extensions():
sources = [os.path.join('erfa', 'ufunc.c')]
include_dirs = []
libraries = []
define_macros = []
define_macros = [
Copy link
Contributor

Choose a reason for hiding this comment

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

Why this change? It seems reasonable, but perhaps good to add why it is even needed?

setup.cfg Outdated
@@ -20,11 +20,11 @@ classifiers =
[options]
# We set packages to find: to automatically find all sub-packages
packages = find:
requires = numpy
requires = numpy>=1.19.3 # keep in sync with NPY_TARGET_VERSION (setup.py)
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think requires is recommended anymore

@astrofrog
Copy link
Contributor

I think this PR would be fine if we remove requires and update install_requires to specify the minimum runtime dependency of numpy. @neutrinoceros - if you can make those updates, I'm happy to review tomorrow and see if we can cut another PyERFA release as @mhvk is away.

@neutrinoceros
Copy link
Contributor Author

neutrinoceros commented Apr 5, 2024

I just dropped the second commit as it was never necessary for this PR and actually broken (thanks @astrofrog for pointing it out). Now this PR should be minimal and will hopefully resolve the situation at astropy on release.
I'll set out to remove setup.cfg in another PR once we're out of trouble.

@neutrinoceros neutrinoceros changed the title BLD: move build metadata to pyproject.toml BLD: require numpy>=2.0.0rc1 at compile time Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants