-
Notifications
You must be signed in to change notification settings - Fork 98
/
setup.py
52 lines (45 loc) · 1.45 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
# 2019-May
# github.com/ludlows
# Python Wrapper for PESQ Score (narrowband and wideband)
from setuptools import find_packages
from setuptools import setup, Extension
with open("README.md", "r") as fh:
long_description = fh.read()
class CyPesqExtension(Extension):
def __init__(self, *args, **kwargs):
self._include = []
super().__init__(*args, **kwargs)
@property
def include_dirs(self):
import numpy
return self._include + [numpy.get_include()]
@include_dirs.setter
def include_dirs(self, dirs):
self._include = dirs
extensions = [
CyPesqExtension(
"cypesq",
["pesq/cypesq.pyx", "pesq/dsp.c", "pesq/pesqdsp.c", "pesq/pesqmod.c"],
include_dirs=['pesq'],
language="c")
]
setup(
name="pesq",
version="0.0.5",
author="ludlows",
description="Python Wrapper for PESQ Score (narrow band and wide band)",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/ludlows/PESQ",
packages=find_packages(),
package_data={'pesq': ["*.pyx", "*.h", "dsp.c", "pesqdsp.c", "pesqmod.c"]},
ext_package='pesq',
ext_modules=extensions,
setup_requires=['setuptools>=18.0', 'cython', 'numpy<2.0'],
install_requires=['numpy<2.0'],
classifiers=[
"Programming Language :: Python",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
)