Skip to content

Commit

Permalink
Use Python 3.11 on mac too.
Browse files Browse the repository at this point in the history
Also got rid of special-case code to forestall accidentally finding an Intel Python on an M1 mac: this isn't a useful setup anymore.
  • Loading branch information
jackjansen committed Feb 23, 2024
1 parent 8a3645c commit b7ecdf2
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 32 deletions.
15 changes: 5 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,12 @@ elseif(UNIX)
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
endif()

# The upper limit on the Python version is caused by opencv and open3d,
# which can lag behind some times. As soon as those packages are available
# for a new release of Python we can update this version.
#
# On Mac we should pass the correct interpreter on the command line with Python3_ROOT_DIR
#
if(APPLE)
find_package(Python3 3.10 EXACT REQUIRED COMPONENTS Interpreter)
else()
# The upper limit on the Python version is caused by opencv and open3d,
# which can lag behind some times. As soon as those packages are available
# for a new release of Python we can update this version.
find_package(Python3 3.9...<3.12 REQUIRED COMPONENTS Interpreter)
endif()
find_package(Python3 3.9...<3.12 REQUIRED COMPONENTS Interpreter)

#
# Now we can setup the venv.
#
Expand Down
2 changes: 1 addition & 1 deletion cwipc_util
21 changes: 1 addition & 20 deletions scripts/buildall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,6 @@ cd $dirname

cmakeargs=""

#
# Finding the correct Python version that supports the packages we need
# (specifically open3d) is hell. Especially on macos. And even more especially
# on a Silicon mac that has both silicon-brew in /opt and intel-brew in /usr/local.
#
# As of this writing (2023-05-01) this is Python 3.10.
#
case `uname` in
Darwin)
python=python3.10
pythondir=$($python -c 'import sys; print(sys.prefix)')
cmakeargs="$cmakeargs -DPython3_ROOT_DIR=$pythondir -DCWIPC_SKIP_PYTHON_INSTALL=1"
;;
esac

notest=
case x$1 in
x--notest)
Expand Down Expand Up @@ -75,9 +60,5 @@ fi

if [ "$noinstall" != "noinstall" ]; then
$sudo cmake --install build
case `uname` in
Darwin)
CWIPC_PYTHON=python3.10 $sudo cwipc_pymodules_install.sh
;;
esac

fi
1 change: 0 additions & 1 deletion scripts/install-3rdparty-osx1015.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ brew install pkg-config || brew upgrade pkg-config
brew install homebrew/core/glfw3 || brew upgrade homebrew/core/glfw3
brew install librealsense || brew upgrade librealsense
brew install jpeg-turbo || brew upgrade jpeg-turbo
brew unlink jpeg
brew link --force jpeg-turbo

# Install Python delendencies
Expand Down

0 comments on commit b7ecdf2

Please sign in to comment.