Skip to content

Commit

Permalink
Update C extension setup files
Browse files Browse the repository at this point in the history
  • Loading branch information
naglis committed Dec 29, 2024
1 parent 1bbbf23 commit 96ffc38
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 42 deletions.
19 changes: 9 additions & 10 deletions aeneas/cdtw/cdtw_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
11 changes: 5 additions & 6 deletions aeneas/cew/cew_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
11 changes: 5 additions & 6 deletions aeneas/cfw/cfw_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand All @@ -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)
18 changes: 8 additions & 10 deletions aeneas/cmfcc/cmfcc_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
18 changes: 8 additions & 10 deletions aeneas/cwave/cwave_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 96ffc38

Please sign in to comment.