@pylair/cli 0.0.0-stage → 0.1.0-rc.1
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.
- package/LICENSE-APACHE +202 -0
- package/LICENSE-MIT +21 -0
- package/README.md +23 -2
- package/dist/build.d.ts +22 -0
- package/dist/build.d.ts.map +1 -0
- package/dist/build.js +293 -0
- package/dist/build.js.map +1 -0
- package/dist/cli.d.ts +7 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +144 -0
- package/dist/cli.js.map +1 -0
- package/dist/codegen.d.ts +39 -0
- package/dist/codegen.d.ts.map +1 -0
- package/dist/codegen.js +159 -0
- package/dist/codegen.js.map +1 -0
- package/dist/config.d.ts +37 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +73 -0
- package/dist/config.js.map +1 -0
- package/dist/dev.d.ts +10 -0
- package/dist/dev.d.ts.map +1 -0
- package/dist/dev.js +109 -0
- package/dist/dev.js.map +1 -0
- package/dist/doctor.d.ts +3 -0
- package/dist/doctor.d.ts.map +1 -0
- package/dist/doctor.js +75 -0
- package/dist/doctor.js.map +1 -0
- package/dist/glob.d.ts +5 -0
- package/dist/glob.d.ts.map +1 -0
- package/dist/glob.js +36 -0
- package/dist/glob.js.map +1 -0
- package/dist/manifest.d.ts +14 -0
- package/dist/manifest.d.ts.map +1 -0
- package/dist/manifest.js +37 -0
- package/dist/manifest.js.map +1 -0
- package/dist/prune.d.ts +16 -0
- package/dist/prune.d.ts.map +1 -0
- package/dist/prune.js +69 -0
- package/dist/prune.js.map +1 -0
- package/package.json +27 -4
package/LICENSE-APACHE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/LICENSE-MIT
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 The Pylair Contributors
|
|
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.
|
package/README.md
CHANGED
|
@@ -1,3 +1,24 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @pylair/cli
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The `pylair` command-line tool: run a supervised Python backend behind
|
|
4
|
+
your Tauri frontend in dev, then bundle Python and your dependencies
|
|
5
|
+
into installable desktop apps — no Python required on target machines.
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
pylair dev # dev mode: hot reload + supervised Python runtime
|
|
9
|
+
pylair build # signed/unsigned installers for Windows, macOS, Linux
|
|
10
|
+
pylair codegen # TypeScript types from your @expose'd Python functions
|
|
11
|
+
pylair doctor # diagnose environment and packaging issues
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
The installed command is `pylair` even though the package is scoped.
|
|
15
|
+
|
|
16
|
+
**Release candidate:** install with an exact pin or the `next` tag —
|
|
17
|
+
`npm i -D @pylair/cli@next` / `npm i -D @pylair/cli@0.1.0-rc.1`.
|
|
18
|
+
Installers produced by `pylair build` are **unsigned** unless you
|
|
19
|
+
configure code signing — expect Gatekeeper/SmartScreen warnings.
|
|
20
|
+
|
|
21
|
+
Pylair builds on [Tauri](https://tauri.app) but is not affiliated with
|
|
22
|
+
or endorsed by the Tauri project.
|
|
23
|
+
|
|
24
|
+
Licensed under MIT OR Apache-2.0 — see LICENSE-MIT and LICENSE-APACHE.
|
package/dist/build.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** `pylair build` — the M0 recipe, generalized:
|
|
2
|
+
* fetch standalone CPython → stage site-packages via the bundled
|
|
3
|
+
* interpreter (native wheels only — no cross-compile) → stage app
|
|
4
|
+
* source → prune → tauri build → unsigned warning.
|
|
5
|
+
*/
|
|
6
|
+
export declare function hostTriple(): string;
|
|
7
|
+
/** Shipped bundles must carry the licenses of what they embed. Collects:
|
|
8
|
+
* pylair's own dual license, the interpreter's license tree (PSF license
|
|
9
|
+
* requires LICENSE text with redistributed CPython), and each wheel's
|
|
10
|
+
* dist-info license files. Runs before prune so nothing collected is
|
|
11
|
+
* deleted afterwards. Returns the notice dir.
|
|
12
|
+
*/
|
|
13
|
+
export declare function stageNotices(resources: string, pylairDir: string): string;
|
|
14
|
+
export interface BuildOptions {
|
|
15
|
+
appDir: string;
|
|
16
|
+
/** Extra tauri-cli args (e.g. --bundles). */
|
|
17
|
+
tauriArgs?: string[];
|
|
18
|
+
/** Skip the interpreter fetch (reuse staged resources/python). */
|
|
19
|
+
skipFetch?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare function build(opts: BuildOptions): Promise<void>;
|
|
22
|
+
//# sourceMappingURL=build.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAmDH,wBAAgB,UAAU,IAAI,MAAM,CAInC;AAkGD;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CA8FzE;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,kEAAkE;IAClE,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,wBAAsB,KAAK,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CA8E7D"}
|
package/dist/build.js
ADDED
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
/** `pylair build` — the M0 recipe, generalized:
|
|
2
|
+
* fetch standalone CPython → stage site-packages via the bundled
|
|
3
|
+
* interpreter (native wheels only — no cross-compile) → stage app
|
|
4
|
+
* source → prune → tauri build → unsigned warning.
|
|
5
|
+
*/
|
|
6
|
+
import { createHash } from "node:crypto";
|
|
7
|
+
import { execFileSync, spawnSync } from "node:child_process";
|
|
8
|
+
import { cpSync, createWriteStream, existsSync, mkdirSync, readdirSync, readFileSync, rmSync, writeFileSync, } from "node:fs";
|
|
9
|
+
import { get } from "node:https";
|
|
10
|
+
import { arch, platform, tmpdir } from "node:os";
|
|
11
|
+
import { join } from "node:path";
|
|
12
|
+
import { fileURLToPath } from "node:url";
|
|
13
|
+
import { importRoot, loadConfig, loadTauriConfig, tauriCliEntry } from "./config.js";
|
|
14
|
+
import { DEFAULT_PRUNE, prune } from "./prune.js";
|
|
15
|
+
const PBS_TAG = "20251120";
|
|
16
|
+
const PBS_VERSIONS = { "3.12": "3.12.12", "3.13": "3.13.9" };
|
|
17
|
+
const HOST_TRIPLES = {
|
|
18
|
+
"darwin:arm64": "aarch64-apple-darwin",
|
|
19
|
+
"darwin:x64": "x86_64-apple-darwin",
|
|
20
|
+
"win32:x64": "x86_64-pc-windows-msvc",
|
|
21
|
+
"linux:x64": "x86_64-unknown-linux-gnu",
|
|
22
|
+
"linux:arm64": "aarch64-unknown-linux-gnu",
|
|
23
|
+
};
|
|
24
|
+
const isWin = platform() === "win32";
|
|
25
|
+
/** Expected SHA256 per asset, committed in-repo — a hash fetched from the
|
|
26
|
+
* same release as the tarball catches corruption but not a tampered
|
|
27
|
+
* release. Bump together with PBS_TAG/PBS_VERSIONS; verify each value
|
|
28
|
+
* against upstream SHA256SUMS before committing.
|
|
29
|
+
*/
|
|
30
|
+
const PBS_SHA256 = {
|
|
31
|
+
"3.12.12-aarch64-apple-darwin": "9955ac87eff0d561e64920dc46fd8625912d2c2be4a53c66ad80125d6d9fbdb7",
|
|
32
|
+
"3.12.12-aarch64-unknown-linux-gnu": "4c4594cb38ddf6769f11f86818a4c6617652f4994e5a962eb4f8cf0ec977a1be",
|
|
33
|
+
"3.12.12-x86_64-apple-darwin": "1b4d8eec597ff69a3b67946f30622a6c25c6612e6d15aa431b864ebff66ac8a1",
|
|
34
|
+
"3.12.12-x86_64-pc-windows-msvc": "70ecfaf0bfc58298db11d6389be92c29ec4ef8cd93ebb6a7e54b41d9fc056b10",
|
|
35
|
+
"3.12.12-x86_64-unknown-linux-gnu": "8d2cd1393c1aec9d701cebeccb83d1519951f71d3ecb42d5e70c70af4db9be34",
|
|
36
|
+
"3.13.9-aarch64-apple-darwin": "29d38bd5fbe267b37cecac990015c662796edcf51c2f5e321d59ec06a1850816",
|
|
37
|
+
"3.13.9-aarch64-unknown-linux-gnu": "fdc5d80488b64fcef3b99f297618f68e5374c13d89e888a66abeff4967afd308",
|
|
38
|
+
"3.13.9-x86_64-apple-darwin": "9da51afb00480a8ccd4909bd302c80d9c104d633c5e865cf37dd5e587185e125",
|
|
39
|
+
"3.13.9-x86_64-pc-windows-msvc": "f4c22b31ddbf8d7824cbcba2d8707621c2c8fab1fb6d2c1810c2bb0304d8e9a8",
|
|
40
|
+
"3.13.9-x86_64-unknown-linux-gnu": "1bc9a94ab2425fb6ae58e45f69cab61647759b57895649701390822d976fa923",
|
|
41
|
+
};
|
|
42
|
+
export function hostTriple() {
|
|
43
|
+
const t = HOST_TRIPLES[`${platform()}:${arch()}`];
|
|
44
|
+
if (!t)
|
|
45
|
+
throw new Error(`no standalone CPython build for ${platform()}/${arch()}`);
|
|
46
|
+
return t;
|
|
47
|
+
}
|
|
48
|
+
function download(url, to) {
|
|
49
|
+
return new Promise((res, rej) => {
|
|
50
|
+
const follow = (u) => get(u, (r) => {
|
|
51
|
+
if (r.statusCode >= 300 && r.statusCode < 400 && r.headers.location)
|
|
52
|
+
return follow(r.headers.location);
|
|
53
|
+
if (r.statusCode !== 200)
|
|
54
|
+
return rej(new Error(`GET ${u} -> ${r.statusCode}`));
|
|
55
|
+
const out = createWriteStream(to);
|
|
56
|
+
r.pipe(out);
|
|
57
|
+
out.on("finish", () => out.close(() => res()));
|
|
58
|
+
out.on("error", rej);
|
|
59
|
+
}).on("error", rej);
|
|
60
|
+
follow(url);
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
async function fetchPython(resources, cacheDir, versionClass) {
|
|
64
|
+
const ver = PBS_VERSIONS[versionClass];
|
|
65
|
+
if (!ver)
|
|
66
|
+
throw new Error(`python-version "${versionClass}" not available — supported: ${Object.keys(PBS_VERSIONS).join(", ")}`);
|
|
67
|
+
const triple = hostTriple();
|
|
68
|
+
const asset = `cpython-${ver}+${PBS_TAG}-${triple}-install_only_stripped.tar.gz`;
|
|
69
|
+
const base = `https://github.com/astral-sh/python-build-standalone/releases/download/${PBS_TAG}`;
|
|
70
|
+
mkdirSync(resources, { recursive: true });
|
|
71
|
+
mkdirSync(cacheDir, { recursive: true });
|
|
72
|
+
const tarball = join(cacheDir, asset);
|
|
73
|
+
if (!existsSync(tarball)) {
|
|
74
|
+
console.log(`fetching ${asset}`);
|
|
75
|
+
await download(`${base}/${asset}`, tarball);
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
console.log(`using cached ${asset}`);
|
|
79
|
+
}
|
|
80
|
+
// The interpreter ships to end users — verify against hashes committed
|
|
81
|
+
// in-repo (see PBS_SHA256), not a checksum file from the same release.
|
|
82
|
+
const want = PBS_SHA256[`${ver}-${triple}`];
|
|
83
|
+
if (!want)
|
|
84
|
+
throw new Error(`no committed SHA256 for ${ver}/${triple}`);
|
|
85
|
+
const got = createHash("sha256").update(readFileSync(tarball)).digest("hex");
|
|
86
|
+
if (got !== want)
|
|
87
|
+
throw new Error(`SHA256 mismatch for ${asset}: got ${got}, want ${want} — refusing to bundle`);
|
|
88
|
+
const dest = join(resources, "python");
|
|
89
|
+
rmSync(dest, { recursive: true, force: true });
|
|
90
|
+
mkdirSync(dest, { recursive: true });
|
|
91
|
+
execFileSync("tar", ["-xzf", tarball, "-C", dest, "--strip-components=1"], { stdio: "inherit" });
|
|
92
|
+
const py = join(dest, isWin ? "python.exe" : "bin/python3");
|
|
93
|
+
if (!existsSync(py))
|
|
94
|
+
throw new Error(`expected interpreter at ${py}`);
|
|
95
|
+
return py;
|
|
96
|
+
}
|
|
97
|
+
function stageEnv(resources, python, appDir, reqs, cacheDir) {
|
|
98
|
+
const target = join(resources, "site-packages");
|
|
99
|
+
rmSync(target, { recursive: true, force: true });
|
|
100
|
+
// dev uses `uv sync` (uv.lock) — build must install the SAME locked set,
|
|
101
|
+
// hashed, or dev/prod parity is a fiction. requirements.txt is the
|
|
102
|
+
// fallback for projects that don't lock.
|
|
103
|
+
const lock = join(appDir, "uv.lock");
|
|
104
|
+
let reqsFile = reqs;
|
|
105
|
+
let exported;
|
|
106
|
+
if (existsSync(lock)) {
|
|
107
|
+
exported = join(cacheDir, "requirements.exported.txt");
|
|
108
|
+
execFileSync("uv", ["export", "--frozen", "--format", "requirements-txt", "-o", exported], { cwd: appDir, stdio: "inherit" });
|
|
109
|
+
reqsFile = exported;
|
|
110
|
+
}
|
|
111
|
+
else if (!existsSync(reqs)) {
|
|
112
|
+
console.log(`no uv.lock and no ${reqs} — bundling stdlib only`);
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
console.warn("warning: no uv.lock — building from requirements.txt; " +
|
|
117
|
+
"the bundled env may drift from `pylair dev`'s env");
|
|
118
|
+
}
|
|
119
|
+
execFileSync("uv", ["pip", "install", "--python", python, "--target", target, "-r", reqsFile], { cwd: appDir, stdio: "inherit" });
|
|
120
|
+
}
|
|
121
|
+
function run(cmd, args, cwd) {
|
|
122
|
+
const r = spawnSync(cmd, args, { cwd, stdio: "inherit" });
|
|
123
|
+
if (r.error)
|
|
124
|
+
throw new Error(`${cmd} ${args.join(" ")} failed to start: ${r.error.message}`);
|
|
125
|
+
if (r.status !== 0)
|
|
126
|
+
throw new Error(`${cmd} ${args.join(" ")} exited ${r.status}`);
|
|
127
|
+
}
|
|
128
|
+
/** Shipped bundles must carry the licenses of what they embed. Collects:
|
|
129
|
+
* pylair's own dual license, the interpreter's license tree (PSF license
|
|
130
|
+
* requires LICENSE text with redistributed CPython), and each wheel's
|
|
131
|
+
* dist-info license files. Runs before prune so nothing collected is
|
|
132
|
+
* deleted afterwards. Returns the notice dir.
|
|
133
|
+
*/
|
|
134
|
+
export function stageNotices(resources, pylairDir) {
|
|
135
|
+
const out = join(resources, "THIRD-PARTY-NOTICES");
|
|
136
|
+
rmSync(out, { recursive: true, force: true });
|
|
137
|
+
mkdirSync(out, { recursive: true });
|
|
138
|
+
const index = [];
|
|
139
|
+
const copyInto = (subdir, src, dest) => {
|
|
140
|
+
mkdirSync(join(out, subdir), { recursive: true });
|
|
141
|
+
cpSync(src, join(out, subdir, dest));
|
|
142
|
+
};
|
|
143
|
+
const LICENSEISH = /^(licen[cs]e|copying|notice|authors|copyright)/i;
|
|
144
|
+
for (const f of ["LICENSE-MIT", "LICENSE-APACHE"]) {
|
|
145
|
+
const src = join(pylairDir, f);
|
|
146
|
+
if (existsSync(src))
|
|
147
|
+
copyInto("pylair", src, f);
|
|
148
|
+
}
|
|
149
|
+
index.push("pylair/ — pylair itself (MIT OR Apache-2.0)");
|
|
150
|
+
// The interpreter: python-build-standalone ships a licenses/ dir holding
|
|
151
|
+
// CPython's license plus every statically-linked dep (OpenSSL, libffi…).
|
|
152
|
+
const pyRoot = join(resources, "python");
|
|
153
|
+
let found = 0;
|
|
154
|
+
const walkPy = (dir) => {
|
|
155
|
+
for (const e of readdirSync(dir, { withFileTypes: true })) {
|
|
156
|
+
const p = join(dir, e.name);
|
|
157
|
+
if (e.isDirectory()) {
|
|
158
|
+
if (e.name.toLowerCase() === "licenses") {
|
|
159
|
+
cpSync(p, join(out, "python", "licenses"), { recursive: true });
|
|
160
|
+
found++;
|
|
161
|
+
}
|
|
162
|
+
else
|
|
163
|
+
walkPy(p);
|
|
164
|
+
}
|
|
165
|
+
else if (LICENSEISH.test(e.name)) {
|
|
166
|
+
copyInto("python", p, e.name);
|
|
167
|
+
found++;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
if (existsSync(pyRoot))
|
|
172
|
+
walkPy(pyRoot);
|
|
173
|
+
if (!found) {
|
|
174
|
+
mkdirSync(join(out, "python"), { recursive: true });
|
|
175
|
+
writeFileSync(join(out, "python", "NOTICE.txt"), "This app bundles CPython (PSF-2.0 license) via python-build-standalone.\n" +
|
|
176
|
+
"License texts were not located in the interpreter tree at build time;\n" +
|
|
177
|
+
"they ship upstream in the python/licenses directory of each\n" +
|
|
178
|
+
"python-build-standalone release.\n");
|
|
179
|
+
console.warn("warning: no license files found under resources/python — wrote placeholder NOTICE");
|
|
180
|
+
}
|
|
181
|
+
index.push("python/ — bundled CPython interpreter (PSF-2.0) and its vendored deps");
|
|
182
|
+
// Wheels: every installed dist-info/egg-info carries license files or
|
|
183
|
+
// license metadata. Copy whichever exists.
|
|
184
|
+
const sp = join(resources, "site-packages");
|
|
185
|
+
let wheels = 0;
|
|
186
|
+
if (existsSync(sp)) {
|
|
187
|
+
for (const e of readdirSync(sp, { withFileTypes: true })) {
|
|
188
|
+
if (!e.isDirectory())
|
|
189
|
+
continue;
|
|
190
|
+
const m = /^(.*?)-[\d.]+.*\.(dist-info|egg-info)$/.exec(e.name);
|
|
191
|
+
if (!m)
|
|
192
|
+
continue;
|
|
193
|
+
const pkg = m[1].replace(/[^\w.-]/g, "_");
|
|
194
|
+
const d = join(sp, e.name);
|
|
195
|
+
let kept = false;
|
|
196
|
+
for (const f of readdirSync(d, { withFileTypes: true })) {
|
|
197
|
+
if (f.isDirectory() && f.name.toLowerCase() === "licenses") {
|
|
198
|
+
cpSync(join(d, f.name), join(out, pkg, "licenses"), { recursive: true });
|
|
199
|
+
kept = true;
|
|
200
|
+
}
|
|
201
|
+
else if (f.isFile() && LICENSEISH.test(f.name)) {
|
|
202
|
+
copyInto(pkg, join(d, f.name), f.name);
|
|
203
|
+
kept = true;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
const meta = join(d, "METADATA");
|
|
207
|
+
if (existsSync(meta)) {
|
|
208
|
+
const lines = readFileSync(meta, "utf-8")
|
|
209
|
+
.split("\n")
|
|
210
|
+
.filter((l) => /^(License|Classifier: License)/i.test(l));
|
|
211
|
+
// Copyleft is legal to ship but app authors deserve to know they
|
|
212
|
+
// bundled it — warn, never block.
|
|
213
|
+
if (/\b(a?lgpl|gpl)[ -]?v?\d/i.test(lines.join(" ")))
|
|
214
|
+
console.warn(`warning: bundled wheel ${e.name} declares a copyleft license`);
|
|
215
|
+
if (lines.length) {
|
|
216
|
+
mkdirSync(join(out, pkg), { recursive: true });
|
|
217
|
+
writeFileSync(join(out, pkg, "METADATA-LICENSE.txt"), lines.join("\n") + "\n");
|
|
218
|
+
kept = true;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
if (kept) {
|
|
222
|
+
wheels++;
|
|
223
|
+
index.push(`${pkg}/ — from ${e.name}`);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
writeFileSync(join(out, "INDEX.txt"), index.join("\n") + "\n");
|
|
228
|
+
console.log(`third-party notices: pylair, python interpreter, ${wheels} wheel(s)`);
|
|
229
|
+
return out;
|
|
230
|
+
}
|
|
231
|
+
export async function build(opts) {
|
|
232
|
+
const { appDir } = opts;
|
|
233
|
+
const tauriDir = join(appDir, "src-tauri");
|
|
234
|
+
const resources = join(tauriDir, "resources");
|
|
235
|
+
const tconf = loadTauriConfig(appDir);
|
|
236
|
+
const py = spawnSync("python3", ["--version"], { encoding: "utf-8" });
|
|
237
|
+
const python = py.status === 0 ? "python3" : "python";
|
|
238
|
+
const cfg = loadConfig(appDir, python);
|
|
239
|
+
const targetTriple = hostTriple(); // cross-compile refused by construction
|
|
240
|
+
console.log(`building ${tconf.productName} ${tconf.version} for ${platform()}/${arch()} (${targetTriple})`);
|
|
241
|
+
console.log("note: pylair builds native bundles only — run this on each target OS");
|
|
242
|
+
const cacheDir = join(appDir, ".pylair", "cache");
|
|
243
|
+
const bundled = opts.skipFetch
|
|
244
|
+
? join(resources, "python", isWin ? "python.exe" : "bin/python3")
|
|
245
|
+
: await fetchPython(resources, cacheDir, cfg.pythonVersion);
|
|
246
|
+
stageEnv(resources, bundled, appDir, join(appDir, cfg.requirements), cacheDir);
|
|
247
|
+
// Licenses ship with the bundle — collect before prune can remove sources.
|
|
248
|
+
stageNotices(resources, fileURLToPath(new URL("..", import.meta.url)));
|
|
249
|
+
// Stage app source so resources/ mirrors the installed layout.
|
|
250
|
+
const srcDir = join(appDir, cfg.source);
|
|
251
|
+
if (!existsSync(srcDir))
|
|
252
|
+
throw new Error(`source dir ${srcDir} missing`);
|
|
253
|
+
rmSync(join(resources, cfg.source), { recursive: true, force: true });
|
|
254
|
+
cpSync(srcDir, join(resources, cfg.source), { recursive: true });
|
|
255
|
+
const res = prune(resources, [...DEFAULT_PRUNE, ...cfg.prune]);
|
|
256
|
+
const mib = (res.bytesFreed / 2 ** 20).toFixed(1);
|
|
257
|
+
console.log(`pruned ${res.removed} paths (${mib} MiB) from staged resources`);
|
|
258
|
+
// Over-pruning must fail at build time, not on the user's machine:
|
|
259
|
+
// import the app module with the staged tree exactly as the bundle sees it.
|
|
260
|
+
const sep = isWin ? ";" : ":";
|
|
261
|
+
// The import root is the PARENT of the staged source dir ("backend.app"
|
|
262
|
+
// resolves from resources/, not resources/backend/). Run from an unrelated
|
|
263
|
+
// cwd so the project checkout can't satisfy the import by accident.
|
|
264
|
+
const check = spawnSync(bundled, ["-c", `import ${cfg.appModule}; print("staged import ok")`], {
|
|
265
|
+
encoding: "utf-8",
|
|
266
|
+
cwd: tmpdir(),
|
|
267
|
+
env: {
|
|
268
|
+
...process.env,
|
|
269
|
+
PYTHONPATH: `${importRoot(resources, cfg.source)}${sep}${join(resources, "site-packages")}`,
|
|
270
|
+
PYTHONNOUSERSITE: "1",
|
|
271
|
+
},
|
|
272
|
+
});
|
|
273
|
+
if (check.status !== 0)
|
|
274
|
+
throw new Error(`staged bundle failed the import check (${cfg.appModule}) — ` +
|
|
275
|
+
`pruning or missing deps? ${check.stderr?.trim()}`);
|
|
276
|
+
// ── tauri build ────────────────────────────────────────────────────
|
|
277
|
+
// NOTE: TAURI_SIGNING_PRIVATE_KEY signs *updater* artifacts, not the app —
|
|
278
|
+
// it must NOT silence the unsigned warning.
|
|
279
|
+
const hasSigning = !!(process.env.APPLE_SIGNING_IDENTITY ||
|
|
280
|
+
process.env.APPLE_CERTIFICATE ||
|
|
281
|
+
process.env.WINDOWS_CERTIFICATE_THUMBPRINT);
|
|
282
|
+
run(process.execPath, [tauriCliEntry(appDir), "build", ...(opts.tauriArgs ?? [])], appDir);
|
|
283
|
+
if (!hasSigning) {
|
|
284
|
+
console.warn(`
|
|
285
|
+
╔══════════════════════════════════════════════════════════════════╗
|
|
286
|
+
║ UNSIGNED BUILD — this bundle is not code-signed or notarized. ║
|
|
287
|
+
║ macOS Gatekeeper and Windows SmartScreen will warn users. ║
|
|
288
|
+
║ To sign: set APPLE_SIGNING_IDENTITY / TAURI_SIGNING_PRIVATE_KEY / ║
|
|
289
|
+
║ WINDOWS_CERTIFICATE_THUMBPRINT (see docs/build.md). ║
|
|
290
|
+
╚══════════════════════════════════════════════════════════════════╝`);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
//# sourceMappingURL=build.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build.js","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EACL,MAAM,EACN,iBAAiB,EACjB,UAAU,EACV,SAAS,EACT,WAAW,EACX,YAAY,EACZ,MAAM,EACN,aAAa,GACd,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAW,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACrF,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAElD,MAAM,OAAO,GAAG,UAAU,CAAC;AAC3B,MAAM,YAAY,GAA2B,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;AAC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