From 5ae88459f09db5066e4b09169239d04b27683303 Mon Sep 17 00:00:00 2001 From: thewh1teagle <61390950+thewh1teagle@users.noreply.github.com> Date: Sun, 5 Jan 2025 04:53:36 +0200 Subject: [PATCH] feat: change build backend to uv --- .python-version | 1 + phonemizer/__init__.py | 4 ++-- pyproject.toml | 21 ++++++--------------- 3 files changed, 9 insertions(+), 17 deletions(-) create mode 100644 .python-version diff --git a/.python-version b/.python-version new file mode 100644 index 0000000..3a4f41e --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.13 \ No newline at end of file diff --git a/phonemizer/__init__.py b/phonemizer/__init__.py index 36a21a4..e5d6066 100644 --- a/phonemizer/__init__.py +++ b/phonemizer/__init__.py @@ -15,7 +15,7 @@ """Multilingual text to phones converter""" from .phonemize import phonemize # pylint: disable=unused-import +import importlib.metadata - -__version__ = '3.3.0' +__version__ = importlib.metadata.version(__name__) """Phonemizer version""" diff --git a/pyproject.toml b/pyproject.toml index 50806af..66acac5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,11 +14,15 @@ # along with phonemizer. If not, see . [build-system] -requires = ["setuptools >= 61.0"] -build-backend = "setuptools.build_meta" +requires = ["hatchling"] +build-backend = "hatchling.build" + +[tool.hatch.build.targets.wheel] +packages = ["phonemizer"] [project] name = "phonemizer" +version = "3.3.0" description = "Simple text to phones converter for multiple languages" authors = [ {name = "Mathieu Bernard", email = "mathieu.bernard.2@cnrs.fr"}, @@ -38,7 +42,6 @@ classifiers = [ "Operating System :: OS Independent"] requires-python = ">= 3.8" -dynamic = ["version"] dependencies = [ "joblib", "segments", @@ -59,18 +62,6 @@ Repository = "https://github.com/bootphon/phonemizer" Issues = "https://github.com/bootphon/phonemizer" Changelog = "https://github.com/bootphon/phonemizer/blob/master/docs/source/changelog.rst" -[tool.setuptools.packages] -find = {} - -[tool.setuptools.package-data] -phonemizer = [ - "share/espeak/*", - "share/festival/*", - "share/segments/*"] - -[tool.setuptools.dynamic] -version = {attr = "phonemizer.__version__"} - [tool.pytest.ini_options] minversion = "6.0" testpaths = "test"