Browse Source

build: python packing configuration

master
Dnomd343 1 month ago
parent
commit
9d09113280
  1. 10
      CMakeLists.txt
  2. 8
      src/core_ffi/py_ffi/packing/README.md
  3. 28
      src/core_ffi/py_ffi/packing/setup.py

10
CMakeLists.txt

@ -15,20 +15,22 @@ option(KLSK_RUST_FFI "" ON)
# ------------------------------------------------------------------------------------ # # ------------------------------------------------------------------------------------ #
if (NOT CMAKE_BUILD_TYPE) if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release) set(CMAKE_BUILD_TYPE Release)
endif() endif()
add_compile_options(-Wall -Wextra) add_compile_options(-Wall -Wextra)
# TODO: enabled by LTO option # TODO: enabled by LTO option
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
add_compile_options(-flto=full) add_compile_options(-flto=full)
else () else ()
#add_compile_options(-flto) # TODO: only for g++ #add_compile_options(-flto) # TODO: only for g++
endif () endif ()
# TODO: for python-ffi # TODO: for python-ffi
#set(CMAKE_POSITION_INDEPENDENT_CODE ON) if (SKBUILD)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif()
get_filename_component(KLSK_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR} ABSOLUTE) get_filename_component(KLSK_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR} ABSOLUTE)

8
src/core_ffi/py_ffi/packing/README.md

@ -1 +1,7 @@
# klotski python ffi # Klotski Engine
> Klotski multifunctional engine with high performance.
The project is under development and is currently in feature preview.
Note that the interfaces are not stable yet, and documentation will be added in subsequent versions.

28
src/core_ffi/py_ffi/packing/setup.py

@ -1,14 +1,22 @@
from skbuild import setup from skbuild import setup
setup( setup(
name="py-klotski", name='py-klotski',
version="0.0.1", version='0.0.1',
description="klotski engine", description='Klotski multifunctional engine with high performance',
author="Dnomd343", author='Dnomd343',
license="MIT", author_email='dnomd343@gmail.com',
packages=["klotski"], license='BSD-3-Clause',
package_dir={"": "src"}, url='https://github.com/dnomd343/klotski',
cmake_install_dir="src/klotski", packages=['klotski'],
cmake_args=['-DKLSK_ENABLE_TESTING=OFF', '-DKLSK_ENABLE_BENCHMARK=OFF', '-DKLSK_C_FFI=OFF', '-DKLSK_RUST_FFI=OFF', '-DKLSK_PYTHON_FFI=ON'], package_dir={'': 'src'},
python_requires=">=3.9", cmake_install_dir='src/klotski',
cmake_args=[
'-DKLSK_ENABLE_TESTING:BOOL=OFF',
'-DKLSK_ENABLE_BENCHMARK:BOOL=OFF',
'-DKLSK_C_FFI:BOOL=OFF',
'-DKLSK_RUST_FFI:BOOL=OFF',
'-DKLSK_PYTHON_FFI:BOOL=ON',
],
python_requires=">=3.7",
) )

Loading…
Cancel
Save