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

Remove usage of deprecated distutils in cmake files #1032

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

hmaarrfk
Copy link

@hmaarrfk hmaarrfk commented Oct 1, 2023

I didn't have a chance to go through the whole repo, but I made this PR upstream to zfpy which vendors some files

LLNL/zfp#217

If you want to monitor if this "works", please check build logs in conda-forge/zfpy-feedstock#35

goodluck modernizing this.

There seems to be only a finite number of occurrences of distutils

grep "(from|import) distutils" . -RE

@codecov
Copy link

codecov bot commented Oct 1, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (59492c1) 86.19% compared to head (f0a062a) 86.19%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1032   +/-   ##
=======================================
  Coverage   86.19%   86.19%           
=======================================
  Files          32       32           
  Lines        1579     1579           
  Branches      351      351           
=======================================
  Hits         1361     1361           
  Misses        155      155           
  Partials       63       63           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@henryiii
Copy link
Contributor

FYI, I think this might need to be conditional, as there were some issues with sysconfig before 3.10 or so.

@hmaarrfk
Copy link
Author

lets see if i got the condition right.

@hmaarrfk
Copy link
Author

Are you OK bumping cmake to 3.12?

If so, we can use

Python_SITELIB

https://cmake.org/cmake/help/latest/module/FindPython.html

@henryiii
Copy link
Contributor

Ahh, forgot about this, feel free to ping me. This fixes #1047. I'd probably wait to increase the CMake version until scikit-build-core becomes the backend. And we can't move from FindPythonInterp/Libs to FindPython, that's a major breaking change - and people using FindPython don't really need this helper. (Also the first version that works correctly is 3.18-3.26 or so, depending on what you need. Which is why scikit-build-core provides an optional backport for 3.15+).

@henryiii
Copy link
Contributor

This produces:

Could NOT find NumPy (missing: NumPy_CONV_TEMPLATE_EXECUTABLE
  NumPy_FROM_TEMPLATE_EXECUTABLE) 

IMO NumPy changes should be broken out.

@hmaarrfk
Copy link
Author

Sorry for the delay on my part, i was circling around to this since I remembered your suggestions and was surprised to see that you had merged them in, i have no problem with this. i decided to rebase and push.

One final thing: I want to make sure that you are still interested in Python 3.9 in light of SPEC 0

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

2 participants