2023-01-12 16:03:40 +00:00
|
|
|
import glob, os
|
2022-10-10 17:17:38 +00:00
|
|
|
import platform
|
|
|
|
|
|
|
|
from setuptools import setup
|
|
|
|
|
|
|
|
if 'Linux' in platform.platform():
|
2023-01-12 16:03:40 +00:00
|
|
|
ext_name_glob = 'lasp_cpp.cpython*'
|
|
|
|
extensions = list(glob.glob('src/lasp/' + ext_name_glob))
|
2023-01-12 18:49:32 +00:00
|
|
|
|
|
|
|
# Split of path from file.
|
2023-01-12 16:03:40 +00:00
|
|
|
ext_names = [os.path.split(a)[1] for a in extensions]
|
|
|
|
|
|
|
|
print(extensions)
|
|
|
|
if len(extensions) == 0:
|
2022-10-10 17:17:38 +00:00
|
|
|
raise RuntimeError('Please first run CMake to build extension')
|
2023-01-12 16:03:40 +00:00
|
|
|
elif len(extensions) > 1:
|
2022-10-10 17:17:38 +00:00
|
|
|
raise RuntimeError('Too many extension files found')
|
|
|
|
|
2023-01-12 16:03:40 +00:00
|
|
|
pkgdata = ext_names
|
2022-10-10 17:17:38 +00:00
|
|
|
|
|
|
|
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"]
|
|
|
|
|
2018-01-29 15:14:50 +00:00
|
|
|
|
|
|
|
setup(
|
2022-07-20 12:58:48 +00:00
|
|
|
name="lasp",
|
|
|
|
version="1.0",
|
2022-10-10 17:17:38 +00:00
|
|
|
description="LASP: Library for Acoustic Signal Processing",
|
|
|
|
|
2022-07-20 12:58:48 +00:00
|
|
|
author='J.A. de Jong (ASCEE / Redu-Sone)',
|
|
|
|
author_email='info@ascee.nl',
|
2022-10-10 17:17:38 +00:00
|
|
|
|
|
|
|
url='https://www.ascee.nl/lasp',
|
|
|
|
classifiers=classifiers,
|
|
|
|
keywords=keywords,
|
2022-07-20 12:58:48 +00:00
|
|
|
license="MIT",
|
2022-10-10 17:17:38 +00:00
|
|
|
dependencies=["numpy", "scipy", "appdirs", "h5py", "appdirs",
|
2023-01-12 16:03:40 +00:00
|
|
|
"dataclasses_json"],
|
|
|
|
package_dir={"": "src"},
|
2022-10-10 17:17:38 +00:00
|
|
|
packages=['lasp', 'lasp.filter', 'lasp.tools'],
|
|
|
|
include_package_data=True,
|
2023-01-12 16:03:40 +00:00
|
|
|
package_data={'lasp': pkgdata},
|
2022-07-20 12:58:48 +00:00
|
|
|
python_requires='>=3.8',
|
2018-01-29 15:14:50 +00:00
|
|
|
)
|