Repository navigation
Expand file tree
/
Copy pathsetup.py
More file actions
56 lines (47 loc) · 2.39 KB
/
Copy pathsetup.py
File metadata and controls
56 lines (47 loc) · 2.39 KB
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
import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
about = {}
with open(os.path.join(here, "polyhost/_version.py"), encoding="utf-8") as version_file:
exec(version_file.read(), about)
def readme():
with open(os.path.join(here, "README.md"), encoding="utf-8") as readme_file:
return readme_file.read()
def requirements():
"""Read install requirements from requirements.txt (single source of truth)."""
reqs = []
with open(os.path.join(here, "requirements.txt"), encoding="utf-8") as req_file:
for raw in req_file:
line = raw.split("#", 1)[0].strip()
if line and not line.startswith("-"):
reqs.append(line)
return reqs
setup(name='PolyHost',
version=about["__version__"],
description='Communication from PolyKybd to the host system',
long_description=readme(),
long_description_content_type='text/markdown',
license='GPL-3.0-or-later',
classifiers=[
'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
],
keywords='polykybd host forwarder poly',
url='https://github.com/thpoll83/PolyKybdHost',
author='thpoll',
packages=find_packages(exclude=['tests', 'tests.*']),
# The PRC table (HID cmd 41) is part of the wire format, so a wheel without it
# would fail on the first v19 overlay send. Only the table is listed: the rest
# of polyhost/res/ is not packaged either and is read from the checkout.
# The UI translations are read from these .po files at startup; without
# them every language falls back to English.
# The shell title scripts are sourced by the user's shell startup files
# from this install's path (services/shell_title.py).
package_data={"polyhost": ["res/prc_table_v*.bin", "res/locale/*.po", "device/*.rules",
"res/shell/polykybd-title.*"]},
install_requires=requirements(),
# The font-pack *extend* path (build glyphs from TTF/OTF, fontconvert-parity)
# needs freetype-py/uharfbuzz/fonttools — now core deps (requirements.txt) so
# Build works out of the box. The [fontgen] extra is kept as a no-op alias
# for back-compat with `pip install .[fontgen]`.
extras_require={"fontgen": []},
entry_points={"console_scripts": ["polyctl = polyhost.cli.polyctl:main"]})