-
Notifications
You must be signed in to change notification settings - Fork 5
/
setup.py
91 lines (81 loc) · 3.04 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#-----------------------------------------------------------------------------------------------------------------------
# INFO:
#-----------------------------------------------------------------------------------------------------------------------
"""
Author: Evan Hubinger
License: Apache 2.0
Description: Installer for cPyparsing.
"""
#-----------------------------------------------------------------------------------------------------------------------
# IMPORTS:
#-----------------------------------------------------------------------------------------------------------------------
from __future__ import print_function, absolute_import, unicode_literals, division
import sys
import os.path
import setuptools
import warnings
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
from constants import (
version,
file_name,
base_name,
c_name,
requirements,
compiler_directives,
)
#-----------------------------------------------------------------------------------------------------------------------
# SETUP:
#-----------------------------------------------------------------------------------------------------------------------
try:
from Cython.Build import cythonize
except ImportError:
warnings.warn("cPyparsing couldn't find Cython; falling back to bundled cPyparsing.c")
ext_modules = [setuptools.Extension(str(base_name), [str(c_name)])]
else:
ext_modules = cythonize(
str(file_name),
force=True,
compiler_directives=compiler_directives,
)
setuptools.setup(
name=base_name,
version=version,
ext_modules=ext_modules,
packages=setuptools.find_packages(exclude=[
"tests",
]),
setup_requires=requirements,
include_package_data=True,
zip_safe=False,
description="Cython implementation of PyParsing for use in Coconut.",
long_description="""
See cPyparsing's GitHub_ for more information.
.. _GitHub: https://github.com/evhub/cpyparsing
""",
url="https://github.com/evhub/cpyparsing",
author="Evan Hubinger",
author_email="evanjhub@gmail.com",
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Intended Audience :: Information Technology',
"License :: OSI Approved :: Apache Software License",
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
],
)