lasp/setup.py

59 lines
1.5 KiB
Python
Raw Normal View History

import glob, os
import platform
from setuptools import setup
pf = platform.platform()
if 'Linux' in pf:
ext_name_glob = 'lasp_cpp.cpython*'
# Split of path from file.
extensions = list(glob.glob('src/lasp/' + ext_name_glob))
elif 'Windows' in pf:
2023-06-11 12:33:16 +00:00
ext_name_glob = 'lasp_cpp*.cp*.pyd'
# Split of path from file.
extensions = list(glob.glob('src\\lasp/' + ext_name_glob))
else:
raise RuntimeError('Not yet Windows-proof')
print(extensions)
ext_names = [os.path.split(a)[1] for a in 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
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",
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',
url='https://www.ascee.nl/lasp',
classifiers=classifiers,
keywords=keywords,
2022-07-20 12:58:48 +00:00
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},
2022-07-20 12:58:48 +00:00
python_requires='>=3.8',
2018-01-29 15:14:50 +00:00
)