omdev 0.0.0.dev48__py3-none-any.whl → 0.0.0.dev50__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.
Potentially problematic release.
This version of omdev might be problematic. Click here for more details.
- omdev/.manifests.json +1 -1
- omdev/cli/clicli.py +23 -1
- omdev/cli/install.py +0 -5
- omdev/cli/main.py +0 -2
- omdev/cli/managers.py +1 -1
- {omdev-0.0.0.dev48.dist-info → omdev-0.0.0.dev50.dist-info}/METADATA +2 -2
- {omdev-0.0.0.dev48.dist-info → omdev-0.0.0.dev50.dist-info}/RECORD +11 -11
- {omdev-0.0.0.dev48.dist-info → omdev-0.0.0.dev50.dist-info}/LICENSE +0 -0
- {omdev-0.0.0.dev48.dist-info → omdev-0.0.0.dev50.dist-info}/WHEEL +0 -0
- {omdev-0.0.0.dev48.dist-info → omdev-0.0.0.dev50.dist-info}/entry_points.txt +0 -0
- {omdev-0.0.0.dev48.dist-info → omdev-0.0.0.dev50.dist-info}/top_level.txt +0 -0
omdev/.manifests.json
CHANGED
omdev/cli/clicli.py
CHANGED
|
@@ -2,6 +2,8 @@ import inspect
|
|
|
2
2
|
import os
|
|
3
3
|
import subprocess
|
|
4
4
|
import sys
|
|
5
|
+
import urllib.parse
|
|
6
|
+
import urllib.request
|
|
5
7
|
|
|
6
8
|
from omlish import __about__
|
|
7
9
|
from omlish import argparse as ap
|
|
@@ -10,6 +12,9 @@ from . import install
|
|
|
10
12
|
from .types import CliModule
|
|
11
13
|
|
|
12
14
|
|
|
15
|
+
DEFAULT_REINSTALL_URL = 'https://raw.githubusercontent.com/wrmsr/omlish/master/omdev/cli/install.py'
|
|
16
|
+
|
|
17
|
+
|
|
13
18
|
class CliCli(ap.Cli):
|
|
14
19
|
|
|
15
20
|
@ap.command(name='version')
|
|
@@ -21,6 +26,8 @@ class CliCli(ap.Cli):
|
|
|
21
26
|
print(__about__.__revision__)
|
|
22
27
|
|
|
23
28
|
@ap.command(
|
|
29
|
+
ap.arg('--url', default=DEFAULT_REINSTALL_URL),
|
|
30
|
+
ap.arg('--local', action='store_true'),
|
|
24
31
|
ap.arg('extra_deps', nargs='*'),
|
|
25
32
|
)
|
|
26
33
|
def reinstall(self) -> None:
|
|
@@ -45,10 +52,25 @@ class CliCli(ap.Cli):
|
|
|
45
52
|
else:
|
|
46
53
|
print('No additional dependencies detected.')
|
|
47
54
|
print()
|
|
55
|
+
|
|
56
|
+
if self.args.local:
|
|
57
|
+
print('Reinstalling from local installer.')
|
|
58
|
+
else:
|
|
59
|
+
print(f'Reinstalling from script url: {self.args.url}')
|
|
60
|
+
print()
|
|
61
|
+
|
|
48
62
|
print('Continue with reinstall? (ctrl-c to cancel)')
|
|
49
63
|
input()
|
|
50
64
|
|
|
51
|
-
|
|
65
|
+
if self.args.local:
|
|
66
|
+
install_src = inspect.getsource(install)
|
|
67
|
+
else:
|
|
68
|
+
url = self.args.url
|
|
69
|
+
parsed = urllib.parse.urlparse(url)
|
|
70
|
+
if parsed.scheme not in ('https', 'file'):
|
|
71
|
+
raise RuntimeError(f'Insecure url schem: {url}')
|
|
72
|
+
with urllib.request.urlopen(urllib.request.Request(url)) as resp: # noqa
|
|
73
|
+
install_src = resp.read().decode('utf-8')
|
|
52
74
|
|
|
53
75
|
os.execl(
|
|
54
76
|
sys.executable,
|
omdev/cli/install.py
CHANGED
omdev/cli/main.py
CHANGED
|
@@ -3,8 +3,6 @@ TODO:
|
|
|
3
3
|
- cache ldr.discover() somehow if in uvx/pipx - very slow
|
|
4
4
|
- <venv-root>/.omdev-cli-manifest-cache.json - {pkg_name: manifests_json}
|
|
5
5
|
- allow manually specifying manifest packages
|
|
6
|
-
- https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#creating-executable-scripts
|
|
7
|
-
- https://packaging.python.org/en/latest/specifications/entry-points/#entry-points
|
|
8
6
|
"""
|
|
9
7
|
import argparse
|
|
10
8
|
import os
|
omdev/cli/managers.py
CHANGED
|
@@ -52,7 +52,7 @@ def detect_install_manager(cli_pkg: str) -> ManagerType | None:
|
|
|
52
52
|
# code runs before the problematic empty string is added, so a sys.meta_path hook is prepended.
|
|
53
53
|
#
|
|
54
54
|
# See:
|
|
55
|
-
#
|
|
55
|
+
# https://github.com/python/cpython/blob/da1e5526aee674bb33c17a498aa3781587b9850c/Python/sysmodule.c#L3939
|
|
56
56
|
|
|
57
57
|
|
|
58
58
|
def _remove_empty_from_sys_path() -> None:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: omdev
|
|
3
|
-
Version: 0.0.0.
|
|
3
|
+
Version: 0.0.0.dev50
|
|
4
4
|
Summary: omdev
|
|
5
5
|
Author: wrmsr
|
|
6
6
|
License: BSD-3-Clause
|
|
@@ -12,7 +12,7 @@ Classifier: Operating System :: OS Independent
|
|
|
12
12
|
Classifier: Operating System :: POSIX
|
|
13
13
|
Requires-Python: ~=3.12
|
|
14
14
|
License-File: LICENSE
|
|
15
|
-
Requires-Dist: omlish ==0.0.0.
|
|
15
|
+
Requires-Dist: omlish ==0.0.0.dev50
|
|
16
16
|
Provides-Extra: all
|
|
17
17
|
Requires-Dist: pycparser ~=2.22 ; extra == 'all'
|
|
18
18
|
Requires-Dist: cffi ~=1.17 ; extra == 'all'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
omdev/.manifests.json,sha256=
|
|
1
|
+
omdev/.manifests.json,sha256=USbXWQli6UL2kI-4rVbhvFpACSOdpz5WNyKlVl6aEHI,3918
|
|
2
2
|
omdev/__about__.py,sha256=LqSNNFFcT84xW3W8fIOJ78kPYJKFLIXZyDX-AJREvN0,1005
|
|
3
3
|
omdev/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
4
|
omdev/bracepy.py,sha256=HwBK5XmlOsF_juTel25fRLJK9vHSJCWXuCc-OZlevRQ,2619
|
|
@@ -55,10 +55,10 @@ omdev/cexts/_distutils/compilers/options.py,sha256=H7r5IcLvga5Fs3jjXWIT-6ap3JBdu
|
|
|
55
55
|
omdev/cexts/_distutils/compilers/unixccompiler.py,sha256=o1h8QuyupLntv4F21_XjzAZmCiwwxJuTmOirvBSL-Qw,15419
|
|
56
56
|
omdev/cli/__init__.py,sha256=V_l6VP1SZMlJbO-8CJwSuO9TThOy2S_oaPepNYgIrbE,37
|
|
57
57
|
omdev/cli/__main__.py,sha256=5IeIERm-371fSI5ZvPv8eldAJBwgKwpR0R49pTsILNM,76
|
|
58
|
-
omdev/cli/clicli.py,sha256=
|
|
59
|
-
omdev/cli/install.py,sha256=
|
|
60
|
-
omdev/cli/main.py,sha256=
|
|
61
|
-
omdev/cli/managers.py,sha256=
|
|
58
|
+
omdev/cli/clicli.py,sha256=rQ9-F9XI3BevnfIVALHVKrrHNQPdYhkQ-IKESTNB5RA,2447
|
|
59
|
+
omdev/cli/install.py,sha256=C-W171YlIHt4Cfok-nWSMbHwWhqF_PFqq2HixFttYx8,4460
|
|
60
|
+
omdev/cli/main.py,sha256=wVhrzwEfUFKjlfSeJK5CM23yId4v3-36IuY4VbrOSQA,1873
|
|
61
|
+
omdev/cli/managers.py,sha256=zqhMgNnv2VbXoTP6SgZeSuWfAVo1Ge-HJnQ1ftL-Mq8,2590
|
|
62
62
|
omdev/cli/types.py,sha256=7_Owg0P8C8oOObSuOp6aEYSjkEukVFxTT00SRy1bLHM,250
|
|
63
63
|
omdev/interp/__init__.py,sha256=Y3l4WY4JRi2uLG6kgbGp93fuGfkxkKwZDvhsa0Rwgtk,15
|
|
64
64
|
omdev/interp/__main__.py,sha256=GMCqeGYltgt5dlJzHxY9gqisa8cRkrPfmZYuZnjg4WI,162
|
|
@@ -113,9 +113,9 @@ omdev/tools/piptools.py,sha256=-jR5q3w4sHqntxCLExFCBNIARB788FUsAbJ62PK2sBU,2774
|
|
|
113
113
|
omdev/tools/proftools.py,sha256=xKSm_yPoCnfsvS3iT9MblDqFMuZmGfI3_koGj8amMyU,145
|
|
114
114
|
omdev/tools/rst.py,sha256=6dWk8QZHoGiLSuBw3TKsXZjjFK6wWBEtPi9krdCLKKg,977
|
|
115
115
|
omdev/tools/sqlrepl.py,sha256=tmFZh80-xsGM62dyQ7_UGLebChrj7IHbIPYBWDJMgVk,5741
|
|
116
|
-
omdev-0.0.0.
|
|
117
|
-
omdev-0.0.0.
|
|
118
|
-
omdev-0.0.0.
|
|
119
|
-
omdev-0.0.0.
|
|
120
|
-
omdev-0.0.0.
|
|
121
|
-
omdev-0.0.0.
|
|
116
|
+
omdev-0.0.0.dev50.dist-info/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
|
|
117
|
+
omdev-0.0.0.dev50.dist-info/METADATA,sha256=r8KcmIB1fJC0Zwwnyzc8aCC3ay7_8giMYiC4dW0ULQE,1252
|
|
118
|
+
omdev-0.0.0.dev50.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
119
|
+
omdev-0.0.0.dev50.dist-info/entry_points.txt,sha256=dHLXFmq5D9B8qUyhRtFqTGWGxlbx3t5ejedjrnXNYLU,33
|
|
120
|
+
omdev-0.0.0.dev50.dist-info/top_level.txt,sha256=1nr7j30fEWgLYHW3lGR9pkdHkb7knv1U1ES1XRNVQ6k,6
|
|
121
|
+
omdev-0.0.0.dev50.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|