multi-lang-build 0.2.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,402 @@
1
+ Metadata-Version: 2.4
2
+ Name: multi-lang-build
3
+ Version: 0.2.5
4
+ Summary: Multi-language automated build tool with domestic mirror acceleration support
5
+ Project-URL: Homepage, https://github.com/example/multi-lang-build
6
+ Project-URL: Repository, https://github.com/example/multi-lang-build
7
+ Project-URL: Issues, https://github.com/example/multi-lang-build/issues
8
+ Author-email: Multi-Lang Build Team <team@example.com>
9
+ License: MIT
10
+ License-File: LICENSE
11
+ Keywords: automation,build,china,go,mirror,multi-language,pnpm,python
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Programming Language :: Python :: 3.14
20
+ Classifier: Topic :: System :: Software Distribution
21
+ Requires-Python: >=3.11
22
+ Requires-Dist: typing-extensions>=4.12.0; python_version < '3.14'
23
+ Provides-Extra: dev
24
+ Requires-Dist: mypy>=1.8.0; extra == 'dev'
25
+ Requires-Dist: pytest-cov>=5.0.0; extra == 'dev'
26
+ Requires-Dist: pytest>=8.0.0; extra == 'dev'
27
+ Requires-Dist: ruff>=0.4.0; extra == 'dev'
28
+ Description-Content-Type: text/markdown
29
+
30
+ # 🚀 AutoBuild
31
+
32
+ <p align="center">
33
+ <strong>多语言自动化构建工具</strong><br>
34
+ 支持前端 pnpm、后端 Go、Python,一键加速国内镜像
35
+ </p>
36
+
37
+ <p align="center">
38
+ <a href="https://pypi.org/project/multi-lang-build/">
39
+ <img src="https://img.shields.io/pypi/v/multi-lang-build.svg" alt="PyPI version">
40
+ </a>
41
+ <a href="https://pypi.org/project/multi-lang-build/">
42
+ <img src="https://img.shields.io/pypi/pyversions/multi-lang-build.svg" alt="Python versions">
43
+ </a>
44
+ <a href="https://github.com/yourusername/multi-lang-build/blob/main/LICENSE">
45
+ <img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License">
46
+ </a>
47
+ <a href="https://github.com/yourusername/multi-lang-build/actions">
48
+ <img src="https://img.shields.io/badge/build-passing-brightgreen.svg" alt="Build Status">
49
+ </a>
50
+ </p>
51
+
52
+ <p align="center">
53
+ <a href="#特性">特性</a> •
54
+ <a href="#快速开始">快速开始</a> •
55
+ <a href="#ide-集成">IDE 集成</a> •
56
+ <a href="#安装">安装</a> •
57
+ <a href="#详细文档">详细文档</a> •
58
+ <a href="#许可证">许可证</a>
59
+ </p>
60
+
61
+ ---
62
+
63
+ ## ✨ 特性
64
+
65
+ <table>
66
+ <tr>
67
+ <td width="33%" valign="top">
68
+
69
+ ### 🎯 多语言支持
70
+ - **Go** - 支持多入口编译、交叉编译
71
+ - **Python** - 自动检测 Poetry/Setuptools/PDM
72
+ - **PNPM** - 自动检测项目根目录
73
+
74
+ </td>
75
+ <td width="33%" valign="top">
76
+
77
+ ### ⚡ 镜像加速
78
+ - 自动配置国内镜像源
79
+ - 提升依赖下载速度
80
+ - 支持切换多种镜像
81
+
82
+ </td>
83
+ <td width="33%" valign="top">
84
+
85
+ ### 🔧 开发者友好
86
+ - 完整的类型注解
87
+ - 统一的 API 接口
88
+ - CLI 命令行支持
89
+
90
+ </td>
91
+ </tr>
92
+ </table>
93
+
94
+ ## 🚀 快速开始
95
+
96
+ ### 安装
97
+
98
+ ```bash
99
+ pip install multi-lang-build
100
+
101
+ # 配置国内镜像(可选)
102
+ multi-lang-build mirror set pip # pip 使用清华镜像
103
+ multi-lang-build mirror set go # Go 使用 goproxy.cn
104
+ multi-lang-build mirror set npm # npm/pnpm 使用 npmmirror
105
+ ```
106
+
107
+ ### 1. 构建 Go 项目(支持多入口)
108
+
109
+ ```python
110
+ from multi_lang_build import GoCompiler
111
+ from pathlib import Path
112
+
113
+ compiler = GoCompiler()
114
+
115
+ # 指定入口文件编译(同一目录多 main 文件)
116
+ compiler.build_binary(
117
+ source_dir=Path("./myproject"),
118
+ output_path=Path("./bin/server"),
119
+ target="server.go", # 🎯 指定入口文件
120
+ mirror_enabled=True
121
+ )
122
+
123
+ # 指定子目录编译(cmd 结构)
124
+ compiler.build_binary(
125
+ source_dir=Path("./myproject"),
126
+ output_path=Path("./bin/client"),
127
+ target="./cmd/client", # 📁 指定包路径
128
+ mirror_enabled=True
129
+ )
130
+ ```
131
+
132
+ ### 2. 构建 Python 项目
133
+
134
+ ```python
135
+ from multi_lang_build import PythonCompiler
136
+
137
+ compiler = PythonCompiler()
138
+
139
+ # 自动检测并安装依赖(支持 Poetry/Setuptools/PDM)
140
+ compiler.install_dependencies(
141
+ source_dir=Path("./myproject"),
142
+ mirror_enabled=True,
143
+ dev=True
144
+ )
145
+
146
+ # 构建项目
147
+ compiler.build(
148
+ source_dir=Path("./myproject"),
149
+ output_dir=Path("./dist"),
150
+ mirror_enabled=True
151
+ )
152
+ ```
153
+
154
+ ### 3. 构建前端项目
155
+
156
+ ```python
157
+ from multi_lang_build import PnpmCompiler
158
+
159
+ compiler = PnpmCompiler()
160
+
161
+ # 自动检测项目根目录(支持子目录调用)
162
+ compiler.build(
163
+ source_dir=Path("./packages/ui/src"), # 即使在子目录也能正确构建
164
+ output_dir=Path("./dist"),
165
+ mirror_enabled=True
166
+ )
167
+ ```
168
+
169
+ ## 🎯 IDE 集成
170
+
171
+ 将 multi-lang-build 注册为 IDE 技能,获得更智能的构建体验。
172
+
173
+ ### 支持的 IDE
174
+
175
+ | IDE | 命令 | 说明 |
176
+ |-----|------|------|
177
+ | 🤖 **Claude Code** | `multi-lang-build register` | 默认,AI 助手原生支持 |
178
+ | 💠 **OpenCode** | `multi-lang-build register opencode` | 智能代码助手集成 |
179
+ | 🔷 **Trae** | `multi-lang-build register trae` | 字节跳动 AI IDE |
180
+ | 🎯 **CodeBuddy** | `multi-lang-build register codebuddy` | 代码伙伴插件 |
181
+
182
+ ### 注册 Claude Code(默认)
183
+
184
+ ```bash
185
+ # 默认注册到项目级(.claude/multi-lang-build.md)
186
+ multi-lang-build register
187
+
188
+ # 或使用完整命令
189
+ multi-lang-build register claude
190
+
191
+ # 注册到全局配置
192
+ multi-lang-build register claude --global
193
+ ```
194
+
195
+ ### 注册其他 IDE
196
+
197
+ ```bash
198
+ # 注册到 OpenCode
199
+ multi-lang-build register opencode
200
+
201
+ # 注册到 Trae
202
+ multi-lang-build register trae
203
+
204
+ # 注册到 CodeBuddy
205
+ multi-lang-build register codebuddy
206
+ ```
207
+
208
+ ### 注册功能说明
209
+
210
+ 注册命令会将 skill 配置添加到指定 IDE 的配置目录:
211
+
212
+ | IDE | 命令 | 项目级配置 | 全局配置 |
213
+ |-----|------|-----------|---------|
214
+ | 🤖 **Claude Code** | `multi-lang-build register` | `.claude/multi-lang-build.md` | `~/.claude/CLAUDE.md` |
215
+ | 💠 **OpenCode** | `multi-lang-build register opencode` | `.opencode/skills.json` | `~/.config/opencode/skills.json` |
216
+ | 🔷 **Trae** | `multi-lang-build register trae` | `.trae/skills.json` | `~/.trae/skills.json` |
217
+ | 🎯 **CodeBuddy** | `multi-lang-build register codebuddy` | `.codebuddy/skills.yaml` | `~/.codebuddy/skills.yaml` |
218
+
219
+ 注册后,IDE 将自动识别项目类型并提供智能构建建议。
220
+
221
+ ## 📦 安装
222
+
223
+ ### 使用 pip 安装
224
+
225
+ ```bash
226
+ # 基础安装
227
+ pip install multi-lang-build
228
+
229
+ # 开发环境(包含测试工具)
230
+ pip install multi-lang-build[dev]
231
+ ```
232
+
233
+ ### 系统要求
234
+
235
+ - Python 3.11+
236
+ - 对应语言的构建工具:
237
+ - **Go**: `go` 命令
238
+ - **Python**: `python3` 和 `pip`
239
+ - **PNPM**: `pnpm` 和 `node`
240
+
241
+ ## 📚 详细文档
242
+
243
+ | 语言 | 文档 | 说明 |
244
+ |------|------|------|
245
+ | 🐹 **Go** | [go.md](go.md) | 多入口编译、交叉编译、target 参数详解 |
246
+ | 🐍 **Python** | [python.md](python.md) | 依赖管理、虚拟环境、构建系统检测 |
247
+ | 📦 **PNPM** | [pnpm.md](pnpm.md) | 项目根目录检测、Monorepo 支持、镜像配置 |
248
+
249
+ ## 🛠️ CLI 命令行
250
+
251
+ ```bash
252
+ # Go 项目构建(默认实时输出日志)
253
+ go-build ./myproject --output ./bin/app --target server.go --mirror
254
+
255
+ # 禁用实时输出
256
+ go-build ./myproject --output ./bin/app --no-stream
257
+
258
+ # Python 项目构建
259
+ python-build ./myproject --output ./dist --mirror
260
+
261
+ # PNPM 项目构建
262
+ pnpm-build ./myproject --output ./dist --mirror
263
+
264
+ # 注册到 IDE(默认 Claude Code)
265
+ multi-lang-build register
266
+
267
+ # 注册到指定 IDE
268
+ multi-lang-build register opencode
269
+ multi-lang-build register trae
270
+ multi-lang-build register codebuddy
271
+
272
+ # 镜像配置
273
+ multi-lang-build mirror list # 列出可用镜像
274
+ multi-lang-build mirror set pip # 配置 pip 镜像
275
+ multi-lang-build mirror set go # 配置 Go 代理
276
+ multi-lang-build mirror show # 查看当前配置
277
+ ```
278
+
279
+ ## 🌟 核心特性对比
280
+
281
+ <table>
282
+ <thead>
283
+ <tr>
284
+ <th>特性</th>
285
+ <th>GoCompiler</th>
286
+ <th>PythonCompiler</th>
287
+ <th>PnpmCompiler</th>
288
+ </tr>
289
+ </thead>
290
+ <tbody>
291
+ <tr>
292
+ <td>自动检测项目</td>
293
+ <td>✅ go.mod</td>
294
+ <td>✅ pyproject.toml/setup.py</td>
295
+ <td>✅ package.json</td>
296
+ </tr>
297
+ <tr>
298
+ <td>多入口支持</td>
299
+ <td>✅ <code>target</code> 参数</td>
300
+ <td>❌</td>
301
+ <td>✅ 自动检测</td>
302
+ </tr>
303
+ <tr>
304
+ <td>镜像加速</td>
305
+ <td>✅ goproxy.cn</td>
306
+ <td>✅ 清华/阿里云等</td>
307
+ <td>✅ npmmirror</td>
308
+ </tr>
309
+ <tr>
310
+ <td>CLI 支持</td>
311
+ <td>✅ go-build</td>
312
+ <td>✅ python-build</td>
313
+ <td>✅ pnpm-build</td>
314
+ </tr>
315
+ <tr>
316
+ <td>类型安全</td>
317
+ <td>✅ Type Hints</td>
318
+ <td>✅ Type Hints</td>
319
+ <td>✅ Type Hints</td>
320
+ </tr>
321
+ </tbody>
322
+ </table>
323
+
324
+ ## 📝 示例项目
325
+
326
+ ### Go 多入口项目
327
+
328
+ ```
329
+ myproject/
330
+ ├── go.mod
331
+ ├── server.go # package main - API 服务
332
+ ├── client.go # package main - CLI 工具
333
+ └── worker.go # package main - 后台任务
334
+ ```
335
+
336
+ ```python
337
+ # 构建所有入口
338
+ compiler = GoCompiler()
339
+
340
+ entries = ["server.go", "client.go", "worker.go"]
341
+ for entry in entries:
342
+ name = entry.replace(".go", "")
343
+ compiler.build_binary(
344
+ source_dir=Path("./myproject"),
345
+ output_path=Path(f"./bin/{name}"),
346
+ target=entry
347
+ )
348
+ ```
349
+
350
+ ### Python Poetry 项目
351
+
352
+ ```
353
+ myproject/
354
+ ├── pyproject.toml # Poetry 配置
355
+ ├── poetry.lock
356
+ └── src/
357
+ └── mypackage/
358
+ ```
359
+
360
+ ```python
361
+ # 一键安装依赖并构建
362
+ compiler = PythonCompiler()
363
+ compiler.install_dependencies(source_dir=Path("./myproject"), dev=True)
364
+ compiler.build(source_dir=Path("./myproject"), output_dir=Path("./dist"))
365
+ ```
366
+
367
+ ### 前端 Monorepo
368
+
369
+ ```
370
+ monorepo/
371
+ ├── package.json
372
+ ├── pnpm-workspace.yaml
373
+ └── packages/
374
+ ├── ui/
375
+ ├── utils/
376
+ └── app/
377
+ ```
378
+
379
+ ```python
380
+ # 批量构建所有包
381
+ compiler = PnpmCompiler()
382
+
383
+ for pkg in ["ui", "utils", "app"]:
384
+ compiler.build(
385
+ source_dir=Path(f"./packages/{pkg}"),
386
+ output_dir=Path(f"./packages/{pkg}/dist")
387
+ )
388
+ ```
389
+
390
+ ## 🤝 贡献
391
+
392
+ 欢迎提交 Issue 和 Pull Request!
393
+
394
+ ## 📄 许可证
395
+
396
+ [MIT](LICENSE) © Multi-Lang Build Team
397
+
398
+ ---
399
+
400
+ <p align="center">
401
+ 用 ❤️ 构建 | 让多语言开发更简单
402
+ </p>
@@ -0,0 +1,18 @@
1
+ multi_lang_build/__init__.py,sha256=kePB6uFzZCR95M3Ox5qX91gUP2yXBaWS9C7Gh8LZTnY,1777
2
+ multi_lang_build/cli.py,sha256=cOlXyJKdb6sReBPyCLZgQhCkJOA_lbkY67Xfk-hGbPc,12949
3
+ multi_lang_build/py.typed,sha256=c8jtFarMovqA5DdwhEzKPH4WrX85xaoiWilIlvuc6KU,84
4
+ multi_lang_build/register.py,sha256=dbNXNTnxtbh3r3Giej3trHQmI2VO5ydbkkExvCdYm8w,14501
5
+ multi_lang_build/types.py,sha256=iCyz_6KmEBU4xwpCtfJnpzXoiSsmOcOKOhzHJVx8Z4Q,1043
6
+ multi_lang_build/compiler/__init__.py,sha256=y5vvVN6HdSzq4W1kXBMy_vQq9G3-TtiVcNMOyBQHbCw,484
7
+ multi_lang_build/compiler/base.py,sha256=crtDW9bthfV-FSpp96O2Hi0DrViNqcIt4TjAVK2lPXE,9391
8
+ multi_lang_build/compiler/go.py,sha256=JV0GdHfhe-Lqyh7byMX_HguQ_XMwspW9RtHZIG1wyAo,15273
9
+ multi_lang_build/compiler/pnpm.py,sha256=BDUVZCX5PuhqlFp_ARKUMbLqUDLraTlKp3tdom60hzk,15774
10
+ multi_lang_build/compiler/python.py,sha256=8XqE_Jp_G-x6g5Qrux4tCV8Ag-zZqLLLXapSIzcSLJw,17662
11
+ multi_lang_build/mirror/__init__.py,sha256=RrZOQ83bxImAR275zeAUKyyCgwqdGt5xH8tF_-UShJo,489
12
+ multi_lang_build/mirror/cli.py,sha256=qv6RI6izxUIsfMCIDOtTK3avcNSJpAaUF3NPiK1W49A,9820
13
+ multi_lang_build/mirror/config.py,sha256=d9KJoV80BUZOR9R3DpcT1r0nyxH1HK6hfLZU7IsUGcw,8552
14
+ multi_lang_build-0.2.5.dist-info/METADATA,sha256=6o3vhDX8wpCItsDpsG4MvkXrmViJM2YO44ViQTWFCww,10009
15
+ multi_lang_build-0.2.5.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
16
+ multi_lang_build-0.2.5.dist-info/entry_points.txt,sha256=0vd5maQH5aZoqnpbr2Yr_IWB_-ncWX1rO3jGBCW3pHY,319
17
+ multi_lang_build-0.2.5.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
18
+ multi_lang_build-0.2.5.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.28.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,7 @@
1
+ [console_scripts]
2
+ go-build = multi_lang_build.compiler.go:main
3
+ multi-lang-build = multi_lang_build:main
4
+ multi-lang-mirror = multi_lang_build.mirror.cli:mirror_main
5
+ multi-lang-register = multi_lang_build:main_register
6
+ pnpm-build = multi_lang_build.compiler.pnpm:main
7
+ python-build = multi_lang_build.compiler.python:main
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.