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: 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"] 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', )