Spaces:
Running
Running
| """Platform-conditional package_data for setuptools builds. | |
| The bundled qwentts-cpp CPU wheels under `tts/wheels/*.whl` are | |
| manylinux-only ELF binaries kept around for the dormant qwentts | |
| re-enable path (see tts/__init__.py and tts/manager.py for the | |
| recipe). They MUST ship in the Linux wheel so the re-enable | |
| flow can `extract()` them, but they MUST NOT ship in the | |
| Windows / macOS wheel — setuptools' bdist_wheel aborts on | |
| cross-platform .whl inclusion with "could not create ... | |
| .whl: No such file or directory". | |
| setuptools' `[tool.setuptools.package-data]` table in | |
| pyproject.toml doesn't support environment markers, so we | |
| gate the wheels with a runtime check here. setuptools' | |
| `build_meta` backend will use this setup.py for hooks and | |
| augment the pyproject.toml-declared metadata; project name, | |
| version, deps, etc. still come from pyproject.toml. | |
| """ | |
| import sys | |
| import setuptools | |
| # On Linux: ship the dormant qwentts wheels so the re-enable | |
| # path can find them in-process. qwentts_variant.py only looks | |
| # in this dir on a Linux runtime (it returns None on Windows | |
| # and macOS), so the wheels are unused elsewhere. | |
| # | |
| # On Windows / macOS: omit them entirely. The setuptools | |
| # bdist_wheel step chokes on the manylinux payload for | |
| # non-Linux platforms, and the runtime never reads them. | |
| _IS_LINUX = sys.platform.startswith("linux") | |
| setuptools.setup( | |
| package_data={ | |
| "reachy_conv_app": [ | |
| "dashboard/static/*", | |
| "dashboard/static/**/*", | |
| "vad/models/*", | |
| "vad/models/**/*", | |
| "images/*", | |
| "images/**/*", | |
| "tts/edge_voices.json", | |
| # Fat-wheel vendored deps (populated by | |
| # scripts/build_fat_wheel.py for per-platform | |
| # builds; empty for source builds, which the | |
| # _vendor_loader shim handles as a no-op). | |
| "_vendor/**/*", | |
| "*.yaml", | |
| "*.yml", | |
| # qwentts dormant wheels — Linux only. See | |
| # module docstring. | |
| *(["tts/wheels/*.whl"] if _IS_LINUX else []), | |
| ], | |
| }, | |
| ) | |