shipit-cli 0.3.1__py3-none-any.whl → 0.3.3__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 CHANGED
@@ -584,6 +584,8 @@ class LocalBuilder:
584
584
  for step in serve.prepare:
585
585
  if isinstance(step, RunStep):
586
586
  commands.append(step.command)
587
+ elif isinstance(step, WorkdirStep):
588
+ commands.append(f"cd {step.path}")
587
589
  content = "#!/bin/bash\ncd {app_dir}\n{body}".format(
588
590
  app_dir=app_dir, body="\n".join(commands)
589
591
  )
@@ -741,9 +743,11 @@ class WasmerBuilder:
741
743
  for step in serve.prepare:
742
744
  if isinstance(step, RunStep):
743
745
  commands.append(step.command)
746
+ elif isinstance(step, WorkdirStep):
747
+ commands.append(f"cd {step.path}")
744
748
  body = "\n".join(filter(None, [env_lines, *commands]))
745
749
  (prepare_dir / "prepare.sh").write_text(
746
- f"#!/bin/bash\ncd /app\n{body}",
750
+ f"#!/bin/bash\n\n{body}",
747
751
  )
748
752
  (prepare_dir / "prepare.sh").chmod(0o755)
749
753
 
@@ -74,7 +74,7 @@ class PythonProvider:
74
74
  inputs = ", ".join([f"\"{input}\"" for input in input_files])
75
75
  steps += [
76
76
  "env(UV_PROJECT_ENVIRONMENT=local_venv[\"build\"] if cross_platform else venv[\"build\"])",
77
- "run(f\"uv sync --compile --python python{python_version} --locked --no-managed-python\", inputs=[{" + inputs + "}], group=\"install\")",
77
+ "run(f\"uv sync --compile --python python{python_version} --locked --no-managed-python\", inputs=[" + inputs + "], group=\"install\")",
78
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
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
80
  "run(\"rm cross-requirements.txt\") if cross_platform else None",
@@ -97,6 +97,7 @@ class PythonProvider:
97
97
 
98
98
  def prepare_steps(self, path: Path) -> Optional[list[str]]:
99
99
  return [
100
+ 'workdir(app["serve"])',
100
101
  'run("echo \\\"Precompiling Python code...\\\"") if precompile_python else None',
101
102
  'run("python -m compileall -o 2 $PYTHONPATH") if precompile_python else None',
102
103
  'run("echo \\\"Precompiling package code...\\\"") if precompile_python else None',
@@ -52,7 +52,7 @@ class StaticFileProvider:
52
52
 
53
53
  def commands(self, path: Path) -> Dict[str, str]:
54
54
  return {
55
- "start": '"static-web-server --root=/app --log-level=info"'
55
+ "start": '"static-web-server --root={} --log-level=info".format(app["serve"])'
56
56
  }
57
57
 
58
58
  def assets(self, path: Path) -> Optional[Dict[str, str]]:
shipit/version.py CHANGED
@@ -1,5 +1,5 @@
1
1
  __all__ = ["version", "version_info"]
2
2
 
3
3
 
4
- version = "0.3.1"
5
- version_info = (0, 3, 1, "final", 0)
4
+ version = "0.3.3"
5
+ version_info = (0, 3, 3, "final", 0)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: shipit-cli
3
- Version: 0.3.1
3
+ Version: 0.3.3
4
4
  Summary: Add your description here
5
5
  Project-URL: homepage, https://wasmer.io
6
6
  Project-URL: repository, https://github.com/wasmerio/shipit
@@ -1,7 +1,7 @@
1
1
  shipit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- shipit/cli.py,sha256=LYgKEGLuMa3fjdTXlVZRVb2mjrrxUruWb0KeGnPSK2c,48195
2
+ shipit/cli.py,sha256=extuf-zJzjddNXbQR5m-e_SfpdtJmL7WaFHSsBtZZqM,48402
3
3
  shipit/generator.py,sha256=iBkVcs44dd_xYKitM_zNVLnpiZ3KrV__xVswPMCZ97Y,5570
4
- shipit/version.py,sha256=0RslxsCJa1rsDkRMe_x2YPHK5qKpmfJGpFWxoBIRLNo,95
4
+ shipit/version.py,sha256=m-Vgs5jnC0nfsmDfrP6scrIRgwcnv_Lkot6BIgxrNmw,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
@@ -10,10 +10,10 @@ shipit/providers/laravel.py,sha256=4wSa0ByLrq87WhrAf04mOGVKz_xn8xtCaSYHpx0l7-0,2
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=CBoPbdAEwSgpLFYz4wyph6Q5PfOdFSoOKHbZZTSZIWc,6276
13
+ shipit/providers/python.py,sha256=p4hIE0vXmNiqR2gbneUhYjtQVJ2HqKuirwudSuEQm9A,6311
14
14
  shipit/providers/registry.py,sha256=V6CAOK5gEX0RhWhr-lcAkvlwRuMom7YY2ZeAyRy1Eck,672
15
- shipit/providers/staticfile.py,sha256=Bn6VonTWIj6akCJDdfQtj2JhXJzaU98RJi3Rk1VeHAA,1843
16
- shipit_cli-0.3.1.dist-info/METADATA,sha256=8rCEFRyOv2hgNBcbaAkz5ERDx26yj82bXPcuc0921TQ,462
17
- shipit_cli-0.3.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
18
- shipit_cli-0.3.1.dist-info/entry_points.txt,sha256=7AE1NjSrHaSDfbfsRRO50KKnHFTbB0Imsccd1WynzAQ,72
19
- shipit_cli-0.3.1.dist-info/RECORD,,
15
+ shipit/providers/staticfile.py,sha256=DDA4dMHQesYu0AfZEWBHqfk4Ib8GFrkpmvcsnwJkqH4,1862
16
+ shipit_cli-0.3.3.dist-info/METADATA,sha256=zILxyeA1OSaxuXMFfFoNieT_khB1YYi8xfd8MwmDB9c,462
17
+ shipit_cli-0.3.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
18
+ shipit_cli-0.3.3.dist-info/entry_points.txt,sha256=7AE1NjSrHaSDfbfsRRO50KKnHFTbB0Imsccd1WynzAQ,72
19
+ shipit_cli-0.3.3.dist-info/RECORD,,