Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 3 additions & 1 deletion bindings/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,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
29 changes: 29 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[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 = [
{ name = "Celerier Jean-Michaël", email = "[email protected]" },
]
classifiers = [
"License :: BSD2",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way to identify the licenses of the project? They aren't a "OR" but a "AND"

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My bad, didn't read enough of the readme.

According to the packaging guide

As per PEP 639 licenses should be declared with two fields:

So yes I can specify multiple licenses but I don't think I can specify where they apply. would the following be ok?:

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes thanks!

]
[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"