|
| 1 | +import setuptools |
| 2 | +import sys |
| 3 | +import io |
| 4 | + |
| 5 | +mac_indicator = 'darwin' |
| 6 | +linux_indicator = 'linux' |
| 7 | +windows_indicator = 'win' |
| 8 | +platform = sys.platform |
| 9 | + |
| 10 | +long_description = io.open('README.pypi.md', encoding="utf-8").read() |
| 11 | + |
| 12 | +extra_link_args = [] |
| 13 | +if platform.startswith(mac_indicator): |
| 14 | + extra_link_args.append('-Wl') # pass the following options to linker |
| 15 | + |
| 16 | +libraries=[] |
| 17 | +if platform.startswith(windows_indicator): |
| 18 | + libraries.append('wsock32') |
| 19 | + libraries.append('ws2_32') |
| 20 | + |
| 21 | +ndicapy = setuptools.Extension('ndicapy', |
| 22 | + sources=[ |
| 23 | + 'ndicapi.cxx', |
| 24 | + 'ndicapi_math.cxx', |
| 25 | + 'ndicapi_serial.cxx', |
| 26 | + 'ndicapi_thread.cxx', |
| 27 | + 'ndicapi_socket.cxx', |
| 28 | + 'ndicapimodule.cxx', |
| 29 | + ], |
| 30 | + extra_link_args=extra_link_args, |
| 31 | + libraries=libraries, |
| 32 | + ) |
| 33 | + |
| 34 | +setuptools.setup(name='ndicapi', |
| 35 | + version='3.7.4', |
| 36 | + url='https://github.com/SciKit-Surgery/ndicapi', |
| 37 | + license='MIT', |
| 38 | + description='This package allows interfacing with NDI tracking devices', |
| 39 | + long_description=long_description, |
| 40 | + long_description_content_type="text/markdown", |
| 41 | + maintainer="Stephen Thompson", |
| 42 | + maintainer_email="s.thompson@ucl.ac.uk", |
| 43 | + classifiers=[ |
| 44 | + 'Development Status :: 3 - Alpha', |
| 45 | + 'Environment :: Console', |
| 46 | + 'Intended Audience :: Developers', |
| 47 | + 'Intended Audience :: Education', |
| 48 | + 'Intended Audience :: Information Technology', |
| 49 | + 'Intended Audience :: Science/Research', |
| 50 | + 'License :: OSI Approved :: MIT License', |
| 51 | + 'Operating System :: MacOS', |
| 52 | + 'Operating System :: Microsoft :: Windows', |
| 53 | + 'Operating System :: POSIX', |
| 54 | + 'Operating System :: Unix', |
| 55 | + 'Programming Language :: Python :: 3.8', |
| 56 | + 'Programming Language :: Python :: 3.9', |
| 57 | + 'Programming Language :: Python :: 3.10', |
| 58 | + 'Programming Language :: Python :: 3.11', |
| 59 | + 'Programming Language :: Python :: 3.12', |
| 60 | + 'Programming Language :: C', |
| 61 | + 'Programming Language :: Python :: Implementation :: CPython', |
| 62 | + 'Topic :: Scientific/Engineering', |
| 63 | + 'Topic :: System :: Hardware', |
| 64 | + ], |
| 65 | + ext_modules=[ndicapy], |
| 66 | + ) |
0 commit comments