Page MenuHome

macOS: use find_package for finding Python
Needs ReviewPublic

Authored by Ankit Meel (ankitm) on Feb 9 2021, 3:53 PM.

Details

Reviewers
Brecht Van Lommel (brecht)
Group Reviewers
Platform: macOS
Summary

Avoid fiddling with trailing m or Python version or
paths like that of NumPy.

Accommodate Framework like from Homebrew for
bpy module.

Depends on D10368 because the CMake code internally
relies on import numpy which fails when NumPy
has a buggy backend.

Diff Detail

Repository
rB Blender
Branch
bpy (branched from master)
Build Status
Buildable 13425
Build 13425: arc lint + arc unit

Event Timeline

Ankit Meel (ankitm) requested review of this revision.Feb 9 2021, 3:53 PM
Ankit Meel (ankitm) created this revision.
Ankit Meel (ankitm) edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Feb 9 2021, 8:01 PM

@Sebastián Barschkis (sebbas) Expecting you to commit this after building numpy for x86_64, and also after resolving the CMake issues you were talking about in chat.

Ankit Meel (ankitm) planned changes to this revision.Feb 26 2021, 10:34 PM

Mind if I hold it till next weekend and fix framework finding code too ?
I could do guesswork now, but don't want to break bpy build.

  • Fix framework finding code too.

Since now CMake is looking in system folders, it might find other Python installations too.
The guarantee of finding only framework is not there as for Python_FIND_FRAMEWORK,
"ONLY" is not supported, next best thing is "FIRST". I tried a regex match if that's any
helpful.

This revision is now accepted and ready to land.Mar 10 2021, 8:10 AM
  • Ask for exact version.
Ankit Meel (ankitm) requested review of this revision.Mar 10 2021, 8:14 AM
  • Fix library folder
  • Fix version, flip conditionals, fix PYTHON_VERSION conflict
  • Rebase
Ankit Meel (ankitm) edited the summary of this revision. (Show Details)Aug 31 2021, 8:38 PM