-
Notifications
You must be signed in to change notification settings - Fork 28
/
setup.py
executable file
·101 lines (79 loc) · 2.46 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#! /usr/bin/env python
# -*- coding: utf-8
"""
Python implementation of Non-Stationary Gabor Transform (NSGT)
derived from MATLAB code by NUHAG, University of Vienna, Austria
Thomas Grill, 2011-2022
http://grrrr.org/nsgt
Austrian Research Institute for Artificial Intelligence (OFAI)
AudioMiner project, supported by Vienna Science and Technology Fund (WWTF)
covered by the Artistic License 2.0
http://www.perlfoundation.org/artistic_license_2_0
--
Installation:
In the console (terminal application) change to the folder containing this readme.txt file.
To build the package run the following command:
python setup.py build
To install the package (with administrator rights):
sudo python setup.py install
--
Attention: some Cython versions also need the Pyrex module installed!
"""
import warnings
import os
try:
import setuptools
except ImportError:
warnings.warn("setuptools not found, resorting to distutils: unit test suite can not be run from setup.py")
setuptools = None
setup_options = {}
if setuptools is None:
from distutils.core import setup
from distutils.extension import Extension
else:
from setuptools import setup
from setuptools.extension import Extension
setup_options['test_suite'] = 'tests'
try:
from Cython.Distutils import build_ext
except ImportError:
build_ext = None
if build_ext is None:
cmdclass = {}
ext_modules = []
else:
cmdclass = {'build_ext': build_ext}
ext_modules = [
Extension("nsgt._nsgtf_loop", ["nsgt/nsgtf_loop.pyx"]),
Extension("nsgt._nsigtf_loop", ["nsgt/nsigtf_loop.pyx"])
]
try:
import numpy
INCLUDE_DIRS = [numpy.get_include()]
except ImportError:
INCLUDE_DIRS = []
setup(
name="nsgt",
version="0.19",
author="Thomas Grill",
author_email="[email protected]",
maintainer="Thomas Grill",
maintainer_email="[email protected]",
description="Python implementation of Non-Stationary Gabor Transform (NSGT)",
license="Artistic License",
keywords="fourier gabor",
url="http://grrrr.org/nsgt",
setup_requires=["numpy"],
install_requires=["numpy"],
include_dirs=INCLUDE_DIRS,
packages=['nsgt'],
cmdclass=cmdclass,
ext_modules=ext_modules,
classifiers=[
"Development Status :: 4 - Beta",
"Topic :: Scientific/Engineering :: Mathematics",
"License :: OSI Approved :: Artistic License",
"Programming Language :: Python"
],
**setup_options
)