shipit-cli 0.13.0__tar.gz → 0.13.2__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.
- {shipit_cli-0.13.0 → shipit_cli-0.13.2}/PKG-INFO +1 -1
- {shipit_cli-0.13.0 → shipit_cli-0.13.2}/pyproject.toml +1 -1
- {shipit_cli-0.13.0 → shipit_cli-0.13.2}/src/shipit/cli.py +4 -4
- {shipit_cli-0.13.0 → shipit_cli-0.13.2}/src/shipit/providers/python.py +12 -6
- shipit_cli-0.13.2/src/shipit/version.py +5 -0
- shipit_cli-0.13.0/src/shipit/version.py +0 -5
- {shipit_cli-0.13.0 → shipit_cli-0.13.2}/.gitignore +0 -0
- {shipit_cli-0.13.0 → shipit_cli-0.13.2}/README.md +0 -0
- {shipit_cli-0.13.0 → shipit_cli-0.13.2}/src/shipit/__init__.py +0 -0
- {shipit_cli-0.13.0 → shipit_cli-0.13.2}/src/shipit/assets/php/php.ini +0 -0
- {shipit_cli-0.13.0 → shipit_cli-0.13.2}/src/shipit/assets/wordpress/install.sh +0 -0
- {shipit_cli-0.13.0 → shipit_cli-0.13.2}/src/shipit/assets/wordpress/wp-config.php +0 -0
- {shipit_cli-0.13.0 → shipit_cli-0.13.2}/src/shipit/generator.py +0 -0
- {shipit_cli-0.13.0 → shipit_cli-0.13.2}/src/shipit/procfile.py +0 -0
- {shipit_cli-0.13.0 → shipit_cli-0.13.2}/src/shipit/providers/base.py +0 -0
- {shipit_cli-0.13.0 → shipit_cli-0.13.2}/src/shipit/providers/hugo.py +0 -0
- {shipit_cli-0.13.0 → shipit_cli-0.13.2}/src/shipit/providers/laravel.py +0 -0
- {shipit_cli-0.13.0 → shipit_cli-0.13.2}/src/shipit/providers/mkdocs.py +0 -0
- {shipit_cli-0.13.0 → shipit_cli-0.13.2}/src/shipit/providers/node_static.py +0 -0
- {shipit_cli-0.13.0 → shipit_cli-0.13.2}/src/shipit/providers/php.py +0 -0
- {shipit_cli-0.13.0 → shipit_cli-0.13.2}/src/shipit/providers/registry.py +0 -0
- {shipit_cli-0.13.0 → shipit_cli-0.13.2}/src/shipit/providers/staticfile.py +0 -0
- {shipit_cli-0.13.0 → shipit_cli-0.13.2}/src/shipit/providers/wordpress.py +0 -0
- {shipit_cli-0.13.0 → shipit_cli-0.13.2}/tests/test_e2e.py +0 -0
- {shipit_cli-0.13.0 → shipit_cli-0.13.2}/tests/test_generate_shipit_examples.py +0 -0
- {shipit_cli-0.13.0 → shipit_cli-0.13.2}/tests/test_version.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: shipit-cli
|
|
3
|
-
Version: 0.13.
|
|
3
|
+
Version: 0.13.2
|
|
4
4
|
Summary: Shipit CLI is the best way to build, serve and deploy your projects anywhere.
|
|
5
5
|
Project-URL: homepage, https://wasmer.io
|
|
6
6
|
Project-URL: repository, https://github.com/wasmerio/shipit
|
|
@@ -835,7 +835,7 @@ class WasmerBuilder:
|
|
|
835
835
|
src_dir: Path,
|
|
836
836
|
registry: Optional[str] = None,
|
|
837
837
|
token: Optional[str] = None,
|
|
838
|
-
bin: Optional[
|
|
838
|
+
bin: Optional[str] = None,
|
|
839
839
|
) -> None:
|
|
840
840
|
self.src_dir = src_dir
|
|
841
841
|
self.inner_builder = inner_builder
|
|
@@ -843,7 +843,7 @@ class WasmerBuilder:
|
|
|
843
843
|
self.wasmer_dir_path = self.src_dir / ".shipit" / "wasmer"
|
|
844
844
|
self.wasmer_registry = registry
|
|
845
845
|
self.wasmer_token = token
|
|
846
|
-
self.bin = bin
|
|
846
|
+
self.bin = bin or "wasmer"
|
|
847
847
|
self.default_env = {
|
|
848
848
|
"SHIPIT_PYTHON_EXTRA_INDEX_URL": "https://pythonindex.wasix.org/simple",
|
|
849
849
|
"SHIPIT_PYTHON_CROSS_PLATFORM": "wasix_wasm32",
|
|
@@ -1437,7 +1437,7 @@ def auto(
|
|
|
1437
1437
|
False,
|
|
1438
1438
|
help="Use Wasmer to build and serve the project.",
|
|
1439
1439
|
),
|
|
1440
|
-
wasmer_bin: Optional[
|
|
1440
|
+
wasmer_bin: Optional[str] = typer.Option(
|
|
1441
1441
|
None,
|
|
1442
1442
|
help="The path to the Wasmer binary.",
|
|
1443
1443
|
),
|
|
@@ -1682,7 +1682,7 @@ def serve(
|
|
|
1682
1682
|
False,
|
|
1683
1683
|
help="Use Wasmer to build and serve the project.",
|
|
1684
1684
|
),
|
|
1685
|
-
wasmer_bin: Optional[
|
|
1685
|
+
wasmer_bin: Optional[str] = typer.Option(
|
|
1686
1686
|
None,
|
|
1687
1687
|
help="The path to the Wasmer binary.",
|
|
1688
1688
|
),
|
|
@@ -218,6 +218,8 @@ class PythonProvider:
|
|
|
218
218
|
if custom_commands.start:
|
|
219
219
|
if custom_commands.start.startswith("python ") or custom_commands.start.startswith("uv ") or custom_commands.start.startswith("uvicorn ") or custom_commands.start.startswith("gunicorn "):
|
|
220
220
|
return DetectResult(cls.name(), 80)
|
|
221
|
+
if cls.detect_main_file(path):
|
|
222
|
+
return DetectResult(cls.name(), 10)
|
|
221
223
|
return None
|
|
222
224
|
|
|
223
225
|
def initialize(self) -> None:
|
|
@@ -367,25 +369,29 @@ class PythonProvider:
|
|
|
367
369
|
'run(f"python -m compileall -o 2 {app_serve_path}") if precompile_python else None',
|
|
368
370
|
]
|
|
369
371
|
|
|
370
|
-
@
|
|
371
|
-
def
|
|
372
|
+
@classmethod
|
|
373
|
+
def detect_main_file(cls, root_path: Path) -> Optional[str]:
|
|
372
374
|
paths_to_try = ["main.py", "app.py", "streamlit_app.py", "Home.py", "*_app.py"]
|
|
373
375
|
for path in paths_to_try:
|
|
374
376
|
if "*" in path:
|
|
375
377
|
continue # This is for the glob finder
|
|
376
|
-
if _exists(
|
|
378
|
+
if _exists(root_path, path):
|
|
377
379
|
return path
|
|
378
|
-
if _exists(
|
|
380
|
+
if _exists(root_path, f"src/{path}"):
|
|
379
381
|
return f"src/{path}"
|
|
380
382
|
for path in paths_to_try:
|
|
381
383
|
try:
|
|
382
|
-
found_path = next(
|
|
384
|
+
found_path = next(root_path.glob(f"**/{path}"))
|
|
383
385
|
except StopIteration:
|
|
384
386
|
found_path = None
|
|
385
387
|
if found_path:
|
|
386
|
-
return str(found_path.relative_to(
|
|
388
|
+
return str(found_path.relative_to(root_path))
|
|
387
389
|
return None
|
|
388
390
|
|
|
391
|
+
@cached_property
|
|
392
|
+
def main_file(self) -> Optional[str]:
|
|
393
|
+
return self.detect_main_file(self.path)
|
|
394
|
+
|
|
389
395
|
def commands(self) -> Dict[str, str]:
|
|
390
396
|
commands = self.base_commands()
|
|
391
397
|
if self.custom_commands.start:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|