-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
126 lines (121 loc) · 3.83 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
from setuptools import setup
from setuptools import find_packages
version = '0.0'
classifiers = """
Development Status :: 4 - Beta
Environment :: Console
Intended Audience :: Developers
License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)
Operating System :: OS Independent
Programming Language :: JavaScript
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3.3
Programming Language :: Python :: 3.4
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.6
""".strip().splitlines()
package_json = {
"dependencies": {
"requirejs-text": "~2.0.12",
"text-loader": "~0.0.1",
"nunjucks": "~3.0.0",
},
"devDependencies": {
"eslint": "~3.15.0",
}
}
long_description = (
open('README.rst').read()
+ '\n' +
open('CHANGES.rst').read()
+ '\n')
setup(
name='nunja',
version=version,
description="The unified templating framework for Python x JavaScript",
long_description=long_description,
classifiers=classifiers,
keywords='',
author='Tommy Yu',
author_email='[email protected]',
url='https://github.com/calmjs/nunja',
license='GPL',
packages=find_packages('src', exclude=['ez_setup']),
package_dir={'': 'src'},
namespace_packages=['nunja'],
zip_safe=False,
include_package_data=True,
package_json=package_json,
calmjs_module_registry=['calmjs.module', 'nunja.mold'],
install_requires=[
'Jinja2>=2.4',
'calmjs>=3.4.1',
],
python_requires='>=2.7,!=3.0.*,!=3.1.*,!=3.2.*',
extras_require={
'dev': [
'calmjs.dev>=2.3.0',
],
'rjs': [
'calmjs.rjs',
],
'webpack': [
'calmjs.webpack',
],
},
extras_calmjs={
'node_modules': {
'nunjucks': 'nunjucks/browser/nunjucks.js',
},
},
entry_points={
'calmjs.registry': [
# The template only registry.
'nunja.tmpl = nunja.registry:JinjaTemplateRegistry',
# The main mold registry.
'nunja.mold = nunja.registry:MoldRegistry',
# The registry for the tests written originally that are
# very tightly coupled with the RequireJS module framework.
'nunja.rjs.tests = calmjs.module:ModuleRegistry',
# Additional mold registry for the specification for
# supplementary molds that may be used for testing for a
# given package; should not contain actual tests.
'nunja.mold.testing = nunja.registry:MoldRegistry',
],
'calmjs.module': [
'nunja = nunja',
],
'calmjs.node_modules': [
'nunjucks/browser/nunjucks.js = nunjucks',
],
'calmjs.module.tests': [
'nunja.tests = nunja.tests',
],
'nunja.rjs.tests': [
'nunja.tests.rjs = nunja.tests.rjs',
],
'nunja.mold': [
'_core_ = nunja:_core_',
'nunja.molds = nunja:molds',
],
'nunja.tmpl': [
'nunja.tmpl = nunja:templates',
],
'nunja.mold.testing': [
'nunja.testing.mold = nunja.testing:mold',
],
'calmjs.toolchain.advice': [
'calmjs.rjs.toolchain:RJSToolchain = nunja.spec:rjs',
'calmjs.webpack.toolchain:WebpackToolchain = nunja.spec:webpack',
],
# note that under the current implementation, dependent packages
# that provide templates should declare this such that templates
# will be optimised by default, and to enable compatibility
# between the different supported toolchains (i.e. support both
# webpack and requirejs).
'calmjs.toolchain.advice.apply': [
'nunja = nunja',
],
},
test_suite="nunja.tests.make_suite",
)