Skip to content

Commit

Permalink
Merge pull request #8 from sy-c/master
Browse files Browse the repository at this point in the history
dropped python 2.7 support
  • Loading branch information
sy-c authored Oct 3, 2023
2 parents ea1a691 + 5992cc6 commit 2af8fa6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
8 changes: 1 addition & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
find_package(Python3 3.6 COMPONENTS Interpreter Development)
if (Python3_FOUND)
set(boost_python_component "python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}")
else()
message(WARNING "Python 3 was not found: falling back to Python 2")
find_package(Python2 2.7 COMPONENTS Development REQUIRED)
set(boost_python_component "python27")
endif()

find_package(Common REQUIRED)
Expand All @@ -89,7 +85,7 @@ add_library(LLA SHARED
)

target_sources(LLA PRIVATE
$<$<BOOL:${Python2_FOUND} OR ${Python3_FOUND}>:src/PythonInterface.cxx>
$<$<BOOL:${Python3_FOUND}>:src/PythonInterface.cxx>
src/InterprocessLockBase.cxx
src/NamedMutex.cxx
src/LockParameters.cxx
Expand All @@ -115,8 +111,6 @@ target_link_libraries(LLA
PUBLIC
${LINK_LIBS}
PRIVATE
$<$<BOOL:${Python2_FOUND}>:Boost::python27>
$<$<BOOL:${Python2_FOUND}>:Python2::Python>
$<$<BOOL:${Python3_FOUND}>:Boost::python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}>
$<$<BOOL:${Python3_FOUND}>:Python3::Python>
)
Expand Down
7 changes: 1 addition & 6 deletions cmake/LLAConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,9 @@ set(Common_CMAKE_DIR @Common_DIR@)
set(ReadoutCard_CMAKE_DIR @ReadoutCard_ROOT@)

if(NOT APPLE)
find_package(Python3 3.6 COMPONENTS Development)
find_package(Python3 3.6 COMPONENTS Interpreter Development)
if(Python3_FOUND)
set(boost_python_component "python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}")
else()
# Backwards compatible. Can be removed once the Python3 recipe is stable
message(WARNING "Python 3 was not found: falling back to Python 3")
find_package(Python2 2.7 COMPONENTS Development REQUIRED)
set(boost_python_component "python27")
endif()
endif()

Expand Down

0 comments on commit 2af8fa6

Please sign in to comment.