Skip to content

Commit

Permalink
Set exclusive upper bound for Python version
Browse files Browse the repository at this point in the history
  • Loading branch information
kazarmy committed Oct 20, 2024
1 parent 0212980 commit 0fe73a1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include(DisallowInSource)
include(Utils)

set(CUTTER_PYTHON_MIN 3.5)
set(CUTTER_PYTHON_MIN_MAX 3.5...<3.13)

option(CUTTER_USE_BUNDLED_RIZIN "Use rizin from ./rizin submodule instead of searching for it on the system" ON)
option(CUTTER_USE_ADDITIONAL_RIZIN_PATHS "Search rizin in additional paths which are not part of default system library paths.\
Disable this option if you are linking against rizin pacakged as proper system library or in a custom path and additional are paths causing problems." ON)
option(CUTTER_ENABLE_PYTHON "Enable Python integration. Requires Python >= ${CUTTER_PYTHON_MIN}." OFF)
option(CUTTER_ENABLE_PYTHON "Enable Python integration. Requires Python at version ${CUTTER_PYTHON_MIN_MAX}." OFF)
option(CUTTER_ENABLE_PYTHON_BINDINGS "Enable generating Python bindings with Shiboken. Unused if CUTTER_ENABLE_PYTHON=OFF." OFF)
option(CUTTER_APPIMAGE_BUILD "Enable Appimage specific changes. Doesn't cause building of Appimage itself." OFF)
tri_option(CUTTER_ENABLE_KSYNTAXHIGHLIGHTING "Use KSyntaxHighlighting" AUTO)
Expand Down Expand Up @@ -94,10 +94,10 @@ find_package(${QT_PREFIX} REQUIRED COMPONENTS ${QT_COMPONENTS})
if(CUTTER_ENABLE_PYTHON)
if(CMAKE_VERSION VERSION_LESS "3.12.0")
find_package(PythonInterp REQUIRED)
find_package(PythonLibs ${CUTTER_PYTHON_MIN} REQUIRED)
find_package(PythonLibs ${CUTTER_PYTHON_MIN_MAX} REQUIRED)
include_directories(${PYTHON_INCLUDE_DIRS})
else()
find_package (Python3 ${CUTTER_PYTHON_MIN} REQUIRED COMPONENTS Interpreter Development)
find_package (Python3 ${CUTTER_PYTHON_MIN_MAX} REQUIRED COMPONENTS Interpreter Development)
set (PYTHON_EXECUTABLE ${Python3_EXECUTABLE})
endif()

Expand Down
2 changes: 1 addition & 1 deletion dist/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if(WIN32)
find_package(PythonInterp REQUIRED)
install(DIRECTORY ${CUTTER_DEPS}/pyside/lib/site-packages DESTINATION "python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}")
else()
find_package (Python3 ${CUTTER_PYTHON_MIN} REQUIRED COMPONENTS)
find_package (Python3 ${CUTTER_PYTHON_MIN_MAX} REQUIRED COMPONENTS)
install(DIRECTORY ${CUTTER_DEPS}/pyside/lib/site-packages DESTINATION "python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}")
endif()
install(FILES ${CUTTER_DEPS}/pyside/bin/shiboken6.abi3.dll ${CUTTER_DEPS}/pyside/bin/pyside6.abi3.dll DESTINATION .)
Expand Down

0 comments on commit 0fe73a1

Please sign in to comment.