From 5b62e290069ab3d4e4a7c539d07d0e359578aeb8 Mon Sep 17 00:00:00 2001 From: Enno Hermann Date: Thu, 7 Nov 2024 00:35:29 +0100 Subject: [PATCH] temp: test wheels --- .github/workflows/pypi-release.yml | 70 ++++++++++++---------------- CODE_OWNERS.rst | 75 ------------------------------ MANIFEST.in | 10 ---- pyproject.toml | 28 +++++++---- setup.py | 37 --------------- 5 files changed, 49 insertions(+), 171 deletions(-) delete mode 100644 CODE_OWNERS.rst delete mode 100644 MANIFEST.in delete mode 100644 setup.py diff --git a/.github/workflows/pypi-release.yml b/.github/workflows/pypi-release.yml index 822990e967..7bebbd6eb9 100644 --- a/.github/workflows/pypi-release.yml +++ b/.github/workflows/pypi-release.yml @@ -2,55 +2,48 @@ name: Publish Python 🐍 distributions 📩 to PyPI on: release: types: [published] + pull_request: + types: [opened, synchronize, reopened] defaults: run: shell: bash jobs: - build-sdist: - name: Build source distribution + build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Verify tag matches version - run: | - set -ex - version=$(grep -m 1 version pyproject.toml | grep -P '\d+\.\d+\.\d+' -o) - tag="${GITHUB_REF/refs\/tags\/}" - if [[ "v$version" != "$tag" ]]; then - exit 1 - fi - - uses: actions/setup-python@v5 + # - name: Verify tag matches version + # run: | + # set -ex + # version=$(grep -m 1 version pyproject.toml | grep -P '\d+\.\d+\.\d+' -o) + # tag="${GITHUB_REF/refs\/tags\/}" + # if [[ "v$version" != "$tag" ]]; then + # exit 1 + # fi + - name: Install uv + uses: astral-sh/setup-uv@v3 with: - python-version: 3.9 - - run: | - python -m pip install -U pip setuptools build - - run: | - python -m build - - run: | - pip install dist/*.tar.gz - - uses: actions/upload-artifact@v4 - with: - name: build-sdist - path: dist/*.tar.gz - build-wheels: - name: Build wheels on ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - steps: - - uses: actions/checkout@v4 - - name: Build wheels - uses: pypa/cibuildwheel@v2.21.1 + version: "0.4.27" + enable-cache: true + cache-dependency-glob: "**/pyproject.toml" + - name: Set up Python + run: uv python install 3.12 + - name: Build sdist and wheel + run: uv build + - name: Test installation of sdist and wheel + run: | + uv venv --no-project + uv pip install dist/*.tar.gz + uv pip install dist/*.whl - uses: actions/upload-artifact@v4 with: - name: build-wheels-${{ matrix.os }} - path: ./wheelhouse/*.whl + name: build + path: dist/* publish-artifacts: name: Publish to PyPI runs-on: ubuntu-latest - needs: [build-sdist, build-wheels] + needs: [build] environment: name: release url: https://pypi.org/p/coqui-tts @@ -60,9 +53,8 @@ jobs: - uses: actions/download-artifact@v4 with: path: dist - pattern: build-* - merge-multiple: true + pattern: build - run: | ls -lh dist/ - - name: Publish package distributions to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 + # - name: Publish package distributions to PyPI + # uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/CODE_OWNERS.rst b/CODE_OWNERS.rst deleted file mode 100644 index 768b573911..0000000000 --- a/CODE_OWNERS.rst +++ /dev/null @@ -1,75 +0,0 @@ -TTS code owners / governance system -========================================== - -TTS is run under a governance system inspired (and partially copied from) by the `Mozilla module ownership system `_. The project is roughly divided into modules, and each module has its owners, which are responsible for reviewing pull requests and deciding on technical direction for their modules. Module ownership authority is given to people who have worked extensively on areas of the project. - -Module owners also have the authority of naming other module owners or appointing module peers, which are people with authority to review pull requests in that module. They can also sub-divide their module into sub-modules with their owners. - -Module owners are not tyrants. They are chartered to make decisions with input from the community and in the best interest of the community. Module owners are not required to make code changes or additions solely because the community wants them to do so. (Like anyone else, the module owners may write code because they want to, because their employers want them to, because the community wants them to, or for some other reason.) Module owners do need to pay attention to patches submitted to that module. However “pay attention” does not mean agreeing to every patch. Some patches may not make sense for the WebThings project; some may be poorly implemented. Module owners have the authority to decline a patch; this is a necessary part of the role. We ask the module owners to describe in the relevant issue their reasons for wanting changes to a patch, for declining it altogether, or for postponing review for some period. We don’t ask or expect them to rewrite patches to make them acceptable. Similarly, module owners may need to delay review of a promising patch due to an upcoming deadline. For example, a patch may be of interest, but not for the next milestone. In such a case it may make sense for the module owner to postpone review of a patch until after matters needed for a milestone have been finalized. Again, we expect this to be described in the relevant issue. And of course, it shouldn’t go on very often or for very long or escalation and review is likely. - -The work of the various module owners and peers is overseen by the global owners, which are responsible for making final decisions in case there's conflict between owners as well as set the direction for the project as a whole. - -This file describes module owners who are active on the project and which parts of the code they have expertise on (and interest in). If you're making changes to the code and are wondering who's an appropriate person to talk to, this list will tell you who to ping. - -There's overlap in the areas of expertise of each owner, and in particular when looking at which files are covered by each area, there is a lot of overlap. Don't worry about getting it exactly right when requesting review, any code owner will be happy to redirect the request to a more appropriate person. - -Global owners ----------------- - -These are people who have worked on the project extensively and are familiar with all or most parts of it. Their expertise and review guidance is trusted by other code owners to cover their own areas of expertise. In case of conflicting opinions from other owners, global owners will make a final decision. - -- Eren Gölge (@erogol) -- Reuben Morais (@reuben) - -Training, feeding ------------------ - -- Eren Gölge (@erogol) - -Model exporting ---------------- - -- Eren Gölge (@erogol) - -Multi-Speaker TTS ------------------ - -- Eren Gölge (@erogol) -- Edresson Casanova (@edresson) - -TTS ---- - -- Eren Gölge (@erogol) - -Vocoders --------- - -- Eren Gölge (@erogol) - -Speaker Encoder ---------------- - -- Eren Gölge (@erogol) - -Testing & CI ------------- - -- Eren Gölge (@erogol) -- Reuben Morais (@reuben) - -Python bindings ---------------- - -- Eren Gölge (@erogol) -- Reuben Morais (@reuben) - -Documentation -------------- - -- Eren Gölge (@erogol) - -Third party bindings --------------------- - -Owned by the author. diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 8d092ceff2..0000000000 --- a/MANIFEST.in +++ /dev/null @@ -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 diff --git a/pyproject.toml b/pyproject.toml index d13e2145d8..ff0f21f37f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,14 +1,6 @@ [build-system] -requires = [ - "setuptools", - "setuptools-scm", - "cython>=3.0.0", - "numpy>=2.0.0", -] -build-backend = "setuptools.build_meta" - -[tool.setuptools.packages.find] -include = ["TTS*"] +requires = ["hatchling"] +build-backend = "hatchling.build" [project] name = "coqui-tts" @@ -152,6 +144,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"] diff --git a/setup.py b/setup.py deleted file mode 100644 index 1cf2def1d3..0000000000 --- a/setup.py +++ /dev/null @@ -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, -)