fontlab-fly 1.3.4__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.
fly/__init__.py
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# this_file: src/fly/__init__.py
|
|
2
|
+
"""Ten lazy aliases sharing exact canonical module objects."""
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import sys
|
|
6
|
+
from importlib import import_module, util
|
|
7
|
+
from importlib.abc import Loader, MetaPathFinder
|
|
8
|
+
from importlib.machinery import ModuleSpec
|
|
9
|
+
from types import ModuleType
|
|
10
|
+
from typing import Any
|
|
11
|
+
|
|
12
|
+
ALIASES = {"fl": "echopy.fontlab", "fg": "echopy.fontgate", "tr": "typerig",
|
|
13
|
+
"pr": "echopy.fontpr", "qt": "PythonQt", "ap": "fontlabapp", "qs": "pythonqtside",
|
|
14
|
+
"gp": "fontlab_glyport", "fp": "fontlab_fontport", "pens": "fontlab_pens"}
|
|
15
|
+
__all__ = list(ALIASES)
|
|
16
|
+
_METADATA = ("__spec__", "__loader__", "__package__", "__path__", "__file__", "__cached__")
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def _load(target: str, alias: str) -> ModuleType:
|
|
20
|
+
try:
|
|
21
|
+
return import_module(target)
|
|
22
|
+
except ModuleNotFoundError as error:
|
|
23
|
+
if error.name and (target == error.name or target.startswith(error.name + ".")):
|
|
24
|
+
context = "native PythonQt inside FontLab" if alias == "qt" else f"the package providing {target}"
|
|
25
|
+
raise ModuleNotFoundError(f"fly.{alias} requires {context}", name=error.name) from error
|
|
26
|
+
raise
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class _AliasLoader(Loader):
|
|
30
|
+
def __init__(self, module: ModuleType) -> None:
|
|
31
|
+
self.module = module
|
|
32
|
+
self.metadata = {name: module.__dict__[name] for name in _METADATA if name in module.__dict__}
|
|
33
|
+
|
|
34
|
+
def create_module(self, spec: ModuleSpec) -> ModuleType:
|
|
35
|
+
return self.module
|
|
36
|
+
|
|
37
|
+
def exec_module(self, module: ModuleType) -> None:
|
|
38
|
+
for name in _METADATA:
|
|
39
|
+
if name in self.metadata:
|
|
40
|
+
module.__dict__[name] = self.metadata[name]
|
|
41
|
+
else:
|
|
42
|
+
module.__dict__.pop(name, None)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class _AliasFinder(MetaPathFinder):
|
|
46
|
+
_fontlab_fly_alias = True
|
|
47
|
+
|
|
48
|
+
def find_spec(self, fullname: str, path: Any = None, target: Any = None) -> ModuleSpec | None:
|
|
49
|
+
if not fullname.startswith("fly."):
|
|
50
|
+
return None
|
|
51
|
+
alias, dot, suffix = fullname[4:].partition(".")
|
|
52
|
+
if alias not in ALIASES:
|
|
53
|
+
return None
|
|
54
|
+
canonical = ALIASES[alias] + (dot + suffix if dot else "")
|
|
55
|
+
module = _load(canonical, alias)
|
|
56
|
+
return util.spec_from_loader(fullname, _AliasLoader(module), is_package=hasattr(module, "__path__"))
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
if not any(getattr(finder, "_fontlab_fly_alias", False) for finder in sys.meta_path):
|
|
60
|
+
sys.meta_path.insert(0, _AliasFinder())
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def __getattr__(name: str) -> ModuleType:
|
|
64
|
+
if name not in ALIASES:
|
|
65
|
+
raise AttributeError(name)
|
|
66
|
+
module = import_module(__name__ + "." + name)
|
|
67
|
+
globals()[name] = module
|
|
68
|
+
return module
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def __dir__() -> list[str]:
|
|
72
|
+
return sorted(set(globals()) | set(ALIASES))
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: fontlab-fly
|
|
3
|
+
Version: 1.3.4
|
|
4
|
+
Summary: Short exact aliases for FontLab scripting packages
|
|
5
|
+
Project-URL: Repository, https://github.com/fontlabcom/fontlab-fly
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
License-File: NOTICE
|
|
9
|
+
Requires-Python: >=3.11
|
|
10
|
+
Requires-Dist: fontlab-echopy>=0.1.0
|
|
11
|
+
Requires-Dist: fontlab-fontlabapp>=1.2.0
|
|
12
|
+
Requires-Dist: fontlab-fontport>=1.2.0
|
|
13
|
+
Requires-Dist: fontlab-glyport>=1.2.0
|
|
14
|
+
Requires-Dist: fontlab-python-pens>=1.0.0
|
|
15
|
+
Requires-Dist: pythonqtside>=0.1.0
|
|
16
|
+
Requires-Dist: typerig>=0.1.0
|
|
17
|
+
Provides-Extra: test
|
|
18
|
+
Requires-Dist: pytest>=8; extra == 'test'
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
this_file: README.md
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
# Fly: short FontLab imports
|
|
26
|
+
|
|
27
|
+
Fly gives FontLab scripts ten short imports. Each alias returns the original
|
|
28
|
+
module object. It adds no native API emulation or alternative alias targets.
|
|
29
|
+
Importing `fly` alone loads none of the target packages.
|
|
30
|
+
|
|
31
|
+
| Alias | Canonical module | Use |
|
|
32
|
+
| --- | --- | --- |
|
|
33
|
+
| `fl` | `echopy.fontlab` | FontLab bindings |
|
|
34
|
+
| `fg` | `echopy.fontgate` | FontGate bindings |
|
|
35
|
+
| `tr` | `typerig` | TypeRig library |
|
|
36
|
+
| `pr` | `echopy.fontpr` | FontLab command bridge |
|
|
37
|
+
| `qt` | `PythonQt` | Host Qt binding |
|
|
38
|
+
| `ap` | `fontlabapp` | Shared script and UI helpers |
|
|
39
|
+
| `qs` | `pythonqtside` | PySide-style access to host PythonQt |
|
|
40
|
+
| `gp` | `fontlab_glyport` | Glyphs.app compatibility |
|
|
41
|
+
| `fp` | `fontlab_fontport` | fontParts/UFO interoperability |
|
|
42
|
+
| `pens` | `fontlab_pens` | Pen and PointPen protocols |
|
|
43
|
+
|
|
44
|
+
## Install
|
|
45
|
+
|
|
46
|
+
To install into FontLab 9, open `install.vfpy` from a checkout in FontLab
|
|
47
|
+
(double-click it or drop it onto FontLab), then restart FontLab. The file is a
|
|
48
|
+
short stub that hands the work to
|
|
49
|
+
[fontlab-instamix](https://github.com/fontlabcom/fontlab-python-instamix); if
|
|
50
|
+
instamix is not installed yet, the stub installs it from PyPI first. Instamix
|
|
51
|
+
installs the package into FontLab's own `site-packages` and records the install
|
|
52
|
+
under the extension id `com.fontlab.fly`.
|
|
53
|
+
|
|
54
|
+
Requires Python 3.11 or later. FontLab host work targets Python 3.11 arm64.
|
|
55
|
+
FontLab supplies PythonQt. A separate Python environment cannot supply the
|
|
56
|
+
native FontLab runtime by installing Fly.
|
|
57
|
+
|
|
58
|
+
For standalone development, use the external environment recipe under
|
|
59
|
+
[Test and lint](#test-and-lint). It installs Fly without its target dependencies,
|
|
60
|
+
which is sufficient for Fly's offline tests. For real use, install the target
|
|
61
|
+
distributions from their checkouts or artifacts into the same runtime.
|
|
62
|
+
Declared minimums:
|
|
63
|
+
|
|
64
|
+
- `fontlab-echopy>=0.1.0`, `typerig>=0.1.0`;
|
|
65
|
+
- `fontlab-fontlabapp>=1.2.0`, `pythonqtside>=0.1.0`;
|
|
66
|
+
- `fontlab-glyport>=1.2.0`, `fontlab-fontport>=1.2.0`;
|
|
67
|
+
- `fontlab-python-pens>=1.0.0`.
|
|
68
|
+
|
|
69
|
+
Install `fontlab-python-pens` before Fly.
|
|
70
|
+
|
|
71
|
+
Meet the target packages' own requirements: metadata minimums do not guarantee
|
|
72
|
+
compatibility with every newer script.
|
|
73
|
+
Editable installs into FontLab are owner-managed. Do not run these standalone
|
|
74
|
+
installation commands against FontLab's site-packages.
|
|
75
|
+
|
|
76
|
+
## Use inside FontLab
|
|
77
|
+
|
|
78
|
+
```python
|
|
79
|
+
from fly import fl, fg, tr, pr, qt, ap, qs, gp, fp, pens
|
|
80
|
+
import fly.fl
|
|
81
|
+
import fly.gp
|
|
82
|
+
import fly.fp
|
|
83
|
+
import fly.pens
|
|
84
|
+
import fontlab_glyport
|
|
85
|
+
import fontlab_fontport
|
|
86
|
+
import fontlab_pens
|
|
87
|
+
|
|
88
|
+
assert fly.fl is fl
|
|
89
|
+
assert gp is fly.gp is fontlab_glyport
|
|
90
|
+
assert fp is fly.fp is fontlab_fontport
|
|
91
|
+
assert pens is fly.pens is fontlab_pens
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Both import forms keep the canonical module identity and metadata, including
|
|
95
|
+
native modules whose `__spec__` is `None`. Child imports use the same routing:
|
|
96
|
+
|
|
97
|
+
```python
|
|
98
|
+
from fly.fp.pens import FontGatePointPen
|
|
99
|
+
from fly.ap.fontui.feature_blocks import read_feature_blocks, write_feature_blocks
|
|
100
|
+
import fly.ap.core.history.glyphs as history
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Feature source helpers belong to App's `fontui.feature_blocks`; the shared
|
|
104
|
+
`fly.ap.core.scripting` module also exports lazy wrappers. Load App submodules
|
|
105
|
+
with their explicit domain paths as above.
|
|
106
|
+
|
|
107
|
+
For supported Glyphs-style code, use the public Glyport API through Fly:
|
|
108
|
+
|
|
109
|
+
```python
|
|
110
|
+
from fly import gp
|
|
111
|
+
|
|
112
|
+
Glyphs = gp.GlyphsApp.Glyphs
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
`gp.GlyphsApp` is the lazy public `fontlab_glyport.GlyphsApp` module. First
|
|
116
|
+
access to `Glyphs` binds a FontLab GUI-thread session. Outside FontLab, bind an
|
|
117
|
+
explicit backend with `gp.GlyphsApp.use_backend(backend)` first; call
|
|
118
|
+
`gp.GlyphsApp.unbind()` when done. See Glyport's compatibility guide for limits.
|
|
119
|
+
|
|
120
|
+
Accessing an alias imports its target. Accessing `ap` alone does not construct
|
|
121
|
+
App's Application or preference library. `qt` requires native PythonQt; a
|
|
122
|
+
missing target raises `ModuleNotFoundError` with alias context. A missing internal
|
|
123
|
+
dependency keeps its original error. Other exceptions propagate from the target.
|
|
124
|
+
PythonQt uses `QtGui` for widgets and `PythonQt.private` for `QObject`.
|
|
125
|
+
|
|
126
|
+
General UI/shared helpers belong in fontlabapp. Fontport owns fontParts/UFO
|
|
127
|
+
support; Glyport owns Glyphs.app compatibility. Pens owns the Pen/PointPen
|
|
128
|
+
protocols. Each alias exposes its complete canonical module; Fly adds no API
|
|
129
|
+
subset or wrappers. Scripts use App through Fly.
|
|
130
|
+
|
|
131
|
+
## Agent skills
|
|
132
|
+
|
|
133
|
+
[skills/](skills/) provides agent instructions for the FontLab ecosystem:
|
|
134
|
+
|
|
135
|
+
| Skill | Covers |
|
|
136
|
+
| --- | --- |
|
|
137
|
+
| [fontlab-setup](skills/fontlab-setup/SKILL.md) | Installing every package and script collection with `install.vfpy`, in dependency order; listing, uninstalling, troubleshooting |
|
|
138
|
+
| [fontlab-remote](skills/fontlab-remote/SKILL.md) | Controlling a running FontLab from outside with Remopy: MCP setup, `run`/`eval`/`@fl.python`, tools, limits and safety |
|
|
139
|
+
| [fontlab-scripting](skills/fontlab-scripting/SKILL.md) | Writing scripts with the Fly aliases, where code belongs, one-step Undo, testing |
|
|
140
|
+
|
|
141
|
+
Link the skill folders into the skills directory used by your agent.
|
|
142
|
+
|
|
143
|
+
## Module and file map
|
|
144
|
+
|
|
145
|
+
| Path | Role |
|
|
146
|
+
| --- | --- |
|
|
147
|
+
| [src/fly/__init__.py](src/fly/__init__.py) | Alias map, lazy attributes, import finder and metadata-preserving loader |
|
|
148
|
+
| [examples/native_smoke.py](examples/native_smoke.py) | Ten-alias identity smoke for a fresh FontLab import session |
|
|
149
|
+
| [tests/test_aliases.py](tests/test_aliases.py) | Lazy loading, identity, metadata, reload, child imports and errors |
|
|
150
|
+
| [tests/test_packaging.py](tests/test_packaging.py) | Builds a wheel; checks byte-exact LICENSE/NOTICE and licence metadata |
|
|
151
|
+
| [test.sh](test.sh) | Runs pytest through `uv run --no-sync` |
|
|
152
|
+
| [pyproject.toml](pyproject.toml) | Runtime requirements, pytest paths, Hatch build and Git-tag versioning |
|
|
153
|
+
| [DEPENDENCIES.md](DEPENDENCIES.md) | Dependency roles |
|
|
154
|
+
| [PLAN.md](PLAN.md), [TODO.md](TODO.md) | Current goals and open acceptance tasks |
|
|
155
|
+
| [CHANGELOG.md](CHANGELOG.md), [WORK.md](WORK.md), [RELEASE.md](RELEASE.md) | Changes, test evidence and historical release evidence |
|
|
156
|
+
|
|
157
|
+
## Documentation website
|
|
158
|
+
|
|
159
|
+
[Fly guide sources](src_docs/md/index.md) build locally; Pages is not deployed.
|
|
160
|
+
Private Pages publication is held by the owner on the current account plan.
|
|
161
|
+
Use Python 3.13 and the hash-locked `src_docs/requirements.txt`; `sh src_docs/build.sh`
|
|
162
|
+
reads `src_docs/mkdocs.yml` and regenerates `docs`. The [development guide](src_docs/md/development.md)
|
|
163
|
+
covers main-push CI: two full builds qualify source/output without requesting Pages.
|
|
164
|
+
|
|
165
|
+
## Test and lint
|
|
166
|
+
|
|
167
|
+
Run from this repository root on macOS arm64. Install uv first. The selected
|
|
168
|
+
Python must be installed or available for uv to download. Pytest and the wheel
|
|
169
|
+
build dependencies (Hatchling and hatch-vcs) must be available from the package
|
|
170
|
+
index or cache. Set `FONTLAB_SCRATCH` to a writable external-drive folder first.
|
|
171
|
+
|
|
172
|
+
```sh
|
|
173
|
+
: "${FONTLAB_SCRATCH:?Set FONTLAB_SCRATCH to a writable external-drive folder}"
|
|
174
|
+
export TMPDIR="$FONTLAB_SCRATCH/tmp" UV_CACHE_DIR="$FONTLAB_SCRATCH/fontlab-fly-cache"
|
|
175
|
+
mkdir -p "$TMPDIR" "$UV_CACHE_DIR" || exit 1
|
|
176
|
+
export PYTHONPATH="$PWD/src"
|
|
177
|
+
export PYTHONDONTWRITEBYTECODE=1 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
|
|
178
|
+
export GIT_OPTIONAL_LOCKS=0
|
|
179
|
+
uv run --python cpython-3.11-macos-aarch64-none --no-project --with pytest \
|
|
180
|
+
python -m pytest -q -p no:cacheprovider
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
`PYTHONPATH` is required by subprocess tests when Fly is not installed.
|
|
184
|
+
The explicit Python selector prevents accidental x86_64 or Python 3.12 use.
|
|
185
|
+
Tests use stand-in target modules; installing the target packages is not needed.
|
|
186
|
+
|
|
187
|
+
For a reusable standalone environment, use the same exports and prepare it first:
|
|
188
|
+
|
|
189
|
+
```sh
|
|
190
|
+
uv venv --python cpython-3.11-macos-aarch64-none "$TMPDIR/fontlab-fly-venv"
|
|
191
|
+
uv pip install --python "$TMPDIR/fontlab-fly-venv/bin/python" pytest
|
|
192
|
+
uv pip install --python "$TMPDIR/fontlab-fly-venv/bin/python" --no-deps -e .
|
|
193
|
+
UV_PROJECT_ENVIRONMENT="$TMPDIR/fontlab-fly-venv" ./test.sh -q -p no:cacheprovider
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
`./test.sh` runs `uv run --no-sync`. It requires a prepared Python 3.11 arm64
|
|
197
|
+
environment with pytest; it does not install pytest or select the host Python.
|
|
198
|
+
Without `UV_PROJECT_ENVIRONMENT`, it uses the project's `.venv`. A missing
|
|
199
|
+
`.venv` can cause uv to create an unsuitable environment and fail without pytest.
|
|
200
|
+
The editable install above affects only the standalone environment.
|
|
201
|
+
|
|
202
|
+
Ruff is installed separately:
|
|
203
|
+
|
|
204
|
+
```sh
|
|
205
|
+
ruff check --no-cache src tests examples
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
To build both distributions, keep the same cache/temp exports and run:
|
|
209
|
+
|
|
210
|
+
```sh
|
|
211
|
+
uv build --out-dir "$TMPDIR/fontlab-fly-dist"
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
Builds use Hatchling and hatch-vcs; versioning uses Git tags. Building artifacts
|
|
215
|
+
alone does not prove that they work in FontLab.
|
|
216
|
+
|
|
217
|
+
The suite includes a real wheel build and tests target routing
|
|
218
|
+
with stand-in modules. The separate `tests_docs/` suite checks publishing and generated pages.
|
|
219
|
+
On 2026-10-22, the offline suite passed on Python 3.11.17 arm64 (exit 0, 17 passed);
|
|
220
|
+
Ruff passed (exit 0). These checks do not prove native FontLab behavior.
|
|
221
|
+
|
|
222
|
+
Run `examples/native_smoke.py` inside FontLab with all targets available and a
|
|
223
|
+
fresh App import state. It also checks that importing `ap` has not created
|
|
224
|
+
`app`; a reused session can already contain it. The smoke proves alias identity,
|
|
225
|
+
not child-module behavior or full target functionality. Native acceptance uses
|
|
226
|
+
the workspace runner, owned fixtures and loaded-path checks because canonical
|
|
227
|
+
editable installs can shadow the worktree.
|
|
228
|
+
|
|
229
|
+
WORK.md retains historical FontLab 9.0.9783/Python 3.11.6/Qt 5.15.19 wheel/sdist
|
|
230
|
+
checks predating the provider refactor. Current native acceptance remains open.
|
|
231
|
+
|
|
232
|
+
## Releases and licence
|
|
233
|
+
v0.2.0 shipped the original seven aliases. v0.2.1 added `gp` and `fp`.
|
|
234
|
+
v0.2.2 set their dependency minimums and included NOTICE in wheel licence files.
|
|
235
|
+
|
|
236
|
+
[Apache-2.0](LICENSE); [NOTICE](NOTICE) credits Echopy. Providers retain their own licences.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
fly/__init__.py,sha256=uN2-ntnVcuSGvhoE-1gRs-lmz6iQ8TWD2NLyWFTRAqc,2693
|
|
2
|
+
fontlab_fly-1.3.4.dist-info/METADATA,sha256=Hxp4Id2bKxc_ClTbvY9spQzfqukkGin_u1jKX071gpw,10474
|
|
3
|
+
fontlab_fly-1.3.4.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
|
|
4
|
+
fontlab_fly-1.3.4.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
5
|
+
fontlab_fly-1.3.4.dist-info/licenses/NOTICE,sha256=wO4WQMYUKX_iA7AbbcaHjsHt6XgDMbpU1MWchPO1Fp8,126
|
|
6
|
+
fontlab_fly-1.3.4.dist-info/RECORD,,
|
|
@@ -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.
|