Skip to content

Commit

Permalink
[python] Add initial python bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelerier committed Sep 8, 2024
1 parent 87cb9d1 commit 5e9e23a
Show file tree
Hide file tree
Showing 5 changed files with 391 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bindings/python/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

ColumnLimit: 200
16 changes: 16 additions & 0 deletions bindings/python/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
cmake_minimum_required(VERSION 3.28 FATAL_ERROR)
project(pylibremidi)

set(LIBREMIDI_HEADER_ONLY 1)
add_subdirectory(../.. libremidi-src)
find_package(Python 3.8 COMPONENTS Interpreter Development.Module REQUIRED)

FetchContent_Declare(
nanobind
GIT_REPOSITORY https://github.com/wjakob/nanobind
GIT_TAG master
)

FetchContent_MakeAvailable(nanobind)
nanobind_add_module(pylibremidi pylibremidi.cpp)
target_link_libraries(pylibremidi PRIVATE libremidi)
Loading

0 comments on commit 5e9e23a

Please sign in to comment.