-
Notifications
You must be signed in to change notification settings - Fork 43
/
setup.py
executable file
·83 lines (77 loc) · 2.71 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
#!/usr/bin/env python
import os
from setuptools import setup, Extension
import sys
py_version = sys.version_info[:2]
HERE = os.path.abspath(os.path.dirname(__file__))
try:
with open(os.path.join(HERE, 'README.rst')) as fh:
README = fh.read()
except IOError:
README = ''
INSTALL_REQUIRES = []
if py_version == (2, 6):
INSTALL_REQUIRES.append('argparse')
duktape = Extension('dukpy._dukpy',
define_macros=[('DUK_OPT_NONSTD_REGEXP_DOLLAR_ESCAPE', '1'),
('DUK_OPT_OCTAL_SUPPORT', '1')],
sources=[os.path.join('src', 'duktape', 'duktape.c'),
os.path.join('src', 'duktape', 'duk_v1_compat.c'),
os.path.join('src', 'duktape', 'duk_module_duktape.c'),
os.path.join('src','_support.c'),
os.path.join('src','pyduktape.c')],
include_dirs=[os.path.join('.', 'src', 'duktape')])
name = 'dukpy'
repo_slug = 'amol-/{0}'.format(name)
repo_url = 'https://github.com/{0}'.format(repo_slug)
setup(
name=name,
version='0.5.0',
description='Simple JavaScript interpreter for Python',
long_description=README,
keywords='javascript compiler babeljs jsx coffeescript typescript',
author='Alessandro Molina',
author_email='[email protected]',
url=repo_url,
project_urls={
'CI: AppVeyor': 'https://ci.appveyor.com/project/{0}'.format(repo_slug),
'CI: Travis': 'https://travis-ci.org/{0}'.format(repo_slug),
'GitHub: issues': '{0}/issues'.format(repo_url),
'GitHub: repo': repo_url,
},
license='MIT',
packages=['dukpy', 'dukpy.webassets'],
ext_modules=[duktape],
install_requires=INSTALL_REQUIRES,
extras_require={
'testing': [
'pytest',
'pytest-cov',
'mock',
],
'webassets': [
'webassets',
],
},
package_data={
'dukpy': ['jscore/*.js', 'jsmodules/*.js', 'jsmodules/react/*.js',
'jsmodules/less/*/*.js', 'jsmodules/less/*/*/*.js'],
},
classifiers=[
'Development Status :: 3 - Alpha',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.7',
'Programming Language :: JavaScript',
],
entry_points={
'console_scripts': [
'dukpy-install = dukpy.install:main',
'dukpy = dukpy.run:main'
]
}
)