evok 0.1.2__tar.gz → 0.2.0__tar.gz
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.
- {evok-0.1.2 → evok-0.2.0}/IMPLEMENTATION_PLAN.md +44 -0
- {evok-0.1.2 → evok-0.2.0}/PKG-INFO +21 -16
- {evok-0.1.2 → evok-0.2.0}/README.md +17 -12
- {evok-0.1.2 → evok-0.2.0}/docs/api.md +43 -0
- evok-0.2.0/docs/architecture.md +55 -0
- evok-0.2.0/docs/cli.md +148 -0
- evok-0.2.0/docs/index.md +13 -0
- evok-0.2.0/docs/releasing.md +47 -0
- evok-0.2.0/packages/evok-build/LICENSE +21 -0
- evok-0.2.0/packages/evok-build/README.md +39 -0
- evok-0.2.0/packages/evok-build/pyproject.toml +13 -0
- evok-0.2.0/packages/evok-build/src/evok_build/__init__.py +6 -0
- evok-0.2.0/packages/evok-build/src/evok_build/backend.py +33 -0
- evok-0.2.0/packages/evok-build/src/evok_build/builder.py +406 -0
- evok-0.2.0/packages/evok-build/src/evok_build/macos.py +182 -0
- evok-0.2.0/packages/evok-build/src/evok_build/metadata.py +154 -0
- evok-0.2.0/packages/evok-build/src/evok_build/project.py +118 -0
- evok-0.2.0/pyproject.toml +54 -0
- {evok-0.1.2 → evok-0.2.0}/scripts/check_release.py +5 -2
- {evok-0.1.2 → evok-0.2.0}/scripts/qualify.py +13 -1
- evok-0.2.0/scripts/qualify_build.py +168 -0
- evok-0.2.0/scripts/qualify_clownfish.py +70 -0
- {evok-0.1.2 → evok-0.2.0}/src/evok/__init__.py +3 -1
- {evok-0.1.2 → evok-0.2.0}/src/evok/ast_scanner.py +4 -6
- evok-0.2.0/src/evok/builder.py +70 -0
- {evok-0.1.2 → evok-0.2.0}/src/evok/cli.py +99 -27
- evok-0.2.0/src/evok/index.py +169 -0
- evok-0.2.0/src/evok/install.py +120 -0
- evok-0.2.0/src/evok/markers.py +113 -0
- {evok-0.1.2 → evok-0.2.0}/src/evok/metadata.py +48 -12
- {evok-0.1.2 → evok-0.2.0}/src/evok/pep440.py +102 -33
- evok-0.2.0/src/evok/project.py +5 -0
- {evok-0.1.2 → evok-0.2.0}/src/evok/resolver.py +68 -28
- evok-0.2.0/tests/conftest.py +78 -0
- {evok-0.1.2 → evok-0.2.0}/tests/test_basic.py +1 -1
- evok-0.2.0/tests/test_builder.py +239 -0
- evok-0.2.0/tests/test_cli.py +119 -0
- evok-0.2.0/tests/test_install.py +55 -0
- {evok-0.1.2 → evok-0.2.0}/tests/test_packaging.py +0 -1
- {evok-0.1.2 → evok-0.2.0}/tests/test_pep440.py +11 -0
- evok-0.2.0/tests/test_project.py +30 -0
- {evok-0.1.2 → evok-0.2.0}/tests/test_resolver.py +25 -0
- evok-0.1.2/docs/architecture.md +0 -66
- evok-0.1.2/docs/cli.md +0 -78
- evok-0.1.2/docs/index.md +0 -11
- evok-0.1.2/docs/releasing.md +0 -23
- evok-0.1.2/pyproject.toml +0 -45
- evok-0.1.2/pyproject.toml.orig +0 -38
- evok-0.1.2/src/evok/builder.py +0 -177
- evok-0.1.2/tests/test_builder.py +0 -52
- evok-0.1.2/tests/test_cli.py +0 -60
- {evok-0.1.2 → evok-0.2.0}/LICENSE +0 -0
- {evok-0.1.2 → evok-0.2.0}/docs/benchmarks.md +0 -0
- {evok-0.1.2 → evok-0.2.0}/packaging/homebrew/Formula/evok.rb +0 -0
- {evok-0.1.2 → evok-0.2.0}/scripts/publish_homebrew.py +0 -0
- {evok-0.1.2 → evok-0.2.0}/src/evok/__main__.py +0 -0
- {evok-0.1.2 → evok-0.2.0}/src/evok/cache.py +0 -0
- {evok-0.1.2 → evok-0.2.0}/src/evok/environment.py +0 -0
- {evok-0.1.2 → evok-0.2.0}/src/evok/importer.py +0 -0
- {evok-0.1.2 → evok-0.2.0}/tests/test_ast_scanner.py +0 -0
- {evok-0.1.2 → evok-0.2.0}/tests/test_cache.py +0 -0
- {evok-0.1.2 → evok-0.2.0}/tests/test_environment.py +0 -0
- {evok-0.1.2 → evok-0.2.0}/tests/test_metadata.py +0 -0
|
@@ -104,3 +104,47 @@ entry points on Python 3.12-3.14. Add immutable tag/metadata/license/hash gates
|
|
|
104
104
|
before Trusted Publishing. Preserve the historical Homebrew formula; a new
|
|
105
105
|
version must use its own verified archive digest, never the 0.1.0 fallback.
|
|
106
106
|
Update the tap through a protected PR after actual PyPI verification.
|
|
107
|
+
|
|
108
|
+
## Programmable build and application targets
|
|
109
|
+
|
|
110
|
+
The standalone `evok-build` backend now covers PEP 660 editable installs,
|
|
111
|
+
namespace and stub layouts, data directories, and static metadata. Its installed
|
|
112
|
+
qualification compares a representative package through both `evok-build` and
|
|
113
|
+
`uv_build`. Qualify self-hosting and each Wispsy migration separately, including
|
|
114
|
+
the frontend and environment workflows.
|
|
115
|
+
|
|
116
|
+
Clownfish is the first native application target. Its arm64 macOS build compiled
|
|
117
|
+
with Python 3.14, Nuitka 4.4, and Clang. The relocated bundle passed Clownfish's
|
|
118
|
+
Tk initialization and headless PTY smoke checks, with the Tcl/Tk data and
|
|
119
|
+
application icon present. The trial used an executable basename distinct from
|
|
120
|
+
the Python resource directory on a case-insensitive filesystem. Its entry
|
|
121
|
+
point resolved the bundled executable for Clownfish's PTY trampoline, and
|
|
122
|
+
Nuitka's self-execution guard was disabled for that invocation. The opt-in
|
|
123
|
+
`macos-app` target retains the existing bundle identifier. [Issue #22](https://github.com/wispsy/evok/issues/22)
|
|
124
|
+
tracks clean-host signing and production qualification.
|
|
125
|
+
|
|
126
|
+
The [Evok Project](https://github.com/orgs/wispsy/projects/24) records the
|
|
127
|
+
[backend foundation](https://github.com/wispsy/evok/pull/20) and
|
|
128
|
+
[package compatibility](https://github.com/wispsy/evok/pull/23) as completed work.
|
|
129
|
+
|
|
130
|
+
For import intelligence, use Astree's standard-library Python adapter and
|
|
131
|
+
Echidnae's Python-to-JavaScript compiler module graph as references. A
|
|
132
|
+
first-party JavaScript parser for Astree is a separate concern from Python
|
|
133
|
+
project inspection. Parsethon's tokenizer and source maps are useful
|
|
134
|
+
references for transformed sources and diagnostics.
|
|
135
|
+
|
|
136
|
+
## Evok 0.2 package management
|
|
137
|
+
|
|
138
|
+
The [Evok Project](https://github.com/orgs/wispsy/projects/24) tracks
|
|
139
|
+
[index resolution](https://github.com/wispsy/evok/issues/26),
|
|
140
|
+
[project dependency installation](https://github.com/wispsy/evok/issues/28),
|
|
141
|
+
[self-hosting](https://github.com/wispsy/evok/issues/25), and
|
|
142
|
+
[release qualification](https://github.com/wispsy/evok/issues/27).
|
|
143
|
+
|
|
144
|
+
The resolver consumes JSON Simple indexes and selects hash-identified,
|
|
145
|
+
interpreter-compatible universal wheels. `ev install` plans static base
|
|
146
|
+
dependencies for the current interpreter and switches a project-local
|
|
147
|
+
environment into place after the checked artifacts install successfully.
|
|
148
|
+
Evok builds with the published `evok-build` backend, which keeps its independent
|
|
149
|
+
bootstrap. The next package-management milestone covers lockfile-based sync
|
|
150
|
+
and `ev run` dependency provisioning.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: evok
|
|
3
|
-
Version: 0.
|
|
4
|
-
Summary:
|
|
5
|
-
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Programmable Python package management and builds
|
|
5
|
+
Requires-Python: >=3.12
|
|
6
6
|
Author-email: ellainng <299958882+ellainng@users.noreply.github.com>
|
|
7
7
|
License-Expression: MIT
|
|
8
8
|
License-File: LICENSE
|
|
9
|
-
Requires-
|
|
9
|
+
Requires-Dist: evok-build>=0.1.0,<0.2.0
|
|
10
10
|
Description-Content-Type: text/markdown
|
|
11
11
|
|
|
12
12
|
# Evok (`ev`)
|
|
@@ -15,20 +15,21 @@ Description-Content-Type: text/markdown
|
|
|
15
15
|
[](https://python.org)
|
|
16
16
|
[](LICENSE)
|
|
17
17
|
|
|
18
|
-
> **
|
|
18
|
+
> **Programmable Python package management and builds.**
|
|
19
19
|
|
|
20
|
-
Evok
|
|
20
|
+
Evok resolves dependencies from PyPI, installs verified wheels in an isolated
|
|
21
|
+
project environment, and previews and builds Python distributions through an
|
|
22
|
+
importable API. The initial installer supports [universal Python wheels](docs/cli.md#ev-resolve-requirements).
|
|
21
23
|
|
|
22
24
|
---
|
|
23
25
|
|
|
24
26
|
## Key Highlights
|
|
25
27
|
|
|
26
|
-
- **
|
|
27
|
-
- **
|
|
28
|
-
- **
|
|
29
|
-
- **
|
|
30
|
-
- **
|
|
31
|
-
- **Pure-Python Wheel & Sdist Builder**: Standards-compliant PEP 427 wheel generator, PEP 625 sdist packager, and single-file `.pyz` executable bundler.
|
|
28
|
+
- **Package Index Resolution**: Selects compatible wheels from the JSON Simple API, including transitive dependencies.
|
|
29
|
+
- **Project Installation**: Inspect exact wheel hashes with `ev install --dry-run`, then install into `.evok/venv`.
|
|
30
|
+
- **In-Process Import Hooks**: Load modules from selected directories with scoped `sys.meta_path` hooks.
|
|
31
|
+
- **AST Dependency Scanner**: Compare static imports with declared dependencies.
|
|
32
|
+
- **Programmable Builds**: Inspect a typed project, preview its distribution files with `ev build --dry-run`, or build pure-Python wheels and sdists with [Evok Build](packages/evok-build/README.md).
|
|
32
33
|
|
|
33
34
|
---
|
|
34
35
|
|
|
@@ -52,10 +53,10 @@ brew install evok
|
|
|
52
53
|
|
|
53
54
|
#### Option 2: PyPI (`uv` / `pip`)
|
|
54
55
|
|
|
55
|
-
Evok runs on Python 3.12+
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
Evok runs on Python 3.12+ on Linux and macOS. Building Evok uses the published
|
|
57
|
+
`evok-build==0.1.0`. Project installation uses the interpreter's bundled pip to
|
|
58
|
+
install the wheels Evok selects. See [release qualification](docs/releasing.md)
|
|
59
|
+
for the artifact checks.
|
|
59
60
|
|
|
60
61
|
```bash
|
|
61
62
|
# Using uv (recommended)
|
|
@@ -76,6 +77,10 @@ ev --version
|
|
|
76
77
|
# Initialize a new project
|
|
77
78
|
ev init my-app
|
|
78
79
|
|
|
80
|
+
# Resolve packages or install dependencies declared by a project
|
|
81
|
+
ev resolve 'rich>=13'
|
|
82
|
+
ev install my-app
|
|
83
|
+
|
|
79
84
|
# Inspect AST imports and compare with pyproject.toml
|
|
80
85
|
ev scan
|
|
81
86
|
|
|
@@ -4,20 +4,21 @@
|
|
|
4
4
|
[](https://python.org)
|
|
5
5
|
[](LICENSE)
|
|
6
6
|
|
|
7
|
-
> **
|
|
7
|
+
> **Programmable Python package management and builds.**
|
|
8
8
|
|
|
9
|
-
Evok
|
|
9
|
+
Evok resolves dependencies from PyPI, installs verified wheels in an isolated
|
|
10
|
+
project environment, and previews and builds Python distributions through an
|
|
11
|
+
importable API. The initial installer supports [universal Python wheels](docs/cli.md#ev-resolve-requirements).
|
|
10
12
|
|
|
11
13
|
---
|
|
12
14
|
|
|
13
15
|
## Key Highlights
|
|
14
16
|
|
|
15
|
-
- **
|
|
16
|
-
- **
|
|
17
|
-
- **
|
|
18
|
-
- **
|
|
19
|
-
- **
|
|
20
|
-
- **Pure-Python Wheel & Sdist Builder**: Standards-compliant PEP 427 wheel generator, PEP 625 sdist packager, and single-file `.pyz` executable bundler.
|
|
17
|
+
- **Package Index Resolution**: Selects compatible wheels from the JSON Simple API, including transitive dependencies.
|
|
18
|
+
- **Project Installation**: Inspect exact wheel hashes with `ev install --dry-run`, then install into `.evok/venv`.
|
|
19
|
+
- **In-Process Import Hooks**: Load modules from selected directories with scoped `sys.meta_path` hooks.
|
|
20
|
+
- **AST Dependency Scanner**: Compare static imports with declared dependencies.
|
|
21
|
+
- **Programmable Builds**: Inspect a typed project, preview its distribution files with `ev build --dry-run`, or build pure-Python wheels and sdists with [Evok Build](packages/evok-build/README.md).
|
|
21
22
|
|
|
22
23
|
---
|
|
23
24
|
|
|
@@ -41,10 +42,10 @@ brew install evok
|
|
|
41
42
|
|
|
42
43
|
#### Option 2: PyPI (`uv` / `pip`)
|
|
43
44
|
|
|
44
|
-
Evok runs on Python 3.12+
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
Evok runs on Python 3.12+ on Linux and macOS. Building Evok uses the published
|
|
46
|
+
`evok-build==0.1.0`. Project installation uses the interpreter's bundled pip to
|
|
47
|
+
install the wheels Evok selects. See [release qualification](docs/releasing.md)
|
|
48
|
+
for the artifact checks.
|
|
48
49
|
|
|
49
50
|
```bash
|
|
50
51
|
# Using uv (recommended)
|
|
@@ -65,6 +66,10 @@ ev --version
|
|
|
65
66
|
# Initialize a new project
|
|
66
67
|
ev init my-app
|
|
67
68
|
|
|
69
|
+
# Resolve packages or install dependencies declared by a project
|
|
70
|
+
ev resolve 'rich>=13'
|
|
71
|
+
ev install my-app
|
|
72
|
+
|
|
68
73
|
# Inspect AST imports and compare with pyproject.toml
|
|
69
74
|
ev scan
|
|
70
75
|
|
|
@@ -24,6 +24,10 @@ print(graph.get("httpx").version) # 0.27.0
|
|
|
24
24
|
print(graph.to_lock_dict())
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
+
For real index resolution, pass `evok.index.PyPIProvider()` to `Resolver`.
|
|
28
|
+
The selected candidates expose the wheel filename, URL, and SHA256 through
|
|
29
|
+
their `wheel` attribute. See [supported wheel requirements](cli.md#ev-resolve-requirements).
|
|
30
|
+
|
|
27
31
|
---
|
|
28
32
|
|
|
29
33
|
## 2. `Environment.ephemeral()` (Zero-Venv Virtualization)
|
|
@@ -93,3 +97,42 @@ print("Inferred Packages:", result.inferred_packages)
|
|
|
93
97
|
print("Missing Dependencies:", result.missing_dependencies)
|
|
94
98
|
print("Unused Dependencies:", result.unused_dependencies)
|
|
95
99
|
```
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## 6. Project inspection and build planning
|
|
104
|
+
|
|
105
|
+
```python
|
|
106
|
+
from evok import Project
|
|
107
|
+
from evok_build import Builder
|
|
108
|
+
|
|
109
|
+
project = Project.load(".")
|
|
110
|
+
print(project.name, project.metadata.dependencies)
|
|
111
|
+
builder = Builder(project)
|
|
112
|
+
plan = builder.plan("wheel")
|
|
113
|
+
for entry in plan.files:
|
|
114
|
+
print(entry.archive_path, entry.reason)
|
|
115
|
+
artifact = builder.execute(plan)
|
|
116
|
+
print(artifact.path, artifact.sha256)
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
`Project.load()` reads the declared metadata and build-system settings for any
|
|
120
|
+
project with a `pyproject.toml`. A dynamic version is visible in
|
|
121
|
+
`project.metadata.dynamic` until the project's backend supplies its value.
|
|
122
|
+
Evok Build currently produces pure-Python wheel and sdist artifacts from
|
|
123
|
+
static metadata.
|
|
124
|
+
|
|
125
|
+
## 7. Project dependency installation
|
|
126
|
+
|
|
127
|
+
```python
|
|
128
|
+
from evok.install import execute_install, plan_install
|
|
129
|
+
|
|
130
|
+
plan = plan_install(".")
|
|
131
|
+
for wheel in plan.wheels:
|
|
132
|
+
print(wheel.filename, wheel.sha256)
|
|
133
|
+
print(execute_install(plan))
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
The plan specifies the wheels chosen for the current interpreter.
|
|
137
|
+
`execute_install()` verifies the artifact bytes and switches `.evok/venv` to
|
|
138
|
+
the completed environment once installation succeeds.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Evok Architecture & Systems Design
|
|
2
|
+
|
|
3
|
+
Evok (`ev`) is a pure-Python package manager, dependency resolver, builder, and runtime virtualization system. Its first-party build backend and project model also ship as the standalone, standard-library-only `evok-build` distribution.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. Index resolution and project installation
|
|
8
|
+
|
|
9
|
+
`PyPIProvider` lists files through the JSON Simple API and gives the resolver
|
|
10
|
+
universal wheels compatible with the active Python version. When the resolver
|
|
11
|
+
considers a candidate, it reads and verifies the advertised core metadata
|
|
12
|
+
sidecar. If the index supplies no sidecar SHA256, Evok verifies the entire
|
|
13
|
+
wheel and reads its metadata. Requirement markers use the current interpreter.
|
|
14
|
+
|
|
15
|
+
`ev install` resolves the project's declared base dependencies and records
|
|
16
|
+
the selected wheel URLs and hashes in an `InstallPlan`. Execution verifies
|
|
17
|
+
the downloaded wheels and their metadata against the plan, then passes the
|
|
18
|
+
local files to the interpreter's bundled pip with dependency resolution and
|
|
19
|
+
index access disabled. A symlink at `.evok/venv` points to the active completed
|
|
20
|
+
environment. An installation failure leaves a previous environment usable.
|
|
21
|
+
|
|
22
|
+
The lower-level metadata API also exposes ZIP range reads. The unpacked wheel
|
|
23
|
+
cache supports macOS `clonefile`, Linux `FICLONE`, hardlinks, and copies for
|
|
24
|
+
callers that materialize their own package trees. Version comparisons use a
|
|
25
|
+
packed integer for simple versions and an ordered tuple for extended versions.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## 2. Scoped in-process imports
|
|
30
|
+
|
|
31
|
+
`Environment.ephemeral()` registers `EvokMetaPathFinder` in the current
|
|
32
|
+
interpreter. It searches directories supplied by the caller or already present
|
|
33
|
+
in the unpacked cache. The finder and modules loaded by it during the scope
|
|
34
|
+
are removed on exit. `sys.meta_path` and `sys.modules` are shared by code in the
|
|
35
|
+
same interpreter.
|
|
36
|
+
|
|
37
|
+
`ev run` uses this import mechanism. Use `.evok/venv/bin/python` to run with
|
|
38
|
+
dependencies provisioned by `ev install`.
|
|
39
|
+
|
|
40
|
+
```python
|
|
41
|
+
from evok import Environment
|
|
42
|
+
|
|
43
|
+
with Environment.ephemeral(search_paths=["/path/to/packages"]) as env:
|
|
44
|
+
env.import_module("my_package")
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## 3. AST-Driven Automatic Dependency Inference
|
|
50
|
+
|
|
51
|
+
Evok's `evok.ast_scanner` walks Python abstract syntax trees using the stdlib `ast` module:
|
|
52
|
+
- Extracts all `import` and `from ... import` statements.
|
|
53
|
+
- Filters out standard library modules via `sys.stdlib_module_names`.
|
|
54
|
+
- Maps top-level import names to PyPI distribution names (e.g. `yaml` -> `pyyaml`, `cv2` -> `opencv-python`).
|
|
55
|
+
- Reports undeclared static imports and declarations with no observed static import. Plugins, subprocesses, and dynamic imports can depend on declarations the scanner does not observe.
|
evok-0.2.0/docs/cli.md
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# Evok CLI Reference (`ev` / `evok`)
|
|
2
|
+
|
|
3
|
+
Evok provides a unified command-line tool accessible via `ev` or `evok`.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Commands
|
|
8
|
+
|
|
9
|
+
### `ev init [directory]`
|
|
10
|
+
Initialize a clean Python project scaffold with `pyproject.toml`, `README.md`, `src/`, and `tests/`.
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
# Initialize in current directory
|
|
14
|
+
ev init
|
|
15
|
+
|
|
16
|
+
# Initialize in a specific directory with custom name
|
|
17
|
+
ev init my-project --name my-project
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
New projects use Evok Build. If a project created by an earlier Evok version
|
|
21
|
+
declares `evok.builder`, use this build-system table for standard frontends.
|
|
22
|
+
|
|
23
|
+
```toml
|
|
24
|
+
[build-system]
|
|
25
|
+
requires = ["evok-build>=0.1.0,<0.2.0"]
|
|
26
|
+
build-backend = "evok_build.backend"
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### `ev build [directory]`
|
|
30
|
+
|
|
31
|
+
Build standard PEP 427 pure-Python wheels (`.whl`), PEP 625 source distributions (`.tar.gz`), and standalone `.pyz` executables.
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# Build wheel and sdist into dist/
|
|
35
|
+
ev build
|
|
36
|
+
|
|
37
|
+
# Preview distribution files and their inclusion reasons without writing artifacts
|
|
38
|
+
ev build --dry-run
|
|
39
|
+
|
|
40
|
+
# Also generate single-file standalone zipapp (.pyz)
|
|
41
|
+
ev build --zipapp
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
#### Compile a macOS app
|
|
45
|
+
|
|
46
|
+
On Apple Silicon, install the application dependencies and Nuitka in the build
|
|
47
|
+
environment. Configure the target in the application's `pyproject.toml`.
|
|
48
|
+
|
|
49
|
+
```toml
|
|
50
|
+
[tool.evok-build.macos-app]
|
|
51
|
+
entry-point = "clownfish:main"
|
|
52
|
+
bundle-name = "Clownfish"
|
|
53
|
+
bundle-id = "tech.wispsy.clownfish"
|
|
54
|
+
executable-name = "ClownfishLauncher"
|
|
55
|
+
icon = "assets/Clownfish.icns"
|
|
56
|
+
tkinter = true
|
|
57
|
+
reentry = true
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
```sh
|
|
61
|
+
ev build ../clownfish --target macos-app --dry-run
|
|
62
|
+
ev build ../clownfish --target macos-app
|
|
63
|
+
python scripts/qualify_clownfish.py ../clownfish/dist/Clownfish.app
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Nuitka compiles the application. Evok sets the bundle identity, ad-hoc signs the
|
|
67
|
+
bundle and checks the arm64 executable and signature before moving it to the
|
|
68
|
+
output directory. The Clownfish qualifier relocates the bundle and checks
|
|
69
|
+
Launch Services, Tcl/Tk resources, and an actual PTY command. A distribution
|
|
70
|
+
release still needs its own clean-host signing and notarization checks.
|
|
71
|
+
|
|
72
|
+
### `ev scan [directory]`
|
|
73
|
+
Audit your project's codebase using AST analysis to check for missing and dead dependencies.
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
ev scan
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Output:
|
|
80
|
+
```
|
|
81
|
+
AST Scan Results for: /path/to/project
|
|
82
|
+
Total Imported Modules: 14
|
|
83
|
+
Inferred PyPI Packages: ['pyyaml', 'requests']
|
|
84
|
+
Declared Dependencies: ['pyyaml', 'rich']
|
|
85
|
+
|
|
86
|
+
[!] Missing Dependencies (imported but not declared):
|
|
87
|
+
+ requests
|
|
88
|
+
|
|
89
|
+
[-] Unused / Dead Dependencies (declared but not imported):
|
|
90
|
+
- rich
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### `ev prune [directory]`
|
|
94
|
+
Automatically prune declared dependencies that are not imported anywhere in your source code.
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
ev prune
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### `ev resolve <requirements...>`
|
|
101
|
+
Resolve requirements and their transitive dependencies against PyPI and print the selected versions.
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
ev resolve "requests>=2.28" "rich>=13.0"
|
|
105
|
+
ev resolve --index-url https://mirror.example.org/simple/ "rich>=13.0"
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Evok 0.2 supports universal Python 3 wheels (`none-any`) with a SHA256 advertised
|
|
109
|
+
by a JSON Simple index. It checks `Requires-Python` and evaluates base dependency
|
|
110
|
+
markers for the current interpreter. It skips yanked releases. Platform wheels,
|
|
111
|
+
source builds, requested extras, and direct references are outside this release's
|
|
112
|
+
resolution scope. The command exits with an error if it cannot select compatible
|
|
113
|
+
wheels. It leaves the project and interpreter environment untouched.
|
|
114
|
+
|
|
115
|
+
### `ev install [directory]`
|
|
116
|
+
|
|
117
|
+
Install the project's static `[project].dependencies` and their transitive
|
|
118
|
+
dependencies into `.evok/venv` on Linux or macOS. The same wheel restrictions
|
|
119
|
+
and `--index-url` option apply. `--dry-run` prints the wheel filenames and
|
|
120
|
+
SHA256 hashes without creating an environment.
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
ev install --dry-run
|
|
124
|
+
ev install
|
|
125
|
+
.evok/venv/bin/python -c 'import rich'
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Evok verifies each wheel, then uses the interpreter's bundled pip to install
|
|
129
|
+
the exact files offline. The selected environment becomes active only after
|
|
130
|
+
installation succeeds. Each successful install creates a fresh environment
|
|
131
|
+
under `.evok`, retaining previous environments for running processes and shells.
|
|
132
|
+
The command installs project dependencies from the index. Development groups,
|
|
133
|
+
building or installing the project itself, and lockfile-based sync require
|
|
134
|
+
their own workflows.
|
|
135
|
+
|
|
136
|
+
### `ev run <script.py>`
|
|
137
|
+
Execute a Python script inside an in-process ephemeral zero-venv environment.
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
ev run main.py
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### `ev info`
|
|
144
|
+
Display system details, Python runtime version, global cache path, and active reflink filesystem capability (`clonefile`, `ficlone`, or `hardlink`).
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
ev info
|
|
148
|
+
```
|
evok-0.2.0/docs/index.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Evok Documentation
|
|
2
|
+
|
|
3
|
+
Evok (`ev`) provides programmable Python dependency resolution, project
|
|
4
|
+
installation, and distribution builds.
|
|
5
|
+
|
|
6
|
+
## Core Features
|
|
7
|
+
|
|
8
|
+
- Resolve and install compatible universal wheels from PyPI or a JSON Simple index.
|
|
9
|
+
- Inspect project dependency and build plans before execution.
|
|
10
|
+
- Build wheels, source distributions, and zipapps. Apple Silicon application builds are opt-in.
|
|
11
|
+
- Inspect static imports and load packages from selected directories with scoped import hooks.
|
|
12
|
+
|
|
13
|
+
See the [CLI reference](cli.md), [Python API](api.md), and [architecture](architecture.md).
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Releasing Evok
|
|
2
|
+
|
|
3
|
+
Evok 0.2.0 introduces real index resolution and isolated installation for
|
|
4
|
+
supported universal Python wheels. Evok's wheel, source distribution, and
|
|
5
|
+
editable installation use the published `evok-build==0.1.0` backend. New
|
|
6
|
+
projects generated with `ev init` use Evok Build too.
|
|
7
|
+
|
|
8
|
+
```sh
|
|
9
|
+
uv build --no-sources --package evok --out-dir dist
|
|
10
|
+
uv run --no-project python scripts/check_release.py dist --tag v0.2.0
|
|
11
|
+
uv run --no-project python scripts/qualify.py dist
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
`--no-sources` selects published build requirements instead of workspace
|
|
15
|
+
overrides. Qualification installs each artifact outside the checkout, runs
|
|
16
|
+
the behavioral suite and both installed CLI entry points, and checks
|
|
17
|
+
dependency consistency. Platform and interpreter CI must pass before merging
|
|
18
|
+
the release preparation.
|
|
19
|
+
|
|
20
|
+
Publish through `release.yaml`, environment `pypi`. The workflow uploads the same
|
|
21
|
+
qualified files and retains SHA256/byte-size receipts. Verify actual PyPI bytes
|
|
22
|
+
and install the index version before recording publication as complete.
|
|
23
|
+
|
|
24
|
+
The tracked Homebrew formula preserves the previous archive identity. Update the
|
|
25
|
+
actual tap through a separate PR using the verified new PyPI sdist digest. Supply
|
|
26
|
+
that digest explicitly to the rendering helper, or build the exact archive;
|
|
27
|
+
a future version cannot reuse the historical 0.1.0 digest. Do not use the helper's
|
|
28
|
+
direct push path against protected main.
|
|
29
|
+
|
|
30
|
+
## Evok Build
|
|
31
|
+
|
|
32
|
+
Evok Build releases use tags such as `evok-build-v0.1.0` and the GitHub
|
|
33
|
+
Actions environment `pypi-build`. The same release workflow selects the
|
|
34
|
+
distribution from the tag, checks the exact artifact pair, and qualifies
|
|
35
|
+
both installed builds against a separate fixture before handing the files
|
|
36
|
+
to Trusted Publishing.
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
uv build --package evok-build --out-dir dist-backend
|
|
40
|
+
python scripts/check_release.py dist-backend --distribution evok-build --tag evok-build-v0.1.0
|
|
41
|
+
python scripts/qualify_build.py dist-backend
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
If a future Evok release requires a new `evok-build` release, qualify the local
|
|
45
|
+
artifact pair with `python scripts/qualify.py dist --backend-directory dist-backend`
|
|
46
|
+
and publish the backend before Evok. Include the verified backend sdist as a
|
|
47
|
+
formula resource when preparing Evok for Homebrew.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ella Inng
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Evok Build
|
|
2
|
+
|
|
3
|
+
Evok Build is a Python build backend with an importable build plan. It creates
|
|
4
|
+
pure-Python wheels and source distributions through standard PEP 517 frontends.
|
|
5
|
+
PEP 660 editable installs keep imports attached to the source tree.
|
|
6
|
+
|
|
7
|
+
```toml
|
|
8
|
+
[build-system]
|
|
9
|
+
requires = ["evok-build>=0.1.0,<0.2.0"]
|
|
10
|
+
build-backend = "evok_build.backend"
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
```python
|
|
14
|
+
from evok_build import Builder, Project
|
|
15
|
+
|
|
16
|
+
builder = Builder(Project.load("."))
|
|
17
|
+
plan = builder.plan("wheel")
|
|
18
|
+
for entry in plan.files:
|
|
19
|
+
print(entry.archive_path, entry.reason)
|
|
20
|
+
artifact = builder.execute(plan)
|
|
21
|
+
print(artifact.path, artifact.sha256)
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
The first backend supports static project metadata, package discovery, package
|
|
25
|
+
data, console and GUI scripts, and reproducible archive metadata. Use
|
|
26
|
+
`[tool.evok-build]` to configure module roots and names, namespace packages,
|
|
27
|
+
type stubs, source and wheel file selection, and wheel data directories.
|
|
28
|
+
Existing `[tool.uv.build-backend]` settings for these options also work.
|
|
29
|
+
|
|
30
|
+
The installed-artifact qualification builds the same fixture with Evok Build
|
|
31
|
+
and `uv_build`. It compares wheel payloads and selected metadata, checks the
|
|
32
|
+
source-distribution manifest, and runs the installed console entry point after
|
|
33
|
+
both regular and editable installs. Editable installs expose the configured
|
|
34
|
+
module root, so changes to package metadata still require reinstalling.
|
|
35
|
+
|
|
36
|
+
The opt-in `evok_build.macos` API plans and builds an arm64 macOS application
|
|
37
|
+
using Nuitka supplied by the application's build environment. See the
|
|
38
|
+
[Evok CLI guide](../../docs/cli.md#compile-a-macos-app) for target settings and
|
|
39
|
+
the Clownfish qualification command.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "evok-build"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "Programmable Python build backend for Evok"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
license = "MIT"
|
|
7
|
+
license-files = ["LICENSE"]
|
|
8
|
+
requires-python = ">=3.12"
|
|
9
|
+
dependencies = []
|
|
10
|
+
|
|
11
|
+
[build-system]
|
|
12
|
+
requires = ["uv_build>=0.13.6,<0.14.0"]
|
|
13
|
+
build-backend = "uv_build"
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"""PEP 517 hooks for the standalone backend."""
|
|
2
|
+
|
|
3
|
+
from evok_build.builder import Builder
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def build_wheel(wheel_directory, config_settings=None, metadata_directory=None):
|
|
7
|
+
builder = Builder(".")
|
|
8
|
+
return builder.execute(
|
|
9
|
+
builder.plan("wheel"), wheel_directory, metadata_directory=metadata_directory
|
|
10
|
+
).path.name
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def prepare_metadata_for_build_wheel(metadata_directory, config_settings=None):
|
|
14
|
+
builder = Builder(".")
|
|
15
|
+
return builder.prepare_metadata(builder.plan("wheel"), metadata_directory)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def build_editable(wheel_directory, config_settings=None, metadata_directory=None):
|
|
19
|
+
builder = Builder(".")
|
|
20
|
+
return builder.execute(
|
|
21
|
+
builder.plan("editable"), wheel_directory, metadata_directory=metadata_directory
|
|
22
|
+
).path.name
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def prepare_metadata_for_build_editable(metadata_directory, config_settings=None):
|
|
26
|
+
builder = Builder(".")
|
|
27
|
+
return builder.prepare_metadata(builder.plan("editable"), metadata_directory)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def build_sdist(sdist_directory, config_settings=None):
|
|
31
|
+
builder = Builder(".")
|
|
32
|
+
plan = builder.plan("sdist")
|
|
33
|
+
return builder.execute(plan, sdist_directory).path.name
|