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)
set(CMAKE_BUILD_TYPE Release)
set(CMAKE_BUILD_TYPE Release)
endif()
add_compile_options(-Wall -Wextra)
# TODO: enabled by LTO option
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
add_compile_options(-flto=full)
add_compile_options(-flto=full)
else ()
#add_compile_options(-flto) # TODO: only for g++
#add_compile_options(-flto) # TODO: only for g++
endif ()
# 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)

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
setup(
name="py-klotski",
version="0.0.1",
description="klotski engine",
author="Dnomd343",
license="MIT",
packages=["klotski"],
package_dir={"": "src"},
cmake_install_dir="src/klotski",
cmake_args=['-DKLSK_ENABLE_TESTING=OFF', '-DKLSK_ENABLE_BENCHMARK=OFF', '-DKLSK_C_FFI=OFF', '-DKLSK_RUST_FFI=OFF', '-DKLSK_PYTHON_FFI=ON'],
python_requires=">=3.9",
name='py-klotski',
version='0.0.1',
description='Klotski multifunctional engine with high performance',
author='Dnomd343',
author_email='dnomd343@gmail.com',
license='BSD-3-Clause',
url='https://github.com/dnomd343/klotski',
packages=['klotski'],
package_dir={'': 'src'},
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