-
Notifications
You must be signed in to change notification settings - Fork 44
/
setup.py
executable file
·43 lines (40 loc) · 1.65 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
#!/usr/bin/env python
# SPDX-License-Identifier: MIT OR MPL-2.0 OR LGPL-2.1-or-later OR GPL-2.0-or-later
# Copyright 2018, SIL International, All rights reserved.
from re import findall
from os import path
from io import open
try:
from skbuild import setup
except ImportError:
from setuptools import setup
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
with open(path.join(here, 'include/graphite2/Font.h')) as f:
c_header = f.read()
major, minor, bug = findall('define GR2_VERSION_[A-X]+\s+(\d+)', c_header)
version = major + "." + minor + "." + bug
setup(
name = 'graphite2',
version = version,
description = 'SIL graphite2 smart font system python bindings',
author = 'SIL International',
license = 'LGPL-2.1+ OR MPL-2.0 OR GPL-2+',
url = 'https://github.com/silnrsi/graphite',
zip_safe = False,
package_dir = {'': 'python'},
packages = ['graphite2'],
install_requires = ['future'],
long_description = long_description,
long_description_content_type = 'text/markdown',
classifiers = [
'License :: OSI Approved :: GNU Library or Lesser General Public License v2 or later (LGPLv2+)',
'License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)',
'License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3'
]
)