-
Notifications
You must be signed in to change notification settings - Fork 10
/
setup.py
executable file
·72 lines (63 loc) · 2.08 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import sys
from setuptools import setup, Extension
version = "1.4.0"
module_source = 'rtmidi2.pyx'
long_description = open("README.rst").read()
extension_args = {}
if sys.platform.startswith('linux'):
extension_args = dict(
define_macros=[
('__LINUX_ALSASEQ__', None),
('__LINUX_ALSA__', None),
('__UNIX_JACK__', None)
],
libraries=['asound', 'pthread', 'jack'],
extra_compile_args=['-std=c++11'],
)
if sys.platform == 'darwin':
extension_args = dict(
define_macros=[('__MACOSX_CORE__', None)],
extra_compile_args=['-frtti', '-std=c++11'],
extra_link_args=[
'-framework', 'CoreMidi',
'-framework', 'CoreAudio',
'-framework', 'CoreFoundation'
]
)
if sys.platform == 'win32':
extension_args = dict(
define_macros=[('__WINDOWS_MM__', None)],
libraries=['winmm'],
extra_compile_args=['-std=c++11'],
)
setup(
name='rtmidi2',
python_requires='>=3.8',
version=version,
ext_modules=[
Extension(
'rtmidi2',
sources = ['rtmidi2.pyx', 'RtMidi/RtMidi.cpp'],
include_dirs = ["RtMidi"],
depends = ['RtMidi/RtMidi.hpp'],
language='c++',
**extension_args
)
],
setup_requires=['cython'],
license='MIT',
platforms='any',
classifiers=[
'Development Status :: 4 - Beta',
'Programming Language :: Cython',
'Topic :: Multimedia :: Sound/Audio :: MIDI',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3',
'Topic :: Software Development :: Libraries :: Python Modules'
],
description='Python wrapper for RtMidi written in Cython. Allows sending raw messages, multi-port input and sending multiple messages in one call.',
long_description=long_description,
author='originally by Guido Lorenz, modified by Eduardo Moguillansky',
author_email='eduardo.moguillansky@gmail.com',
url="https://github.com/gesellkammer/rtmidi2",
)