build: switch to hatch

Setuptools is not needed anymore because the Cython extension is now built in an
external package.
This commit is contained in:
Enno Hermann 2024-11-07 10:32:57 +01:00
parent 0971bc236e
commit 9dd7ae6cca
3 changed files with 39 additions and 57 deletions

View File

@ -1,10 +0,0 @@
include README.md
include LICENSE.txt
include *.cff
recursive-include TTS *.json
recursive-include TTS *.html
recursive-include TTS *.png
recursive-include TTS *.md
recursive-include TTS *.py
recursive-include TTS *.pyx
recursive-include images *.png

View File

@ -1,14 +1,27 @@
[build-system]
requires = [
"setuptools",
"setuptools-scm",
"cython>=3.0.0",
"numpy>=2.0.0",
]
build-backend = "setuptools.build_meta"
# ,*++++++*, ,*++++++*,
# *++. .+++ *++. .++*
# *+* ,++++* *+* *+* ,++++, *+*
# ,+, .++++++++++* ,++,,,,*+, ,++++++++++. *+,
# *+. .++++++++++++..++ *+.,++++++++++++. .+*
# .+* ++++++++++++.*+, .+*.++++++++++++ *+,
# .++ *++++++++* ++, .++.*++++++++* ++,
# ,+++*. . .*++, ,++*. .*+++*
# *+, .,*++**. .**++**. ,+*
# .+* *+,
# *+. Coqui .+*
# *+* +++ TTS +++ *+*
# .+++*. . . *+++.
# ,+* *+++*... ...*+++* *+,
# .++. .""""+++++++****+++++++"""". ++.
# ,++. .++,
# .++* *++.
# *+++, ,+++*
# .,*++++::::::++++*,.
# ``````
[tool.setuptools.packages.find]
include = ["TTS*"]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "coqui-tts"
@ -152,6 +165,22 @@ tts-server = "TTS.server.server:main"
[tool.uv]
constraint-dependencies = ["numba>0.58.0"]
[tool.hatch.build]
exclude = [
"/.github",
"/.gitignore",
"/.pre-commit-config.yaml",
"/.readthedocs.yml",
"/Makefile",
"/dockerfiles",
"/run_bash_tests.sh",
"/scripts",
"/tests",
]
[tool.hatch.build.targets.wheel]
packages = ["TTS"]
[tool.ruff]
line-length = 120
extend-exclude = ["*.ipynb"]

View File

@ -1,37 +0,0 @@
#!/usr/bin/env python
# ,*++++++*, ,*++++++*,
# *++. .+++ *++. .++*
# *+* ,++++* *+* *+* ,++++, *+*
# ,+, .++++++++++* ,++,,,,*+, ,++++++++++. *+,
# *+. .++++++++++++..++ *+.,++++++++++++. .+*
# .+* ++++++++++++.*+, .+*.++++++++++++ *+,
# .++ *++++++++* ++, .++.*++++++++* ++,
# ,+++*. . .*++, ,++*. .*+++*
# *+, .,*++**. .**++**. ,+*
# .+* *+,
# *+. Coqui .+*
# *+* +++ TTS +++ *+*
# .+++*. . . *+++.
# ,+* *+++*... ...*+++* *+,
# .++. .""""+++++++****+++++++"""". ++.
# ,++. .++,
# .++* *++.
# *+++, ,+++*
# .,*++++::::::++++*,.
# ``````
import numpy
from Cython.Build import cythonize
from setuptools import Extension, setup
exts = [
Extension(
name="TTS.tts.utils.monotonic_align.core",
sources=["TTS/tts/utils/monotonic_align/core.pyx"],
)
]
setup(
include_dirs=numpy.get_include(),
ext_modules=cythonize(exts, language_level=3),
zip_safe=False,
)