Skip to content

Commit

Permalink
temp: test wheels
Browse files Browse the repository at this point in the history
  • Loading branch information
eginhard committed Nov 6, 2024
1 parent 4fc282e commit 5b62e29
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 171 deletions.
70 changes: 31 additions & 39 deletions .github/workflows/pypi-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
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
Expand All @@ -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
75 changes: 0 additions & 75 deletions CODE_OWNERS.rst

This file was deleted.

10 changes: 0 additions & 10 deletions MANIFEST.in

This file was deleted.

28 changes: 18 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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"]
Expand Down
37 changes: 0 additions & 37 deletions setup.py

This file was deleted.

0 comments on commit 5b62e29

Please sign in to comment.