Migrate to pyproject.toml
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
[build-system]
|
||||
requires = ["setuptools>=62.3"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "wyoming_satellite"
|
||||
version = "1.3.1"
|
||||
license = {text = "MIT"}
|
||||
description = "Wyoming server for remote voice satellite"
|
||||
readme = "README.md"
|
||||
authors = [
|
||||
{name = "Michael Hansen", email = "mike@rhasspy.org"}
|
||||
]
|
||||
keywords = ["rhasspy", "wyoming", "satellite"]
|
||||
classifiers = [
|
||||
"Development Status :: 3 - Alpha",
|
||||
"Intended Audience :: Developers",
|
||||
"License :: OSI Approved :: MIT License",
|
||||
"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",
|
||||
]
|
||||
requires-python = ">=3.9.0"
|
||||
dependencies = [
|
||||
"wyoming==1.5.4",
|
||||
"zeroconf==0.88.0",
|
||||
"pyring-buffer>=1,<2",
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
all = ["pysilero-vad==1.0.0", "webrtc-noise-gain==1.2.3"]
|
||||
silerovad = ["pysilero-vad==1.0.0"]
|
||||
webrtc = ["webrtc-noise-gain==1.2.3"]
|
||||
|
||||
[project.scripts]
|
||||
wyoming-satellite = "wyoming_satellite:__main__.run"
|
||||
|
||||
[project.urls]
|
||||
"Source Code" = "http://github.com/rhasspy/wyoming-satellite"
|
||||
|
||||
[tool.setuptools]
|
||||
platforms = ["any"]
|
||||
zip-safe = true
|
||||
include-package-data = true
|
||||
|
||||
[tool.setuptools.packages.find]
|
||||
include = ["wyoming_satellite"]
|
||||
exclude = ["tests", "tests.*"]
|
||||
@@ -1,3 +0,0 @@
|
||||
wyoming==1.5.4
|
||||
zeroconf==0.88.0
|
||||
pyring-buffer==1.0.0
|
||||
@@ -1 +0,0 @@
|
||||
webrtc-noise-gain==1.2.3
|
||||
@@ -5,3 +5,4 @@ mypy==0.991
|
||||
pylint==2.15.9
|
||||
pytest==7.4.3
|
||||
pytest-asyncio==0.23.3
|
||||
build==1.2.2
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
pysilero-vad==1.0.0
|
||||
+1
-1
@@ -8,4 +8,4 @@ _PROGRAM_DIR = _DIR.parent
|
||||
_VENV_DIR = _PROGRAM_DIR / ".venv"
|
||||
|
||||
context = venv.EnvBuilder().ensure_directories(_VENV_DIR)
|
||||
subprocess.check_call([context.env_exe, _PROGRAM_DIR / "setup.py", "bdist_wheel"])
|
||||
subprocess.check_call([context.env_exe, "-m", "build", "--wheel", "--sdist"])
|
||||
|
||||
+2
-3
@@ -20,7 +20,6 @@ builder.create(_VENV_DIR)
|
||||
# Upgrade dependencies
|
||||
pip = [context.env_exe, "-m", "pip"]
|
||||
subprocess.check_call(pip + ["install", "--upgrade", "pip"])
|
||||
subprocess.check_call(pip + ["install", "--upgrade", "setuptools", "wheel"])
|
||||
|
||||
# Install requirements
|
||||
subprocess.check_call(
|
||||
@@ -31,8 +30,8 @@ subprocess.check_call(
|
||||
"https://www.piwheels.org/simple",
|
||||
"-f",
|
||||
"https://synesthesiam.github.io/prebuilt-apps/",
|
||||
"-r",
|
||||
str(_PROGRAM_DIR / "requirements.txt"),
|
||||
"-e",
|
||||
".",
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
from pathlib import Path
|
||||
from typing import List
|
||||
|
||||
import setuptools
|
||||
from setuptools import setup
|
||||
|
||||
this_dir = Path(__file__).parent
|
||||
module_dir = this_dir / "wyoming_satellite"
|
||||
version_path = module_dir / "VERSION"
|
||||
version = version_path.read_text(encoding="utf-8").strip()
|
||||
|
||||
|
||||
def get_requirements(req_path: Path) -> List[str]:
|
||||
if not req_path.is_file():
|
||||
return []
|
||||
|
||||
requirements: List[str] = []
|
||||
with open(req_path, "r", encoding="utf-8") as req_file:
|
||||
for line in req_file:
|
||||
line = line.strip()
|
||||
if not line:
|
||||
continue
|
||||
|
||||
requirements.append(line)
|
||||
|
||||
return requirements
|
||||
|
||||
|
||||
install_requires = get_requirements(this_dir / "requirements.txt")
|
||||
extras_require = {
|
||||
"silerovad": get_requirements(this_dir / "requirements_vad.txt"),
|
||||
"webrtc": get_requirements(this_dir / "requirements_audio_enhancement.txt"),
|
||||
}
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
setup(
|
||||
name="wyoming_satellite",
|
||||
version="1.1.0",
|
||||
description="Wyoming server for remote voice satellite",
|
||||
url="http://github.com/rhasspy/wyoming-satellite",
|
||||
author="Michael Hansen",
|
||||
author_email="mike@rhasspy.org",
|
||||
packages=setuptools.find_packages(),
|
||||
package_data={
|
||||
"wyoming_satellite": [str(p.relative_to(module_dir)) for p in (version_path,)]
|
||||
},
|
||||
install_requires=install_requires,
|
||||
classifiers=[
|
||||
"Development Status :: 3 - Alpha",
|
||||
"Intended Audience :: Developers",
|
||||
"License :: OSI Approved :: MIT License",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
],
|
||||
keywords="rhasspy wyoming satellite",
|
||||
extras_require=extras_require,
|
||||
entry_points={
|
||||
"console_scripts": ["wyoming-satellite = wyoming_satellite:__main__.run"]
|
||||
},
|
||||
)
|
||||
@@ -1,6 +1,6 @@
|
||||
[tox]
|
||||
env_list =
|
||||
py{39,310,311}
|
||||
py{39,310,311,312,313}
|
||||
minversion = 4.12.1
|
||||
|
||||
[testenv]
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
1.3.0
|
||||
@@ -1,4 +1,6 @@
|
||||
"""Voice satellite using the Wyoming protocol."""
|
||||
|
||||
import importlib.metadata
|
||||
from pathlib import Path
|
||||
|
||||
from .satellite import (
|
||||
@@ -17,7 +19,7 @@ from .settings import (
|
||||
)
|
||||
|
||||
_DIR = Path(__file__).parent
|
||||
__version__ = (_DIR / "VERSION").read_text(encoding="utf-8").strip()
|
||||
__version__ = importlib.metadata.version("wyoming-satellite")
|
||||
|
||||
__all__ = [
|
||||
"__version__",
|
||||
|
||||
Reference in New Issue
Block a user