shipit-cli 0.13.0__py3-none-any.whl → 0.13.1__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/providers/python.py +12 -6
- shipit/version.py +2 -2
- {shipit_cli-0.13.0.dist-info → shipit_cli-0.13.1.dist-info}/METADATA +1 -1
- {shipit_cli-0.13.0.dist-info → shipit_cli-0.13.1.dist-info}/RECORD +6 -6
- {shipit_cli-0.13.0.dist-info → shipit_cli-0.13.1.dist-info}/WHEEL +0 -0
- {shipit_cli-0.13.0.dist-info → shipit_cli-0.13.1.dist-info}/entry_points.txt +0 -0
shipit/providers/python.py
CHANGED
|
@@ -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:
|
shipit/version.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: shipit-cli
|
|
3
|
-
Version: 0.13.
|
|
3
|
+
Version: 0.13.1
|
|
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
|
|
@@ -2,7 +2,7 @@ shipit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
2
2
|
shipit/cli.py,sha256=WGXqd5WGBhCj-xQDUa0eOURhGKNq5uXYWoNl2GsHaUA,71082
|
|
3
3
|
shipit/generator.py,sha256=t9EwdpwhXFJ4OVynDdEtW68yj5KS61cK7uqrvawfCz4,7151
|
|
4
4
|
shipit/procfile.py,sha256=GlfdwzFUr0GWGKaaiXlLKNFInWaRNMy_wN14UEyU_5Q,2974
|
|
5
|
-
shipit/version.py,sha256=
|
|
5
|
+
shipit/version.py,sha256=PTx_VifHtVSh_PyM_e1BOxTnZEZKjdVtOhG4Ux1onDo,97
|
|
6
6
|
shipit/assets/php/php.ini,sha256=SaR3wvssSROtxTY_CQ5-BspM_47_I971V5X2dsqe8sU,2579
|
|
7
7
|
shipit/assets/wordpress/install.sh,sha256=5RWYleXFdrRCfmRSUkt4zJSgjLqeTi9sgNObKK4qD2c,2840
|
|
8
8
|
shipit/assets/wordpress/wp-config.php,sha256=q7KHB_TyLrodXzbg8EEPm42XWDIevtwL6wk3L0kbVrs,4809
|
|
@@ -12,11 +12,11 @@ shipit/providers/laravel.py,sha256=2q-6tHZzN5p1xLMVHAt944FtxW-K6Z9HJ0TvDodifnI,3
|
|
|
12
12
|
shipit/providers/mkdocs.py,sha256=jGI7eju9pFJg0TFzTsNWgUz66FuYzPn6yBwXIbZctfw,2196
|
|
13
13
|
shipit/providers/node_static.py,sha256=SL2qY5Ydqp1g6h2RPe06amQT86IjOU4m3JtvgLsiY9I,12477
|
|
14
14
|
shipit/providers/php.py,sha256=u8qI-uZWg9zfacDByLS_o4SkFLSD-hIXIpc29iPgB-0,4355
|
|
15
|
-
shipit/providers/python.py,sha256=
|
|
15
|
+
shipit/providers/python.py,sha256=ZMqpg54FTJxaQk0HMm0Nf1lWMzM7dWIxATlhV0Huuzw,21436
|
|
16
16
|
shipit/providers/registry.py,sha256=KBgMCwRZEFECdMpIoMn6ytL-FLc_NkTTdtHgVbHx5Jc,670
|
|
17
17
|
shipit/providers/staticfile.py,sha256=s4hXoelvI2cvSa2sp714QxbD_Q6yQlXdR8azvpbUNFA,2737
|
|
18
18
|
shipit/providers/wordpress.py,sha256=jLv5U4AcbfyeNq-ZSq6boJIBirwvJEwclG1a6JtB5q0,3230
|
|
19
|
-
shipit_cli-0.13.
|
|
20
|
-
shipit_cli-0.13.
|
|
21
|
-
shipit_cli-0.13.
|
|
22
|
-
shipit_cli-0.13.
|
|
19
|
+
shipit_cli-0.13.1.dist-info/METADATA,sha256=TZu2IG0h7Ol7QYwcvBr-ZR5cRz70UF8Dfv05rhLONM4,616
|
|
20
|
+
shipit_cli-0.13.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
21
|
+
shipit_cli-0.13.1.dist-info/entry_points.txt,sha256=7AE1NjSrHaSDfbfsRRO50KKnHFTbB0Imsccd1WynzAQ,72
|
|
22
|
+
shipit_cli-0.13.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|