Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion bindings/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ add_subdirectory(../.. libremidi-src)

find_package(Python 3.8 COMPONENTS Interpreter Development.Module REQUIRED)

if(NOT readerwriterqueue_FOUND AND NOT TARGET readerwriterqueue)
FetchContent_Declare(
readerwriterqueue
GIT_REPOSITORY https://github.com/cameron314/readerwriterqueue
GIT_TAG master
)

FetchContent_MakeAvailable(readerwriterqueue)
endif()

FetchContent_Declare(
nanobind
GIT_REPOSITORY https://github.com/wjakob/nanobind
Expand All @@ -20,4 +30,6 @@ FetchContent_Declare(

FetchContent_MakeAvailable(nanobind)
nanobind_add_module(pylibremidi pylibremidi.cpp)
target_link_libraries(pylibremidi PUBLIC libremidi readerwriterqueue)
target_link_libraries(pylibremidi PUBLIC libremidi readerwriterqueue Boost::variant2 Boost::container)

install(TARGETS pylibremidi LIBRARY DESTINATION .)
20 changes: 19 additions & 1 deletion cmake/libremidi.deps.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,25 @@ if(LIBREMIDI_NO_BOOST AND LIBREMIDI_FIND_BOOST)
endif()

if(LIBREMIDI_FIND_BOOST)
find_package(Boost REQUIRED OPTIONAL_COMPONENTS cobalt)
find_package(Boost OPTIONAL_COMPONENTS cobalt)

if(NOT Boost_FOUND)
set(BOOST_ENABLE_CMAKE ON)
set(BOOST_INCLUDE_LIBRARIES container asio variant2 cobalt)

FetchContent_Declare(
Boost
GIT_REPOSITORY https://github.com/boostorg/boost.git
GIT_TAG boost-1.89.0
GIT_PROGRESS ON
GIT_SHALLOW TRUE
OVERRIDE_FIND_PACKAGE TRUE
)

FetchContent_MakeAvailable(Boost)

find_package(Boost REQUIRED OPTIONAL_COMPONENTS cobalt)
endif()
endif()

# readerwriterqueue
Expand Down
117 changes: 117 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
[build-system]
requires = ["scikit-build-core >=0.4.3", "nanobind >=1.3.2"]
build-backend = "scikit_build_core.build"

[project]
name = "pylibremidi"
version = "5.3.1"
description = "A modern C++ MIDI 1 / MIDI 2 real-time & file I/O library. Supports Windows, macOS, Linux and WebMIDI."
readme = "README.md"
requires-python = ">=3.8"
authors = [
# Git history
{ name = "Celerier Jean-Michaël", email = "[email protected]" },
{ name = "Caleb Xu", email = "[email protected]" },
{ name = "Eric Conlon", email = "[email protected]" },
{ name = "Alyssa Ross", email = "[email protected]" },
{ name = "Atsushi Eno", email = "[email protected]" },
{ name = "Gabe Gonzalez", email = "[email protected]" },
{ name = "Andrew McCann", email = "[email protected]" },
{ name = "fwcd", email = "[email protected]" },
{ name = "christoph", email = "[email protected]" },
{ name = "neil", email = "[email protected]" },
{ name = "Yuri Victorovich", email = "[email protected]" },
{ name = "Ivan Hawkes", email = "[email protected]" },
{ name = "Jan Schuerman", email = "[email protected]" },
{ name = "tmwsnrx", email = "[email protected]" },
{ name = "Martin Stimpfl", email = "[email protected]" },
{ name = "HyperLan-git", email = "[email protected]" },
{ name = "Dimitre", email = "[email protected]" },
{ name = "bratner", email = "[email protected]" },
{ name = "Curve", email = "[email protected]" },
{ name = "Christopher P. Yarger", email = "[email protected]" },
{ name = "Jonathan Lidbeck", email = "[email protected]" },
{ name = "Christopher P Yarger", email = "[email protected]" },
{ name = "Cacodemon345", email = "[email protected]" },
{ name = "Yuriy Yashchenko", email = "[email protected]" },
{ name = "Yuriy Yashchenko", email = "[email protected]" },

# Original rtmidi authors
{ name = "Adam Avramov", email = "[email protected]" },
{ name = "aib", email = "[email protected]" },
{ name = "Alexandros Theodotou", email = "[email protected]" },
{ name = "amosonn", email = "[email protected]" },
{ name = "andrew morton", email = "[email protected]" },
{ name = "Ashley Hedges", email = "[email protected]" },
{ name = "Atsushi Eno", email = "[email protected]" },
{ name = "Bartek Łukawski", email = "[email protected]" },
{ name = "Bart Spaans", email = "[email protected]" },
{ name = "Ben Swift", email = "[email protected]" },
{ name = "Chris Chronopoulos", email = "[email protected]" },
{ name = "Christian Köstlin", email = "[email protected]" },
{ name = "Christopher Arndt", email = "[email protected]" },
{ name = "emlai", email = "[email protected]" },
{ name = "Francisco Demartino", email = "[email protected]" },
{ name = "Gary Scavone", email = "[email protected]" },
{ name = "garyscavone", email = "[email protected]" },
{ name = "Hugo Hromic", email = "[email protected]" },
{ name = "IOhannes m zmölnig", email = "[email protected]" },
{ name = "Jake Sandlund", email = "[email protected]" },
{ name = "Jean-Michaël Celerier", email = "[email protected]" },
{ name = "jgvictores", email = "[email protected]" },
{ name = "johnty", email = "[email protected]" },
{ name = "JP Cimalando", email = "[email protected]" },
{ name = "kidproquo", email = "[email protected]" },
{ name = "Lane Spangler", email = "[email protected]" },
{ name = "Martin Delille", email = "[email protected]" },
{ name = "Mattes D", email = "[email protected]" },
{ name = "mcc", email = "[email protected]" },
{ name = "Michael Dahl", email = "[email protected]" },
{ name = "Nicolas Boulenguez", email = "[email protected]" },
{ name = "Nicolas Boulenguez", email = "[email protected]" },
{ name = "Oli Larkin", email = "[email protected]" },
{ name = "Phildo", email = "[email protected]" },
{ name = "philip", email = "[email protected]" },
{ name = "Przemyslaw Wegrzyn", email = "[email protected]" },
{ name = "Rémy Mouëza", email = "[email protected]" },
{ name = "Rian Hunter", email = "[email protected]" },
{ name = "Rory Jaffe", email = "[email protected]" },
{ name = "Ryan Schmidt", email = "[email protected]" },
{ name = "sagamusix", email = "[email protected]" },
{ name = "Saga Musix", email = "[email protected]" },
{ name = "Sam Hocevar", email = "[email protected]" },
{ name = "Sebastien Alaiwan", email = "[email protected]" },
{ name = "Serge A. Zaitsev", email = "[email protected]" },
{ name = "Stephen Sinclair", email = "[email protected]" },
{ name = "Stephen Sinclair", email = "[email protected]" },
{ name = "Stephen Sinclair", email = "[email protected]" },
{ name = "Stephen Sinclair", email = "[email protected]" },
{ name = "Szymon Kaliski", email = "[email protected]" },
{ name = "Thiago Goulart", email = "[email protected]" },
{ name = "Tiago Morais Morgado", email = "[email protected]" },
{ name = "Tobias Schlemmer", email = "[email protected]" },
{ name = "Yuri", email = "[email protected]" },

# Original ModernMIDI authors
{ name = "Dimitri Diakopoulos", email = "[email protected]" },
{ name = "Lauren Hughes", email = "[email protected]" },

]
license-files = [
"LICENSE.md"
]
license = "MIT AND BSD-2-Clause"

[project.urls]
Homepage = "https://github.com/celtera/libremidi"

[tool.scikit-build]
# Protect the configuration against future changes in scikit-build-core
minimum-version = "0.4"
cmake.source-dir = "./bindings/python"

# Setuptools-style build caching in a local directory
build-dir = "build/{wheel_tag}"

# Build stable ABI wheels for CPython 3.10+
wheel.py-api = "cp310"
Loading