Skip to content

Commit

Permalink
PEP 621: Migrate from setup.py to pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss committed Oct 18, 2024
1 parent e8a803c commit 5d9c47e
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 53 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ jobs:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install build setuptools twine wheel
- name: Clean previous builds
run: |
rm -rf dist
Expand All @@ -32,8 +32,8 @@ jobs:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py check
python setup.py sdist bdist_wheel
python -m build
python -m twine check --strict dist/*
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
Expand Down
5 changes: 3 additions & 2 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ clean:
rm -rf dist/
rm -rf build/
build:
pip3 install wheel
python3 setup.py bdist_wheel
pip3 install build
python3 -m build
upload:
pip3 install twine
python3 -m twine check --strict dist/*
python3 -m twine upload dist/*.whl
deploy:
make clean
Expand Down
54 changes: 54 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
[build-system]
build-backend = "setuptools.build_meta"

requires = [ "setuptools>=61.2" ]

[project]
name = "pyttsx3"
version = "2.98"
description = "Text to Speech (TTS) library for Python 3. Works without internet connection or delay. Supports multiple TTS engines, including Sapi5, nsss, and espeak."
readme = "README.md"
keywords = [
"gtts",
"ivona",
"offline text to speech",
"offline tts",
"pyttsx",
"pyttsx for python3",
"pyttsx3",
"speech",
"speech synthesis",
"text to speech",
"text to speech for python",
"tts",
"TTS for python3",
]
authors = [ { name = "Natesh M Bhat", email = "[email protected]" } ]
classifiers = [
"Intended Audience :: Developers",
"Intended Audience :: End Users/Desktop",
"Intended Audience :: Information Technology",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
dependencies = [
"comtypes; platform_system=='Windows'",
"pyobjc>=2.4; platform_system=='Darwin'",
"pypiwin32; platform_system=='Windows'",
"pywin32; platform_system=='Windows'",
]

urls = { Homepage = "https://github.com/nateshmbhat/pyttsx3" }

[tool.setuptools]
packages = [ "pyttsx3", "pyttsx3.drivers" ]
include-package-data = false
2 changes: 0 additions & 2 deletions setup.cfg

This file was deleted.

44 changes: 0 additions & 44 deletions setup.py

This file was deleted.

0 comments on commit 5d9c47e

Please sign in to comment.