mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-02 04:39:01 +00:00
This commit enables using `pip` as a pre-compiled (pyc) built-in distributed along with cpython. Signed-off-by: Tiago Medicci <tiago.medicci@espressif.com>
25 lines
944 B
Diff
25 lines
944 B
Diff
--- a/Tools/wasm/wasm_assets.py
|
|
+++ b/Tools/wasm/wasm_assets.py
|
|
@@ -40,7 +40,6 @@ OMIT_FILES = (
|
|
# regression tests
|
|
"test/",
|
|
# package management
|
|
- "ensurepip/",
|
|
"venv/",
|
|
# other platforms
|
|
"_aix_support.py",
|
|
@@ -148,6 +147,13 @@ def create_stdlib_zip(
|
|
if entry.name.endswith(".py") or entry.is_dir():
|
|
# writepy() writes .pyc files (bytecode).
|
|
pzf.writepy(entry, filterfunc=filterfunc)
|
|
+
|
|
+ # Preserve ensurepip wheel payloads so `python -m ensurepip` can
|
|
+ # bootstrap pip on targets that consume this stdlib zip archive.
|
|
+ bundled_wheels = args.srcdir_lib / "ensurepip" / "_bundled"
|
|
+ if bundled_wheels.is_dir():
|
|
+ for wheel in sorted(bundled_wheels.glob("*.whl")):
|
|
+ pzf.write(wheel, arcname=f"ensurepip/_bundled/{wheel.name}")
|
|
|
|
|
|
def detect_extension_modules(args: argparse.Namespace) -> Dict[str, bool]:
|
|
|