-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
60 lines (52 loc) · 1.78 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
from setuptools import setup, find_packages
import re
import io
import os
import sys
def read_version():
with io.open('./glud/version.py', encoding='utf8') as version_file:
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file.read(), re.M)
if version_match:
version = version_match.group(1)
else:
raise runtimeerror("unable to find version string.")
return version
def read(filename):
path = os.path.join(os.path.dirname(__file__), filename)
with io.open(path, encoding='utf8') as fh:
return fh.read()
def requires():
req = ['asciitree']
if sys.version_info.major == 2:
return req + ['clang']
else:
return req + ['libclang-py3']
setup(
name="glud",
install_requires=requires(),
description="Functional tools for matching nodes in the clang AST",
long_description=read('README.rst'),
version=read_version(),
author="Andrew Walker",
author_email="[email protected]",
url="http://github.com/AndrewWalker/glud",
license="MIT",
keywords=['libclang', 'clang', 'AST'],
packages=find_packages(exclude=['tests']),
classifiers=[
'Topic :: Software Development :: Compilers',
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Operating System :: POSIX :: Linux',
],
test_suite='tests',
zip_safe=False
)