diff options
author | 2025-04-20 08:14:27 +1000 | |
---|---|---|
committer | 2025-04-20 08:16:03 +1000 | |
commit | 844af3a17334698aee460dcbdd9019a7d305999d (patch) | |
tree | 025614ccc60fccd8303a7796d7d93f4947d4d64f /3rdparty/portmidi/pm_python/setup.py | |
parent | e3f386c2a904a1b4e9f81f38c86264839084519f (diff) |
3rdparty/portmidi: Updated to PortMidi 2.0.4.
Diffstat (limited to '3rdparty/portmidi/pm_python/setup.py')
-rw-r--r-- | 3rdparty/portmidi/pm_python/setup.py | 185 |
1 files changed, 0 insertions, 185 deletions
diff --git a/3rdparty/portmidi/pm_python/setup.py b/3rdparty/portmidi/pm_python/setup.py deleted file mode 100644 index 14ab1c758af..00000000000 --- a/3rdparty/portmidi/pm_python/setup.py +++ /dev/null @@ -1,185 +0,0 @@ -import sys -import os -import logging - -from distutils.core import setup, Command -from distutils.extension import Extension -try: - from Cython.Distutils import build_ext -except ImportError: - logging.warn("Cython is preferred over pyrex for python3 compatibility.") - from Pyrex.Distutils import build_ext - - - - - -DESCRIPTION = open('README_PYTHON.txt').read() -CHANGES = open('CHANGES.txt').read() -TODO = open('TODO.txt').read() - -EXTRAS = {} - -long_description = DESCRIPTION + CHANGES + TODO -#import sys -#if "checkdocs" in sys.argv: -# print long_description - - -METADATA = { - 'name': 'pyportmidi', - 'version': '0.0.7', - 'license': 'MIT License', - 'url': 'http://pypi.python.org/pyportmidi/', - 'author': 'John Harrison, Roger B. Dannenberg, Rene Dudfield, others...', - 'author_email': 'renesd@gmail.com', - 'maintainer': 'Rene Dudfield', - 'maintainer_email': 'renesd@gmail.com', - 'description': 'Python Wrappings for PortMidi #python. CHANGES: new package layout.', - 'long_description': long_description, - 'classifiers': [ - 'Development Status :: 2 - Pre-Alpha', - 'Intended Audience :: Developers', - 'Intended Audience :: Information Technology', - 'License :: OSI Approved :: BSD License', - 'Operating System :: MacOS :: MacOS X', - 'Operating System :: Microsoft :: Windows', - 'Operating System :: POSIX :: Linux', - 'Programming Language :: Cython', - 'Programming Language :: C', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.5', - 'Programming Language :: Python :: 2.6', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.0', - 'Programming Language :: Python :: 3.1', - 'Programming Language :: Python :: 3.2', - 'Topic :: Multimedia :: Sound/Audio :: MIDI', - 'Topic :: Software Development :: Libraries', - ], -} - - -if "bdist_msi" in sys.argv: - # hack the version name to a format msi doesn't have trouble with - METADATA["version"] = METADATA["version"].replace("pre", "a0") - METADATA["version"] = METADATA["version"].replace("rc", "b0") - METADATA["version"] = METADATA["version"].replace("release", "") - - - - - -# allow optionally using setuptools for bdist_egg. -using_setuptools = False - -if "-setuptools" in sys.argv: - using_setuptools = True - - from setuptools import setup, Command - sys.argv.remove ("-setuptools") - - EXTRAS.update({'include_package_data': True, - 'install_requires': [], - 'zip_safe': False, - 'test_suite' : 'pyportmidi.tests', - } - ) - - -# test command. For doing 'python setup.py test' -class TestCommand(Command): - user_options = [ ] - - def initialize_options(self): - self._dir = os.getcwd() - - def finalize_options(self): - pass - - def run(self): - ''' - runs the tests with default options. - ''' - import pyportmidi.tests - pyportmidi.tests.main() - - #import subprocess - #return subprocess.call([sys.executable, "run_tests.py"]) - - -cmdclass = {'build_ext': build_ext} - -# we use our test command. -if not using_setuptools: - import os - cmdclass['test'] = TestCommand - - - -scripts = [] - -PACKAGEDATA = { - 'cmdclass': cmdclass, - - 'package_dir': {'pyportmidi': 'pyportmidi', - #'pyportmidi.tests': 'test', - #'pyportmidi.docs': 'docs', - #'pyportmidi.examples': 'examples', - - }, - 'packages': ['pyportmidi', - 'pyportmidi.tests', - ], - 'scripts': scripts, -} - - -PACKAGEDATA.update(METADATA) -PACKAGEDATA.update(EXTRAS) - - - -if sys.platform == 'win32': - print "Found Win32 platform" - EXTENSION = dict( - ext_modules=[ - Extension("pyportmidi._pyportmidi", [os.path.join("pyportmidi", "_pyportmidi.pyx")], - library_dirs = ["../Release"], - libraries = ["portmidi", "winmm"], - include_dirs = ["../porttime"], -# define_macros = [("_WIN32_", None)]) # needed by portmidi.h - extra_compile_args = ["/DWIN32"]) # needed by portmidi.h - ] - ) -elif sys.platform == 'darwin': - print "Found darwin (OS X) platform" - library_dirs = ["/usr/local/lib"] - include_dirs = ["/usr/local/include"] - EXTENSION = dict( - ext_modules=[ - Extension("pyportmidi._pyportmidi", [os.path.join("pyportmidi", "_pyportmidi.pyx")], - library_dirs = library_dirs, - include_dirs = include_dirs, - libraries = ["portmidi"], - extra_link_args=["-framework", "CoreFoundation", - "-framework", "CoreMIDI", - "-framework", "CoreAudio"]) - ] - ) -else: - print "Assuming Linux platform" - EXTENSION = dict( - ext_modules=[ - Extension("pyportmidi._pyportmidi", [os.path.join("pyportmidi", "_pyportmidi.pyx")], - library_dirs=["./linux"], - libraries = ["portmidi", "asound", "pthread"] - ) - ] - - ) - -PACKAGEDATA.update(EXTENSION) - -setup(**PACKAGEDATA) |