shipit-cli 0.2.3__py3-none-any.whl → 0.3.0__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.
- shipit/cli.py +26 -34
- shipit/providers/hugo.py +1 -1
- shipit/providers/python.py +28 -7
- shipit/version.py +2 -2
- {shipit_cli-0.2.3.dist-info → shipit_cli-0.3.0.dist-info}/METADATA +1 -1
- {shipit_cli-0.2.3.dist-info → shipit_cli-0.3.0.dist-info}/RECORD +8 -8
- {shipit_cli-0.2.3.dist-info → shipit_cli-0.3.0.dist-info}/WHEEL +0 -0
- {shipit_cli-0.2.3.dist-info → shipit_cli-0.3.0.dist-info}/entry_points.txt +0 -0
shipit/cli.py
CHANGED
|
@@ -873,22 +873,16 @@ class WasmerBuilder:
|
|
|
873
873
|
console.print(manifest_panel, markup=False, highlight=True)
|
|
874
874
|
(self.wasmer_dir_path / "wasmer.toml").write_text(manifest)
|
|
875
875
|
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
"
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
# {
|
|
887
|
-
# "name": "wp-content",
|
|
888
|
-
# "mount": "/app/wp-content"
|
|
889
|
-
# }
|
|
890
|
-
# ]
|
|
891
|
-
}
|
|
876
|
+
original_app_yaml_path = self.src_dir / "app.yaml"
|
|
877
|
+
if original_app_yaml_path.exists():
|
|
878
|
+
console.print(f"[bold]Using original app.yaml found in source directory[/bold]")
|
|
879
|
+
yaml_config = yaml.safe_load(original_app_yaml_path.read_text())
|
|
880
|
+
else:
|
|
881
|
+
yaml_config = {
|
|
882
|
+
"kind": "wasmer.io/App.v0",
|
|
883
|
+
}
|
|
884
|
+
# Update the app to use the new package
|
|
885
|
+
yaml_config["package"] = "."
|
|
892
886
|
|
|
893
887
|
app_yaml = yaml.dump(yaml_config)
|
|
894
888
|
(self.wasmer_dir_path / "app.yaml").write_text(app_yaml)
|
|
@@ -930,25 +924,27 @@ class WasmerBuilder:
|
|
|
930
924
|
def deploy(
|
|
931
925
|
self, app_owner: Optional[str] = None, app_name: Optional[str] = None
|
|
932
926
|
) -> str:
|
|
933
|
-
if not app_owner or not app_name:
|
|
934
|
-
raise Exception("app_owner and app_name must be set")
|
|
935
927
|
extra_args = []
|
|
936
928
|
if self.wasmer_registry:
|
|
937
929
|
extra_args += ["--registry", self.wasmer_registry]
|
|
938
930
|
if self.wasmer_token:
|
|
939
931
|
extra_args += ["--token", self.wasmer_token]
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
932
|
+
if app_owner:
|
|
933
|
+
extra_args += ["--owner", app_owner]
|
|
934
|
+
if app_name:
|
|
935
|
+
extra_args += ["--app-name", app_name]
|
|
936
|
+
# self.run_command(
|
|
937
|
+
# self.bin,
|
|
938
|
+
# [
|
|
939
|
+
# "package",
|
|
940
|
+
# "push",
|
|
941
|
+
# self.wasmer_dir_path,
|
|
942
|
+
# "--namespace",
|
|
943
|
+
# app_owner,
|
|
944
|
+
# "--non-interactive",
|
|
945
|
+
# *extra_args,
|
|
946
|
+
# ],
|
|
947
|
+
# )
|
|
952
948
|
return self.run_command(
|
|
953
949
|
self.bin,
|
|
954
950
|
[
|
|
@@ -956,10 +952,6 @@ class WasmerBuilder:
|
|
|
956
952
|
"--publish-package",
|
|
957
953
|
"--dir",
|
|
958
954
|
self.wasmer_dir_path,
|
|
959
|
-
"--app-name",
|
|
960
|
-
app_name,
|
|
961
|
-
"--owner",
|
|
962
|
-
app_owner,
|
|
963
955
|
"--non-interactive",
|
|
964
956
|
*extra_args,
|
|
965
957
|
],
|
shipit/providers/hugo.py
CHANGED
|
@@ -43,5 +43,5 @@ class HugoProvider(StaticFileProvider):
|
|
|
43
43
|
def build_steps(self, path: Path) -> list[str]:
|
|
44
44
|
return [
|
|
45
45
|
'copy(".", ".", ignore=[".git"])',
|
|
46
|
-
'run("hugo build
|
|
46
|
+
'run("hugo build --destination={}".format(app["build"]), group="build")',
|
|
47
47
|
]
|
shipit/providers/python.py
CHANGED
|
@@ -63,16 +63,37 @@ class PythonProvider:
|
|
|
63
63
|
)
|
|
64
64
|
|
|
65
65
|
def build_steps(self, path: Path) -> list[str]:
|
|
66
|
-
|
|
67
|
-
"workdir(app[\"build\"])"
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
66
|
+
steps = [
|
|
67
|
+
"workdir(app[\"build\"])"
|
|
68
|
+
]
|
|
69
|
+
|
|
70
|
+
if _exists(path, "pyproject.toml"):
|
|
71
|
+
input_files = ["pyproject.toml"]
|
|
72
|
+
if _exists(path, "uv.lock"):
|
|
73
|
+
input_files.append("uv.lock")
|
|
74
|
+
inputs = ", ".join([f"\"{input}\"" for input in input_files])
|
|
75
|
+
steps += [
|
|
76
|
+
"env(UV_PROJECT_ENVIRONMENT=local_venv[\"build\"] if cross_platform else venv[\"build\"])",
|
|
77
|
+
f"run(f\"uv sync --compile --python python{{python_version}} --locked --no-managed-python\", inputs=[{inputs}], group=\"install\")",
|
|
78
|
+
"run(f\"uv pip compile pyproject.toml --python-version={python_version} --universal --extra-index-url {python_extra_index_url} --index-url=https://pypi.org/simple --emit-index-url --only-binary :all: -o cross-requirements.txt\", inputs=[\"pyproject.toml\"], outputs=[\"cross-requirements.txt\"]) if cross_platform else None",
|
|
79
|
+
"run(f\"uvx pip install -r cross-requirements.txt --target {python_cross_packages_path} --platform {cross_platform} --only-binary=:all: --python-version={python_version} --compile\") if cross_platform else None",
|
|
80
|
+
"run(\"rm cross-requirements.txt\") if cross_platform else None",
|
|
81
|
+
]
|
|
82
|
+
if _exists(path, "requirements.txt"):
|
|
83
|
+
steps += [
|
|
84
|
+
"env(UV_PROJECT_ENVIRONMENT=local_venv[\"build\"] if cross_platform else venv[\"build\"])",
|
|
85
|
+
"run(\"uv init --no-managed-python --python python{{python_version}}\", inputs=[], outputs=[\"uv.lock\"], group=\"install\")",
|
|
86
|
+
"run(f\"uv add -r requirements.txt\", inputs=[\"requirements.txt\"], group=\"install\")",
|
|
87
|
+
"run(f\"uv pip compile pyproject.toml --python-version={python_version} --universal --extra-index-url {python_extra_index_url} --index-url=https://pypi.org/simple --emit-index-url --only-binary :all: -o cross-requirements.txt\", inputs=[\"pyproject.toml\"], outputs=[\"cross-requirements.txt\"]) if cross_platform else None",
|
|
88
|
+
"run(f\"uvx pip install -r cross-requirements.txt --target {python_cross_packages_path} --platform {cross_platform} --only-binary=:all: --python-version={python_version} --compile\") if cross_platform else None",
|
|
89
|
+
"run(\"rm cross-requirements.txt\") if cross_platform else None",
|
|
90
|
+
]
|
|
91
|
+
|
|
92
|
+
steps += [
|
|
73
93
|
"path((local_venv[\"build\"] if cross_platform else venv[\"build\"]) + \"/bin\")",
|
|
74
94
|
"copy(\".\", \".\", ignore=[\".venv\", \".git\", \"__pycache__\"])",
|
|
75
95
|
]
|
|
96
|
+
return steps
|
|
76
97
|
|
|
77
98
|
def prepare_steps(self, path: Path) -> Optional[list[str]]:
|
|
78
99
|
return [
|
shipit/version.py
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
shipit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
shipit/cli.py,sha256=
|
|
2
|
+
shipit/cli.py,sha256=LYgKEGLuMa3fjdTXlVZRVb2mjrrxUruWb0KeGnPSK2c,48195
|
|
3
3
|
shipit/generator.py,sha256=iBkVcs44dd_xYKitM_zNVLnpiZ3KrV__xVswPMCZ97Y,5570
|
|
4
|
-
shipit/version.py,sha256=
|
|
4
|
+
shipit/version.py,sha256=u34F4nSbND7SbkfxNWy4C1ryNf8iOdLnPWvIT6jenxQ,95
|
|
5
5
|
shipit/assets/php/php.ini,sha256=f4irndAjB4GuuouEImRkNV22Q-yw1KqR-43jAMDw730,2531
|
|
6
6
|
shipit/providers/base.py,sha256=bqh1k7TSPJo7hOnxgdI6PIJmrqzQkZhgUoV0bbYIWrw,2403
|
|
7
7
|
shipit/providers/gatsby.py,sha256=VUGhE7xtQJHsYzEzdkXi3n5mbpgg868wbUVOU4MWN5s,2173
|
|
8
|
-
shipit/providers/hugo.py,sha256=
|
|
8
|
+
shipit/providers/hugo.py,sha256=H2yyht9oOjdjFHZiNhzz-WT3Ac-_vop1EPiJ0fGH740,1483
|
|
9
9
|
shipit/providers/laravel.py,sha256=4wSa0ByLrq87WhrAf04mOGVKz_xn8xtCaSYHpx0l7-0,2812
|
|
10
10
|
shipit/providers/mkdocs.py,sha256=YIbSAaL2jDQtr8YteZmKjIbRMDWdoQgy6G2D6dfH1ws,2842
|
|
11
11
|
shipit/providers/node_static.py,sha256=Zpq4fRCMBzGkObdsfPVAoYUAnZSqE9C1D0aaJyI30Fc,2334
|
|
12
12
|
shipit/providers/php.py,sha256=HxxgfXmA0U6PeTLyFMbyXWm05G_IQqdFz4Liq1d_VBM,2635
|
|
13
|
-
shipit/providers/python.py,sha256=
|
|
13
|
+
shipit/providers/python.py,sha256=O186GDOC3nTX6z3MTx_gS2iBqZCEWm7-6Z3y7j9BvH8,6268
|
|
14
14
|
shipit/providers/registry.py,sha256=V6CAOK5gEX0RhWhr-lcAkvlwRuMom7YY2ZeAyRy1Eck,672
|
|
15
15
|
shipit/providers/staticfile.py,sha256=9Ksi9WO_52Dnj_hqNn_cYVjTniJ3tBjVr5kBvgCPF-0,1908
|
|
16
|
-
shipit_cli-0.
|
|
17
|
-
shipit_cli-0.
|
|
18
|
-
shipit_cli-0.
|
|
19
|
-
shipit_cli-0.
|
|
16
|
+
shipit_cli-0.3.0.dist-info/METADATA,sha256=xhzPFKpiWhtALiY8JQnUT6GclkaXJ580Zn7sH20v2u4,462
|
|
17
|
+
shipit_cli-0.3.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
18
|
+
shipit_cli-0.3.0.dist-info/entry_points.txt,sha256=7AE1NjSrHaSDfbfsRRO50KKnHFTbB0Imsccd1WynzAQ,72
|
|
19
|
+
shipit_cli-0.3.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|