Skip to content

Commit

Permalink
Use Cython module
Browse files Browse the repository at this point in the history
  • Loading branch information
lisitsyn committed Apr 15, 2024
1 parent 1235ff0 commit e201c47
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 22 deletions.
5 changes: 2 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,11 @@ endmacro()
option(BUILD_PYTHON "Whether to build Python interface" ON)
if (BUILD_PYTHON)
find_package(Python3 REQUIRED COMPONENTS Interpreter Development)
find_package(Cython REQUIRED)
set(_pyx_compiled_source "${CMAKE_CURRENT_BINARY_DIR}/tapkee.pyx.c")
set(_pyx_compiled_source "${CMAKE_CURRENT_BINARY_DIR}/pytapkee.c")
set(_pyx_source "${CMAKE_CURRENT_SOURCE_DIR}/src/python/tapkee.pyx")
add_custom_command(
OUTPUT ${_pyx_compiled_source}
COMMAND ${CYTHON_EXECUTABLE} --cplus -o ${_pyx_compiled_source} ${_pyx_source}
COMMAND ${Python3_EXECUTABLE} -m cython --cplus -o ${_pyx_compiled_source} ${_pyx_source}
DEPENDS ${_pyx_source}
COMMENT "Generating Cython files ${_pyx_compiled_source}"
)
Expand Down
19 changes: 0 additions & 19 deletions src/cmake/FindCython.cmake

This file was deleted.

0 comments on commit e201c47

Please sign in to comment.