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

NumPy 2.0 build support #328

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

NumPy 2.0 build support #328

wants to merge 1 commit into from

Conversation

timkpaine
Copy link
Member

@timkpaine timkpaine commented Jul 13, 2024

This PR does three things:

  • adds build support for numpy 2.0, but without modifying the existing requirements to allow for numpy 2 during build or runtime
  • adds compatibility code to build between numpy versions from this document
  • updates the dependency checks part of CI to allow for build time tests as well
    • tweaks the logic slightly to allow for groups of dependencies
    • splits the checks into test time checks (e.g. for runtime compatibility) and build time checks
    • runs the build for build time checks, runs the testing for both build and test time checks

If we merge this PR, we should open a ticket to do the following:

  • Drop support for python 3.8 (no numpy 2)
  • Move build from oldest-supported-numpy to numpy>=2, as it is backwards compatible but requires python 3.9+
  • remove runtime dep on numpy<2

ref #58

@timkpaine timkpaine added part: dependencies PRs that update a dependency file part: build Issues and PRs related to the build process labels Jul 13, 2024
@timkpaine timkpaine force-pushed the tkp/np2 branch 10 times, most recently from b19fe80 to 53143d7 Compare July 13, 2024 20:12
@timkpaine
Copy link
Member Author

timkpaine commented Jul 13, 2024

From the build test_buildtime_dependencies:

-- Found Numpy: /opt/python/cp39-cp39/lib/python3.9/site-packages/numpy/_core/include (found version "2.0.0")

...

Run python -m pip install -U "numpy>=2" "pandas>=2.2" "pyarrow>=16.1"
Requirement already satisfied: numpy>=2 in /opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages (2.0.0)
Requirement already satisfied: pandas>=2.2 in /opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages (2.2.2)
Requirement already satisfied: pyarrow>=16.1 in /opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages (16.1.0)

...

====== 934 passed, 84 skipped, 3 xfailed, 52 warnings in 64.73s (0:01:04) ======

@timkpaine timkpaine marked this pull request as ready for review July 13, 2024 21:11
cpp/csp/python/Common.h Show resolved Hide resolved
cpp/csp/python/Common.h Show resolved Hide resolved
.github/workflows/build.yml Show resolved Hide resolved
Signed-off-by: Tim Paine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
part: build Issues and PRs related to the build process part: dependencies PRs that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants