File size: 2,088 Bytes
e0092fc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
"""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 []),
        ],
    },
)