-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Chore: Migrate to pyproject.toml #877
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
221a620
Migrate packaging config to pyproject.toml
codex 14ab027
Refine pyproject metadata and use dynamic version
codex 1c7d4c5
docs: Fix license with file
ftnext 93ef770
docs: update source install command
ftnext 01bd37b
build: read dynamic version from file
ftnext f78eb9e
build: drop redundant include-package-data
ftnext 11a85c6
build: restore setup.py shim
ftnext bd3d64e
build: lower setuptools requirement
ftnext 79d8e32
build: disable namespace package discovery
ftnext 4158858
build: drop wheel build requirement
ftnext File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,89 @@ | ||
| [build-system] | ||
| requires = ["setuptools>=61"] | ||
| build-backend = "setuptools.build_meta" | ||
|
|
||
| [project] | ||
| name = "SpeechRecognition" | ||
| dynamic = ["version"] | ||
| description = "Library for performing speech recognition, with support for several engines and APIs, online and offline." | ||
| readme = { file = "README.rst", content-type = "text/x-rst" } | ||
| requires-python = ">=3.9" | ||
| license = { file = "LICENSE.txt" } | ||
| authors = [ | ||
| { name = "Anthony Zhang (Uberi)", email = "azhang9@gmail.com" }, | ||
| ] | ||
| maintainers = [ | ||
| { name = "nikkie", email = "takuyafjp+develop@gmail.com" }, | ||
| ] | ||
| keywords = ["speech", "recognition", "voice", "sphinx", "google", "wit", "bing", "api", "houndify", "ibm", "snowboy"] | ||
| classifiers = [ | ||
| "Development Status :: 5 - Production/Stable", | ||
| "Intended Audience :: Developers", | ||
| "Natural Language :: English", | ||
| "Operating System :: Microsoft :: Windows", | ||
| "Operating System :: POSIX :: Linux", | ||
| "Operating System :: MacOS :: MacOS X", | ||
| "Operating System :: Other OS", | ||
| "Programming Language :: Python", | ||
| "Programming Language :: Python :: 3", | ||
| "Programming Language :: Python :: 3.9", | ||
| "Programming Language :: Python :: 3.10", | ||
| "Programming Language :: Python :: 3.11", | ||
| "Programming Language :: Python :: 3.12", | ||
| "Topic :: Software Development :: Libraries :: Python Modules", | ||
| "Topic :: Multimedia :: Sound/Audio :: Speech", | ||
| ] | ||
| dependencies = [ | ||
| "typing-extensions", | ||
| "standard-aifc; python_version >= '3.13'", | ||
| "audioop-lts; python_version >= '3.13'", | ||
| ] | ||
|
|
||
| [project.urls] | ||
| Homepage = "https://github.com/Uberi/speech_recognition#readme" | ||
|
|
||
| [project.scripts] | ||
| sprc = "speech_recognition.cli:main" | ||
|
|
||
| [project.optional-dependencies] | ||
| dev = [ | ||
| "pytest", | ||
| "pytest-randomly", | ||
| "respx", | ||
| "numpy", | ||
| "pytest-httpserver", | ||
| "mypy", | ||
| "types-requests", | ||
| ] | ||
| audio = ["PyAudio >= 0.2.11"] | ||
| pocketsphinx = ["pocketsphinx"] | ||
| google-cloud = ["google-cloud-speech"] | ||
| whisper-local = [ | ||
| "openai-whisper", | ||
| "soundfile", | ||
| ] | ||
| faster-whisper = [ | ||
| "faster-whisper", | ||
| "soundfile", | ||
| ] | ||
| openai = [ | ||
| "openai", | ||
| "httpx < 0.28", | ||
| ] | ||
| groq = [ | ||
| "groq", | ||
| "httpx < 0.28", | ||
| ] | ||
| assemblyai = ["requests"] | ||
| vosk = ["vosk"] | ||
|
|
||
| [tool.setuptools.package-data] | ||
| speech_recognition = ["version.txt"] | ||
|
|
||
| [tool.setuptools.packages.find] | ||
| exclude = ["tests.*", "test", "speech_recognition.models"] | ||
| namespaces = false | ||
|
|
||
|
|
||
| [tool.setuptools.dynamic] | ||
| version = { file = "speech_recognition/version.txt" } | ||
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,51 +1,3 @@ | ||
| #!/usr/bin/env python3 | ||
| from setuptools import setup | ||
|
|
||
| from setuptools import find_packages, setup | ||
|
|
||
| import speech_recognition | ||
|
|
||
| setup( | ||
| name="SpeechRecognition", | ||
| version=speech_recognition.__version__, | ||
| packages=find_packages(exclude=["tests.*", "test", "speech_recognition.models"]), | ||
| include_package_data=True, | ||
|
|
||
| # PyPI metadata | ||
| author=speech_recognition.__author__, | ||
| author_email="azhang9@gmail.com", | ||
| maintainer="nikkie", | ||
| maintainer_email="takuyafjp+develop@gmail.com", | ||
| description=speech_recognition.__doc__, | ||
| long_description=open("README.rst").read(), | ||
| long_description_content_type="text/x-rst", | ||
| license=speech_recognition.__license__, | ||
| keywords="speech recognition voice sphinx google wit bing api houndify ibm snowboy", | ||
| url="https://github.com/Uberi/speech_recognition#readme", | ||
| classifiers=[ | ||
| "Development Status :: 5 - Production/Stable", | ||
| "Intended Audience :: Developers", | ||
| "Natural Language :: English", | ||
| "License :: OSI Approved :: BSD License", | ||
| "Operating System :: Microsoft :: Windows", | ||
| "Operating System :: POSIX :: Linux", | ||
| "Operating System :: MacOS :: MacOS X", | ||
| "Operating System :: Other OS", | ||
| "Programming Language :: Python", | ||
| "Programming Language :: Python :: 3", | ||
| "Programming Language :: Python :: 3.9", | ||
| "Programming Language :: Python :: 3.10", | ||
| "Programming Language :: Python :: 3.11", | ||
| "Programming Language :: Python :: 3.12", | ||
| "Topic :: Software Development :: Libraries :: Python Modules", | ||
| "Topic :: Multimedia :: Sound/Audio :: Speech", | ||
| ], | ||
| python_requires=">=3.9", | ||
| install_requires=[ | ||
| "typing-extensions", | ||
| "standard-aifc; python_version>='3.13'", | ||
| "audioop-lts; python_version>='3.13'", | ||
| ], | ||
| entry_points={ | ||
| "console_scripts": ["sprc=speech_recognition.cli:main"], | ||
| }, | ||
| ) | ||
| setup() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 3.14.6 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.