-
Notifications
You must be signed in to change notification settings - Fork 6
/
setup.py
85 lines (77 loc) · 2.32 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
import os
import sys
from setuptools import setup
from setuptools.command.build_py import build_py
from subprocess import call
class BuildHook(build_py):
"""Forcing the optimizer to run before the build step"""
def __init__(self, *a, **kw):
# must use clone of this, otherwise Python on Windows gets sad.
env = os.environ.copy()
env['PYTHONPATH'] = 'src'
code = call([
sys.executable, '-m', 'calmjs.parse.parsers.optimize', '--build'
], env=env)
if code:
sys.exit(1)
build_py.__init__(self, *a, **kw)
# Attributes
version = '1.4.0'
classifiers = """
Development Status :: 5 - Production/Stable
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Operating System :: OS Independent
Programming Language :: JavaScript
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
Programming Language :: Python :: 3.12
Programming Language :: Python :: 3.13
""".strip().splitlines()
long_description = (
open('README.rst').read()
+ '\n' +
open('CHANGES.rst').read()
+ '\n')
setup(
name='calmjs.parse',
version=version,
description="Various parsers for ECMA standards.",
long_description=long_description,
# Get more strings from
# http://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=classifiers,
keywords='',
author='Tommy Yu',
author_email='[email protected]',
url='https://github.com/calmjs/calmjs.parse',
license='mit',
# To build this under Python 2, create src/calmjs/__init__.py with
#
# __import__('pkg_resources').declare_namespace(__name__)
#
# and uncomment the following:
# packages=find_packages('src'),
# package_dir={'': 'src'},
# namespace_packages=['calmjs'],
include_package_data=True,
zip_safe=False,
cmdclass={
'build_py': BuildHook,
},
install_requires=[
'setuptools',
'ply>=3.6',
],
python_requires='>=3.3',
entry_points={
},
test_suite="calmjs.parse.tests.make_suite",
)