From 96ffc38389c5e3e07ef5b000ea6524dc7e392f98 Mon Sep 17 00:00:00 2001 From: Naglis Jonaitis Date: Sun, 29 Dec 2024 16:43:19 +0200 Subject: [PATCH] Update C extension setup files --- aeneas/cdtw/cdtw_setup.py | 19 +++++++++---------- aeneas/cew/cew_setup.py | 11 +++++------ aeneas/cfw/cfw_setup.py | 11 +++++------ aeneas/cmfcc/cmfcc_setup.py | 18 ++++++++---------- aeneas/cwave/cwave_setup.py | 18 ++++++++---------- 5 files changed, 35 insertions(+), 42 deletions(-) diff --git a/aeneas/cdtw/cdtw_setup.py b/aeneas/cdtw/cdtw_setup.py index 27ffa6d..8098d4d 100644 --- a/aeneas/cdtw/cdtw_setup.py +++ b/aeneas/cdtw/cdtw_setup.py @@ -26,25 +26,24 @@ .. versionadded:: 1.1.0 """ -from numpy import get_include -from numpy.distutils import misc_util -from setuptools import Extension -from setuptools import setup import sys -CMODULE = Extension( +import numpy +import setuptools + + +CMODULE = setuptools.Extension( name="cdtw", sources=["cdtw_py.c", "cdtw_func.c", "../cint/cint.c"], - include_dirs=[get_include()], + include_dirs=[numpy.get_include()], ) -setup( +setuptools.setup( name="cdtw", version="1.7.3", description="Python C Extension for computing the DTW as fast as your bare metal allows.", ext_modules=[CMODULE], - include_dirs=[misc_util.get_numpy_include_dirs()], + include_dirs=[numpy.get_include()], ) -print("\n[INFO] Module cdtw successfully compiled\n") -sys.exit(0) +print("\n[INFO] Module cdtw successfully compiled", file=sys.stderr) diff --git a/aeneas/cew/cew_setup.py b/aeneas/cew/cew_setup.py index 9b58106..9b32efc 100644 --- a/aeneas/cew/cew_setup.py +++ b/aeneas/cew/cew_setup.py @@ -26,21 +26,20 @@ .. versionadded:: 1.3.0 """ -from setuptools import Extension -from setuptools import setup import sys +import setuptools -CMODULE = Extension( + +CMODULE = setuptools.Extension( name="cew", sources=["cew_py.c", "cew_func.c"], libraries=["espeak"] ) -setup( +setuptools.setup( name="cew", version="1.7.3", description="Python C Extension for synthesizing text with eSpeak.", ext_modules=[CMODULE], ) -print("\n[INFO] Module cew successfully compiled\n") -sys.exit(0) +print("\n[INFO] Module cew successfully compiled", file=sys.stderr) diff --git a/aeneas/cfw/cfw_setup.py b/aeneas/cfw/cfw_setup.py index 287e933..2d8dc21 100644 --- a/aeneas/cfw/cfw_setup.py +++ b/aeneas/cfw/cfw_setup.py @@ -26,12 +26,12 @@ .. versionadded:: 1.6.0 """ -from setuptools import Extension -from setuptools import setup import sys +import setuptools -CMODULE = Extension( + +CMODULE = setuptools.Extension( name="cfw", sources=["cfw_py.cc", "cfw_func.cc"], include_dirs=["festival", "speech_tools"], @@ -43,12 +43,11 @@ ], ) -setup( +setuptools.setup( name="cfw", version="1.7.3", description="Python C Extension for synthesizing text with Festival.", ext_modules=[CMODULE], ) -print("\n[INFO] Module cfw successfully compiled\n") -sys.exit(0) +print("\n[INFO] Module cfw successfully compiled", file=sys.stderr) diff --git a/aeneas/cmfcc/cmfcc_setup.py b/aeneas/cmfcc/cmfcc_setup.py index c2db785..5e0e926 100644 --- a/aeneas/cmfcc/cmfcc_setup.py +++ b/aeneas/cmfcc/cmfcc_setup.py @@ -26,25 +26,23 @@ .. versionadded:: 1.1.0 """ -from numpy import get_include -from numpy.distutils import misc_util -from setuptools import Extension -from setuptools import setup import sys -CMODULE = Extension( +import numpy +import setuptools + +CMODULE = setuptools.Extension( name="cmfcc", sources=["cmfcc_py.c", "cmfcc_func.c", "../cwave/cwave_func.c", "../cint/cint.c"], - include_dirs=[get_include()], + include_dirs=[numpy.get_include()], ) -setup( +setuptools.setup( name="cmfcc", version="1.7.3", description="Python C Extension for computing the MFCCs as fast as your bare metal allows.", ext_modules=[CMODULE], - include_dirs=[misc_util.get_numpy_include_dirs()], + include_dirs=[numpy.get_include()], ) -print("\n[INFO] Module cmfcc successfully compiled\n") -sys.exit(0) +print("\n[INFO] Module cmfcc successfully compiled", file=sys.stderr) diff --git a/aeneas/cwave/cwave_setup.py b/aeneas/cwave/cwave_setup.py index 737a9a8..12f552f 100644 --- a/aeneas/cwave/cwave_setup.py +++ b/aeneas/cwave/cwave_setup.py @@ -26,25 +26,23 @@ .. versionadded:: 1.4.1 """ -from numpy import get_include -from numpy.distutils import misc_util -from setuptools import Extension -from setuptools import setup import sys -CMODULE = Extension( +import numpy +import setuptools + +CMODULE = setuptools.Extension( name="cwave", sources=["cwave_py.c", "cwave_func.c", "../cint/cint.c"], - include_dirs=[get_include()], + include_dirs=[numpy.get_include()], ) -setup( +setuptools.setup( name="cwave", version="1.7.3", description="Python C Extension for for reading WAVE files.", ext_modules=[CMODULE], - include_dirs=[misc_util.get_numpy_include_dirs()], + include_dirs=[numpy.get_include()], ) -print("\n[INFO] Module cwave successfully compiled\n") -sys.exit(0) +print("\n[INFO] Module cwave successfully compiled", file=sys.stderr)