supriya-midi 26.4b0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. supriya_midi-26.4b0/.github/workflows/publish.yaml +131 -0
  2. supriya_midi-26.4b0/.github/workflows/release.yaml +47 -0
  3. supriya_midi-26.4b0/.github/workflows/test.yaml +108 -0
  4. supriya_midi-26.4b0/.gitignore +213 -0
  5. supriya_midi-26.4b0/.gitmodules +6 -0
  6. supriya_midi-26.4b0/.pre-commit-config.yaml +23 -0
  7. supriya_midi-26.4b0/CMakeLists.txt +45 -0
  8. supriya_midi-26.4b0/LICENSE +21 -0
  9. supriya_midi-26.4b0/Makefile +27 -0
  10. supriya_midi-26.4b0/PKG-INFO +85 -0
  11. supriya_midi-26.4b0/README.md +77 -0
  12. supriya_midi-26.4b0/dev/bump-version.py +55 -0
  13. supriya_midi-26.4b0/docs/Makefile +20 -0
  14. supriya_midi-26.4b0/docs/make.bat +35 -0
  15. supriya_midi-26.4b0/docs/source/api.rst +46 -0
  16. supriya_midi-26.4b0/docs/source/basic-usage.rst +49 -0
  17. supriya_midi-26.4b0/docs/source/changelog.rst +7 -0
  18. supriya_midi-26.4b0/docs/source/conf.py +79 -0
  19. supriya_midi-26.4b0/docs/source/favicon.ico +0 -0
  20. supriya_midi-26.4b0/docs/source/icon.svg +43 -0
  21. supriya_midi-26.4b0/docs/source/index.rst +43 -0
  22. supriya_midi-26.4b0/docs/source/installation.rst +71 -0
  23. supriya_midi-26.4b0/pyproject.toml +56 -0
  24. supriya_midi-26.4b0/src/supriya_midi/__init__.py +515 -0
  25. supriya_midi-26.4b0/src/supriya_midi/_midi.cpp +114 -0
  26. supriya_midi-26.4b0/src/supriya_midi/_midi.pyi +89 -0
  27. supriya_midi-26.4b0/src/supriya_midi/_version.py +12 -0
  28. supriya_midi-26.4b0/src/supriya_midi/py.typed +0 -0
  29. supriya_midi-26.4b0/tests/__init__.py +0 -0
  30. supriya_midi-26.4b0/tests/conftest.py +47 -0
  31. supriya_midi-26.4b0/tests/test_basic.py +74 -0
  32. supriya_midi-26.4b0/tests/test_delete.py +37 -0
  33. supriya_midi-26.4b0/tests/test_error_callback.py +74 -0
  34. supriya_midi-26.4b0/tests/test_port_number.py +23 -0
  35. supriya_midi-26.4b0/tests/test_set_client_name.py +29 -0
  36. supriya_midi-26.4b0/tests/test_set_port_name.py +27 -0
  37. supriya_midi-26.4b0/tests/test_virtual_ports.py +127 -0
  38. supriya_midi-26.4b0/tests/test_wheels.py +27 -0
  39. supriya_midi-26.4b0/uv.lock +1054 -0
