lasp/setup.py

54 lines
1.4 KiB
Python

import glob, os
import platform
from setuptools import setup
if 'Linux' in platform.platform():
ext_name_glob = 'lasp_cpp.cpython*'
extensions = list(glob.glob('src/lasp/' + ext_name_glob))
# Split of path from file.
ext_names = [os.path.split(a)[1] for a in extensions]
print(extensions)
if len(extensions) == 0:
raise RuntimeError('Please first run CMake to build extension')
elif len(extensions) > 1:
raise RuntimeError('Too many extension files found')
pkgdata = ext_names
else:
raise RuntimeError('Not yet Windows-proof')
classifiers = [
"Topic :: Scientific/Engineering",
"Programming Language :: Python :: 3.8",
"Operating System :: POSIX :: Linux",
"Operating System :: Microsoft :: Windows",
]
keywords = ["DSP", "DAQ", "Signal processing"]
setup(
name="lasp",
version="1.0",
description="LASP: Library for Acoustic Signal Processing",
author='J.A. de Jong (ASCEE / Redu-Sone)',
author_email='info@ascee.nl',
url='https://www.ascee.nl/lasp',
classifiers=classifiers,
keywords=keywords,
license="MIT",
dependencies=["numpy", "scipy", "appdirs", "h5py", "appdirs",
"dataclasses_json"],
package_dir={"": "src"},
packages=['lasp', 'lasp.filter', 'lasp.tools'],
include_package_data=True,
package_data={'lasp': pkgdata},
python_requires='>=3.8',
)