-
-
Notifications
You must be signed in to change notification settings - Fork 23
/
setup.py
73 lines (65 loc) · 2.51 KB
/
setup.py
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
import codecs
import os.path
from setuptools import setup
# Single version reference in lib/hyperglot/__init__.py read via 1.) method via
# https://packaging.python.org/guides/single-sourcing-package-version/#single-sourcing-the-version # noqa
def read(rel_path):
here = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(here, rel_path), 'r') as fp:
return fp.read()
def get_version(rel_path):
for line in read(rel_path).splitlines():
if line.startswith('__version__'):
delim = '"' if '"' in line else "'"
return line.split(delim)[1]
else:
raise RuntimeError("Unable to find version string.")
# Shared README.md for pip long description and repository
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setup(name="hyperglot",
version=get_version("lib/hyperglot/__init__.py"),
python_requires='>3.8.0',
description="Detect language support for font binaries",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/rosettatype/hyperglot",
project_urls={
"Hyperglot web interface": "https://hyperglot.rosettatype.com",
},
author="Johannes Neumeier - Rosetta",
author_email="[email protected]",
license="GNU GPLv3",
classifiers=[
"Programming Language :: Python :: 3.8",
"Operating System :: OS Independent",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Intended Audience :: End Users/Desktop",
"Intended Audience :: Information Technology",
"Topic :: Text Processing :: Fonts",
"Topic :: Text Processing :: Linguistic",
],
packages=[
"hyperglot"
],
package_dir={"": "lib"},
package_data={"hyperglot": ["data/*.yaml", "extra_data/*"]},
include_package_data=True,
entry_points={
"console_scripts": [
"hyperglot = hyperglot.cli:cli",
"hyperglot-report = hyperglot.cli:report",
"hyperglot-data = hyperglot.cli:data",
"hyperglot-validate = hyperglot.validate:validate",
"hyperglot-save = hyperglot.cli:save_sorted",
"hyperglot-export = lib.hyperglot.cli:export"
]
},
install_requires=[
"click>=7.0",
"fonttools>=4.50.0",
"uharfbuzz>=0.39.0",
"pyyaml>=6.0.0",
"colorlog>=6.4.1"
],
)