@@ -0,0 +1,131 @@
1
+ name: Publish
2
+ on:
3
+ release:
4
+ types: [released]
5
+
6
+ concurrency:
7
+ group: ${{ github.workflow }}-${{ github.ref }}
8
+ cancel-in-progress: true
9
+
10
+ jobs:
11
+
12
+ build-docs:
13
+ name: Build docs
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@v6
17
+ with:
18
+ submodules: recursive
19
+ - uses: astral-sh/setup-uv@v7
20
+ with:
21
+ python-version: "3.14"
22
+ - name: Sync
23
+ run: uv sync
24
+ - name: Build docs
25
+ run: uv run make -C docs html
26
+ - uses: actions/upload-artifact@v6
27
+ with:
28
+ name: docs
29
+ path: ./docs/build/html/
30
+
31
+ build-sdist:
32
+ name: Build distribution archives
33
+ runs-on: ubuntu-latest
34
+ steps:
35
+ - uses: actions/checkout@v6
36
+ - uses: astral-sh/setup-uv@v7
37
+ with:
38
+ python-version: "3.14"
39
+ - name: Build sdist
40
+ run: uv build --sdist
41
+ - uses: actions/upload-artifact@v6
42
+ with:
43
+ name: dist-sdist
44
+ path: dist/*.tar.gz
45
+
46
+ build-wheels:
47
+ name: Build wheels
48
+ runs-on: ${{ matrix.os }}
49
+ steps:
50
+ - uses: actions/checkout@v6
51
+ with:
52
+ submodules: recursive
53
+ - name: Build wheels
54
+ env:
55
+ CIBW_ARCHS: ${{ matrix.arch }}
56
+ CIBW_BUILD: ${{ matrix.build }}
57
+ uses: pypa/cibuildwheel@v3.4.0
58
+ - name: Upload wheels
59
+ uses: actions/upload-artifact@v6
60
+ with:
61
+ name: wheel-${{ matrix.dist }}
62
+ path: ./wheelhouse/*.whl
63
+ strategy:
64
+ fail-fast: false
65
+ matrix:
66
+ include:
67
+ - {os: macos-15, arch: x86_64, build: "cp3{10,11,12,13,14}-*", dist: macos-amd}
68
+ - {os: macos-15, arch: arm64, build: "cp3{10,11,12,13,14}-*", dist: macos-arm}
69
+ - {os: ubuntu-24.04, arch: auto, build: "cp3{10,11,12,13,14}-manylinux*", dist: manylinux-amd}
70
+ - {os: ubuntu-24.04, arch: auto, build: "cp3{10,11,12,13,14}-musllinux*", dist: musllinux-amd}
71
+ - {os: ubuntu-24.04-arm, arch: auto, build: "cp3{10,11,12,13,14}-manylinux*", dist: manylinux-arm}
72
+ - {os: ubuntu-24.04-arm, arch: auto, build: "cp3{10,11,12,13,14}-musllinux*", dist: musllinux-arm}
73
+ - {os: windows-latest, arch: AMD64, build: "cp3{10,11,12,13,14}-*", dist: windows-amd}
74
+ - {os: windows-latest, arch: ARM64, build: "cp3{10,11,12,13,14}-*", dist: windows-arm}
75
+
76
+ upload-to-testpypi:
77
+ name: Publish release to Test PyPI
78
+ environment: testpypi
79
+ needs: [build-wheels, build-sdist]
80
+ permissions:
81
+ id-token: write
82
+ runs-on: ubuntu-latest
83
+ steps:
84
+ - uses: actions/download-artifact@v7
85
+ with:
86
+ merge-multiple: true
87
+ path: dist
88
+ pattern: dist-*
89
+ - uses: pypa/gh-action-pypi-publish@release/v1
90
+ with:
91
+ repository-url: https://test.pypi.org/legacy/
92
+
93
+ upload-to-pypi:
94
+ name: Publish release to PyPI
95
+ environment: pypi
96
+ needs: [build-wheels, build-sdist, upload-to-testpypi]
97
+ permissions:
98
+ id-token: write
99
+ runs-on: ubuntu-latest
100
+ steps:
101
+ - uses: actions/download-artifact@v7
102
+ with:
103
+ merge-multiple: true
104
+ path: dist
105
+ pattern: dist-*
106
+ - uses: pypa/gh-action-pypi-publish@release/v1
107
+
108
+ update-gh-pages:
109
+ name: Update gh-pages
110
+ needs: [upload-to-pypi]
111
+ runs-on: ubuntu-latest
112
+ steps:
113
+ - uses: actions/download-artifact@v7
114
+ with:
115
+ name: docs
116
+ path: docs
117
+ - uses: actions/checkout@v6
118
+ with:
119
+ path: gh-pages
120
+ ref: gh-pages
121
+ - name: Rsync docs
122
+ run: rsync -rtv --del --exclude=.git docs/ gh-pages/
123
+ - name: Touch .nojekyll
124
+ run: touch gh-pages/.nojekyll
125
+ - uses: peaceiris/actions-gh-pages@v4.0.0
126
+ with:
127
+ allow_empty_commit: true
128
+ github_token: ${{ secrets.GITHUB_TOKEN }}
129
+ publish_dir: gh-pages
130
+ user_name: github-actions[bot]
131
+ user_email: github-actions[bot]@users.noreply.github.com
@@ -0,0 +1,47 @@
1
+ name: Release
2
+
3
+ on:
4
+ workflow_dispatch:
5
+
6
+ concurrency:
7
+ group: "${{ github.workflow }}"
8
+
9
+ env:
10
+ GH_TOKEN: "${{ github.token }}"
11
+
12
+ jobs:
13
+
14
+ bump-version:
15
+ name: Bump version
16
+ runs-on: ubuntu-latest
17
+ steps:
18
+ - uses: actions/checkout@v6
19
+ with:
20
+ submodules: recursive
21
+ - uses: astral-sh/setup-uv@v7
22
+ with:
23
+ python-version: "3.14"
24
+ - name: Get latest version
25
+ run: echo OLD_VERSION=$(gh release list -L 1 --json name | jq -r '.[0].name') >> $GITHUB_ENV
26
+ - name: Bump version file
27
+ run: echo NEW_VERSION=$(uv run dev/bump-version.py "${OLD_VERSION}") >> $GITHUB_ENV
28
+ - name: Debug
29
+ run: |
30
+ echo "${OLD_VERSION}"
31
+ echo "${NEW_VERSION}"
32
+ - name: uv lock
33
+ run: uv lock
34
+ - name: Push changes
35
+ run: |
36
+ git config user.name "GitHub Actions Bot"
37
+ git config user.email "<>"
38
+ git add .
39
+ git commit -m "Bump version to ${NEW_VERSION}"
40
+ git push
41
+ - name: Create release
42
+ uses: softprops/action-gh-release@v2
43
+ with:
44
+ draft: true
45
+ generate_release_notes: true
46
+ name: "${{ env.NEW_VERSION }}"
47
+ tag_name: "v${{ env.NEW_VERSION }}"
@@ -0,0 +1,108 @@
1
+ name: Test
2
+
3
+ on:
4
+ pull_request:
5
+ branches:
6
+ - main
7
+ push:
8
+ branches:
9
+ - main
10
+ schedule:
11
+ - cron: "0 0 * * 0"
12
+
13
+ concurrency:
14
+ group: ${{ github.workflow }}-${{ github.ref }}
15
+ cancel-in-progress: true
16
+
17
+ jobs:
18
+
19
+ lint:
20
+ name: Lint
21
+ runs-on: ubuntu-latest
22
+ steps:
23
+ - uses: actions/checkout@v6
24
+ with:
25
+ submodules: recursive
26
+ - uses: astral-sh/setup-uv@v7
27
+ with:
28
+ python-version: "3.14"
29
+ - name: Install supriya-midi
30
+ run: uv sync
31
+ - name: Format check
32
+ run: uv run ruff format --check src/ tests/
33
+ - name: Lint
34
+ run: uv run ruff check src/ tests/
35
+ - name: Type check
36
+ run: uv run ty check src/ tests/
37
+
38
+ # N.B. /dev/snd/seq isn't available on the Ubuntu runner and I haven't
39
+ # succeeded in spinning up a nested Multipass VM so we'll just test OSX and
40
+ # Windows.
41
+ #
42
+ # See also: https://github.com/Jajcus/python-alsa-midi/blob/main/.github/workflows/ci.yml#L65-L98
43
+ # but copying the Multipass steps here fails when starting the VM. Can't tell why.
44
+ test:
45
+ name: Test
46
+ runs-on: ${{ matrix.os }}
47
+ steps:
48
+ - uses: actions/checkout@v6
49
+ with:
50
+ submodules: recursive
51
+ - uses: astral-sh/setup-uv@v7
52
+ with:
53
+ python-version: "3.14"
54
+ - name: Sync
55
+ run: uv sync
56
+ - name: Pip install
57
+ run: uv pip install -e . -v
58
+ - name: Test
59
+ run: uv run pytest -v
60
+ strategy:
61
+ fail-fast: false
62
+ matrix:
63
+ os: [macos-15, windows-latest]
64
+
65
+ build-docs:
66
+ name: Build docs
67
+ runs-on: ubuntu-latest
68
+ steps:
69
+ - uses: actions/checkout@v6
70
+ with:
71
+ submodules: recursive
72
+ - uses: astral-sh/setup-uv@v7
73
+ with:
74
+ python-version: "3.14"
75
+ - name: Sync
76
+ run: uv sync
77
+ - name: Build docs
78
+ run: uv run make -C docs html
79
+
80
+ build-wheels:
81
+ name: Build wheels
82
+ runs-on: ${{ matrix.os }}
83
+ steps:
84
+ - uses: actions/checkout@v6
85
+ with:
86
+ submodules: recursive
87
+ - name: Build wheels
88
+ env:
89
+ CIBW_ARCHS: ${{ matrix.arch }}
90
+ CIBW_BUILD: ${{ matrix.build }}
91
+ uses: pypa/cibuildwheel@v3.4.0
92
+ - name: Upload wheels
93
+ uses: actions/upload-artifact@v6
94
+ with:
95
+ name: wheel-${{ matrix.dist }}
96
+ path: ./wheelhouse/*.whl
97
+ strategy:
98
+ fail-fast: false
99
+ matrix:
100
+ include:
101
+ - {os: macos-15, arch: x86_64, build: "cp3{10,11,12,13,14}-*", dist: macos-amd}
102
+ - {os: macos-15, arch: arm64, build: "cp3{10,11,12,13,14}-*", dist: macos-arm}
103
+ - {os: ubuntu-24.04, arch: auto, build: "cp3{10,11,12,13,14}-manylinux*", dist: manylinux-amd}
104
+ - {os: ubuntu-24.04, arch: auto, build: "cp3{10,11,12,13,14}-musllinux*", dist: musllinux-amd}
105
+ - {os: ubuntu-24.04-arm, arch: auto, build: "cp3{10,11,12,13,14}-manylinux*", dist: manylinux-arm}
106
+ - {os: ubuntu-24.04-arm, arch: auto, build: "cp3{10,11,12,13,14}-musllinux*", dist: musllinux-arm}
107
+ - {os: windows-latest, arch: AMD64, build: "cp3{10,11,12,13,14}-*", dist: windows-amd}
108
+ - {os: windows-latest, arch: ARM64, build: "cp3{10,11,12,13,14}-*", dist: windows-arm}
@@ -0,0 +1,213 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[codz]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py.cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # UV
98
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ #uv.lock
102
+
103
+ # poetry
104
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
106
+ # commonly ignored for libraries.
107
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108
+ #poetry.lock
109
+ #poetry.toml
110
+
111
+ # pdm
112
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
113
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
114
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
115
+ #pdm.lock
116
+ #pdm.toml
117
+ .pdm-python
118
+ .pdm-build/
119
+
120
+ # pixi
121
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
122
+ #pixi.lock
123
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
124
+ # in the .venv directory. It is recommended not to include this directory in version control.
125
+ .pixi
126
+
127
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
128
+ __pypackages__/
129
+
130
+ # Celery stuff
131
+ celerybeat-schedule
132
+ celerybeat.pid
133
+
134
+ # SageMath parsed files
135
+ *.sage.py
136
+
137
+ # Environments
138
+ .env
139
+ .envrc
140
+ .venv
141
+ env/
142
+ venv/
143
+ ENV/
144
+ env.bak/
145
+ venv.bak/
146
+
147
+ # Spyder project settings
148
+ .spyderproject
149
+ .spyproject
150
+
151
+ # Rope project settings
152
+ .ropeproject
153
+
154
+ # mkdocs documentation
155
+ /site
156
+
157
+ # mypy
158
+ .mypy_cache/
159
+ .dmypy.json
160
+ dmypy.json
161
+
162
+ # Pyre type checker
163
+ .pyre/
164
+
165
+ # pytype static type analyzer
166
+ .pytype/
167
+
168
+ # Cython debug symbols
169
+ cython_debug/
170
+
171
+ # PyCharm
172
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
173
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
174
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
175
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
176
+ #.idea/
177
+
178
+ # Abstra
179
+ # Abstra is an AI-powered process automation framework.
180
+ # Ignore directories containing user credentials, local state, and settings.
181
+ # Learn more at https://abstra.io/docs
182
+ .abstra/
183
+
184
+ # Visual Studio Code
185
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
186
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
187
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
188
+ # you could uncomment the following to ignore the entire vscode folder
189
+ # .vscode/
190
+
191
+ # Ruff stuff:
192
+ .ruff_cache/
193
+
194
+ # PyPI configuration file
195
+ .pypirc
196
+
197
+ # Cursor
198
+ # Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
199
+ # exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
200
+ # refer to https://docs.cursor.com/context/ignore-files
201
+ .cursorignore
202
+ .cursorindexingignore
203
+
204
+ # Marimo
205
+ marimo/_static/
206
+ marimo/_lsp/
207
+ __marimo__/
208
+
209
+ # OSX
210
+ .DS_Store
211
+
212
+ # Clang
213
+ .clangd
@@ -0,0 +1,6 @@
1
+ [submodule "ext/nanobind"]
2
+ path = ext/nanobind
3
+ url = https://github.com/wjakob/nanobind
4
+ [submodule "ext/rtmidi"]
5
+ path = ext/rtmidi
6
+ url = https://github.com/thestk/rtmidi.git
@@ -0,0 +1,23 @@
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v6.0.0
4
+ hooks:
5
+ - id: check-yaml
6
+ - id: end-of-file-fixer
7
+ - id: trailing-whitespace
8
+ - repo: https://github.com/astral-sh/ruff-pre-commit
9
+ rev: v0.15.9
10
+ hooks:
11
+ - id: ruff-check
12
+ name: ruff isort
13
+ types_or: [python, pyi]
14
+ args: [--select, "I,RUF022", --fix]
15
+ - id: ruff-check
16
+ types_or: [python, pyi]
17
+ args: [--fix]
18
+ - id: ruff-format
19
+ types_or: [python, pyi]
20
+ - repo: https://github.com/astral-sh/uv-pre-commit
21
+ rev: 0.11.3
22
+ hooks:
23
+ - id: uv-lock
@@ -0,0 +1,45 @@
1
+ cmake_minimum_required(VERSION 3.28...3.31)
2
+
3
+ if(UNIX AND NOT APPLE)
4
+ set(LINUX TRUE)
5
+ endif()
6
+
7
+ set(CMAKE_CXX_STANDARD 17)
8
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
9
+ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
10
+ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
11
+
12
+ if (CMAKE_VERSION VERSION_LESS 3.18)
13
+ set(DEV_MODULE Development)
14
+ else()
15
+ set(DEV_MODULE Development.Module)
16
+ endif()
17
+
18
+ project(${SKBUILD_PROJECT_NAME} VERSION ${SKBUILD_PROJECT_VERSION} LANGUAGES C CXX)
19
+
20
+ find_package(Python 3.10 COMPONENTS Interpreter ${DEV_MODULE} REQUIRED)
21
+
22
+ if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
23
+ set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
24
+ set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
25
+ endif()
26
+
27
+ # Detect the installed nanobind package and import it into CMake
28
+ execute_process(
29
+ COMMAND "${Python_EXECUTABLE}" -m nanobind --cmake_dir
30
+ OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE nanobind_ROOT)
31
+ find_package(nanobind CONFIG REQUIRED)
32
+
33
+ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
34
+ set(ALSA ON CACHE BOOL "" FORCE)
35
+ endif()
36
+
37
+ set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
38
+ set(RTMIDI_BUILD_STATIC_LIBS ON CACHE BOOL "" FORCE)
39
+ set(RTMIDI_BUILD_TESTING OFF CACHE BOOL "" FORCE)
40
+
41
+ add_subdirectory(ext/rtmidi EXCLUDE_FROM_ALL)
42
+ nanobind_add_module(_midi src/supriya_midi/_midi.cpp)
43
+ target_include_directories(_midi PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/ext/rtmidi)
44
+ target_link_libraries(_midi PRIVATE rtmidi)
45
+ install(TARGETS _midi DESTINATION supriya_midi)
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Supriya Project
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,27 @@
1
+ .PHONY: docs
2
+
3
+ all: stubgen format docs
4
+
5
+ docs:
6
+ uv run make -C docs/ clean html
7
+
8
+ format:
9
+ uv run ruff check --select I,RUF022 --fix docs/ src/ tests/
10
+ uv run ruff format docs/ src/ tests/
11
+
12
+ lint:
13
+ uv run ruff check docs/ src/ tests/
14
+
15
+ pre-commit-autoupdate:
16
+ uv run pre-commit autoupdate --repo https://github.com/astral-sh/ruff-pre-commit
17
+ uv run pre-commit autoupdate --repo https://github.com/astral-sh/uv-pre-commit
18
+ uv run pre-commit autoupdate --repo https://github.com/pre-commit/pre-commit-hooks
19
+
20
+ pre-commit-install:
21
+ uv run pre-commit install
22
+
23
+ stubgen:
24
+ uv run python -m nanobind.stubgen --module supriya_midi._midi --marker-file src/supriya_midi/py.typed --output-dir src/supriya_midi
25
+
26
+ ty:
27
+ uv run ty check src/ tests/