omdev 0.0.0.dev39__py3-none-any.whl → 0.0.0.dev40__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 +0 -12
- omdev/cli/install.py +2 -2
- omdev/cli/main.py +53 -10
- omdev/cli/types.py +11 -1
- omdev/tools/proftools.py +4 -0
- {omdev-0.0.0.dev39.dist-info → omdev-0.0.0.dev40.dist-info}/METADATA +2 -2
- {omdev-0.0.0.dev39.dist-info → omdev-0.0.0.dev40.dist-info}/RECORD +11 -11
- omdev/cli/_version.py +0 -14
- {omdev-0.0.0.dev39.dist-info → omdev-0.0.0.dev40.dist-info}/LICENSE +0 -0
- {omdev-0.0.0.dev39.dist-info → omdev-0.0.0.dev40.dist-info}/WHEEL +0 -0
- {omdev-0.0.0.dev39.dist-info → omdev-0.0.0.dev40.dist-info}/entry_points.txt +0 -0
- {omdev-0.0.0.dev39.dist-info → omdev-0.0.0.dev40.dist-info}/top_level.txt +0 -0
omdev/.manifests.json
CHANGED
|
@@ -35,18 +35,6 @@
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
|
-
{
|
|
39
|
-
"module": ".cli._version",
|
|
40
|
-
"attr": "_CLI_MODULE",
|
|
41
|
-
"file": "omdev/cli/_version.py",
|
|
42
|
-
"line": 5,
|
|
43
|
-
"value": {
|
|
44
|
-
"$.cli.types.CliModule": {
|
|
45
|
-
"cmd_name": "version",
|
|
46
|
-
"mod_name": "omdev.cli._version"
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
38
|
{
|
|
51
39
|
"module": ".interp.__main__",
|
|
52
40
|
"attr": "_CLI_MODULE",
|
omdev/cli/install.py
CHANGED
|
@@ -46,7 +46,7 @@ class InstallMgr(abc.ABC):
|
|
|
46
46
|
raise NotImplementedError
|
|
47
47
|
|
|
48
48
|
|
|
49
|
-
class
|
|
49
|
+
class UvxInstallMgr(InstallMgr):
|
|
50
50
|
def is_available(self) -> bool:
|
|
51
51
|
return bool(shutil.which('uv'))
|
|
52
52
|
|
|
@@ -110,7 +110,7 @@ class PipxInstallMgr(InstallMgr):
|
|
|
110
110
|
|
|
111
111
|
|
|
112
112
|
INSTALL_MGRS = {
|
|
113
|
-
'
|
|
113
|
+
'uvx': UvxInstallMgr(),
|
|
114
114
|
'pipx': PipxInstallMgr(),
|
|
115
115
|
}
|
|
116
116
|
|
omdev/cli/main.py
CHANGED
|
@@ -9,14 +9,39 @@ import os
|
|
|
9
9
|
import runpy
|
|
10
10
|
import sys
|
|
11
11
|
|
|
12
|
+
from omlish import __about__
|
|
12
13
|
from omlish import check
|
|
13
14
|
|
|
14
15
|
from ..manifests.load import ManifestLoader
|
|
16
|
+
from .types import CliCmd
|
|
17
|
+
from .types import CliFunc
|
|
15
18
|
from .types import CliModule
|
|
16
19
|
|
|
17
20
|
|
|
21
|
+
##
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def _print_version() -> None:
|
|
25
|
+
print(__about__.__version__)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def _print_revision() -> None:
|
|
29
|
+
print(__about__.__revision__)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
_CLI_FUNCS = [
|
|
33
|
+
CliFunc('version', _print_version),
|
|
34
|
+
CliFunc('revision', _print_revision),
|
|
35
|
+
]
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
##
|
|
39
|
+
|
|
40
|
+
|
|
18
41
|
def _main() -> None:
|
|
19
|
-
|
|
42
|
+
ccs: list[CliCmd] = []
|
|
43
|
+
|
|
44
|
+
#
|
|
20
45
|
|
|
21
46
|
ldr = ManifestLoader.from_entry_point(globals())
|
|
22
47
|
|
|
@@ -28,13 +53,21 @@ def _main() -> None:
|
|
|
28
53
|
pkgs.append(n)
|
|
29
54
|
|
|
30
55
|
for m in ldr.load(*pkgs, only=[CliModule]):
|
|
31
|
-
|
|
56
|
+
ccs.append(check.isinstance(m.value, CliModule))
|
|
57
|
+
|
|
58
|
+
#
|
|
59
|
+
|
|
60
|
+
ccs.extend(_CLI_FUNCS)
|
|
61
|
+
|
|
62
|
+
#
|
|
63
|
+
|
|
64
|
+
dct: dict[str, CliCmd] = {}
|
|
65
|
+
for cc in ccs:
|
|
66
|
+
if cc.cmd_name in dct:
|
|
67
|
+
raise NameError(cc)
|
|
68
|
+
dct[cc.cmd_name] = cc
|
|
32
69
|
|
|
33
|
-
|
|
34
|
-
for cm in cms:
|
|
35
|
-
if cm.cmd_name in dct:
|
|
36
|
-
raise NameError(cm)
|
|
37
|
-
dct[cm.cmd_name] = cm
|
|
70
|
+
#
|
|
38
71
|
|
|
39
72
|
parser = argparse.ArgumentParser()
|
|
40
73
|
parser.add_argument('cmd', nargs='?', choices=dct.keys())
|
|
@@ -45,9 +78,19 @@ def _main() -> None:
|
|
|
45
78
|
parser.print_help()
|
|
46
79
|
return
|
|
47
80
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
81
|
+
#
|
|
82
|
+
|
|
83
|
+
cc = dct[args.cmd]
|
|
84
|
+
|
|
85
|
+
if isinstance(cc, CliModule):
|
|
86
|
+
sys.argv = [cc.cmd_name, *(args.args or ())]
|
|
87
|
+
runpy._run_module_as_main(cc.mod_name) # type: ignore # noqa
|
|
88
|
+
|
|
89
|
+
elif isinstance(cc, CliFunc):
|
|
90
|
+
cc.fn(*(args.args or ()))
|
|
91
|
+
|
|
92
|
+
else:
|
|
93
|
+
raise TypeError(cc)
|
|
51
94
|
|
|
52
95
|
|
|
53
96
|
if __name__ == '__main__':
|
omdev/cli/types.py
CHANGED
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
import dataclasses as dc
|
|
2
|
+
import typing as ta
|
|
2
3
|
|
|
3
4
|
|
|
4
5
|
@dc.dataclass(frozen=True)
|
|
5
|
-
class
|
|
6
|
+
class CliCmd:
|
|
6
7
|
cmd_name: str
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@dc.dataclass(frozen=True)
|
|
11
|
+
class CliModule(CliCmd):
|
|
7
12
|
mod_name: str
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@dc.dataclass(frozen=True)
|
|
16
|
+
class CliFunc(CliCmd):
|
|
17
|
+
fn: ta.Callable
|
omdev/tools/proftools.py
ADDED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: omdev
|
|
3
|
-
Version: 0.0.0.
|
|
3
|
+
Version: 0.0.0.dev40
|
|
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.dev40
|
|
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=tZR-7JWuphPfRzUGk5qhIhRP8qJpZOu3Z-D12VjgQFo,2595
|
|
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,9 @@ 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=d23loR_cKfTYZwYiqpt_CmKI7dd5WcYFgIYzqMep75E,68
|
|
58
|
-
omdev/cli/
|
|
59
|
-
omdev/cli/
|
|
60
|
-
omdev/cli/
|
|
61
|
-
omdev/cli/types.py,sha256=rYM5jogfZqC3tpWLOHSDL6iaV3XWGWM1hJYd11I-ImA,107
|
|
58
|
+
omdev/cli/install.py,sha256=-pFczwyJn48IeqCswbJzrV15ZslQUNIcREiiOGSjDk0,3933
|
|
59
|
+
omdev/cli/main.py,sha256=63IcpB8y2j3xp0I6kF6hdqqJ2bzrMsGElWNtcEsI8nU,1946
|
|
60
|
+
omdev/cli/types.py,sha256=7_Owg0P8C8oOObSuOp6aEYSjkEukVFxTT00SRy1bLHM,250
|
|
62
61
|
omdev/interp/__init__.py,sha256=Y3l4WY4JRi2uLG6kgbGp93fuGfkxkKwZDvhsa0Rwgtk,15
|
|
63
62
|
omdev/interp/__main__.py,sha256=GMCqeGYltgt5dlJzHxY9gqisa8cRkrPfmZYuZnjg4WI,162
|
|
64
63
|
omdev/interp/cli.py,sha256=sh7PZQoLletUViw1Y9OXNr9ekyNZ6YyxYuOQ_n9hyqU,2072
|
|
@@ -108,11 +107,12 @@ omdev/tools/gittools.py,sha256=s_-cxh-4Nv2a_bJtHZ6AiKF8kx2IjDrt_GOH8Wjz-3M,669
|
|
|
108
107
|
omdev/tools/importscan.py,sha256=XRLiasVSaTIp-jnO0-Nfhi0t6gnv_hVy5j2nVfEvuMI,3831
|
|
109
108
|
omdev/tools/importtrace.py,sha256=oDry9CwIv5h96wSaTVKJ0qQ5vMGxYE5oBtfF-GYNLJs,13430
|
|
110
109
|
omdev/tools/piptools.py,sha256=lhwzGXD-v0KFEQNyvzvdO2Kw1OA_2AfGPBs_rIkz8iE,2772
|
|
110
|
+
omdev/tools/proftools.py,sha256=xKSm_yPoCnfsvS3iT9MblDqFMuZmGfI3_koGj8amMyU,145
|
|
111
111
|
omdev/tools/rst.py,sha256=6dWk8QZHoGiLSuBw3TKsXZjjFK6wWBEtPi9krdCLKKg,977
|
|
112
112
|
omdev/tools/sqlrepl.py,sha256=tmFZh80-xsGM62dyQ7_UGLebChrj7IHbIPYBWDJMgVk,5741
|
|
113
|
-
omdev-0.0.0.
|
|
114
|
-
omdev-0.0.0.
|
|
115
|
-
omdev-0.0.0.
|
|
116
|
-
omdev-0.0.0.
|
|
117
|
-
omdev-0.0.0.
|
|
118
|
-
omdev-0.0.0.
|
|
113
|
+
omdev-0.0.0.dev40.dist-info/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
|
|
114
|
+
omdev-0.0.0.dev40.dist-info/METADATA,sha256=NwNqYM23XZBQMNs1KcxHQ5imSOLX7UhGWIyHrkcrmbo,1252
|
|
115
|
+
omdev-0.0.0.dev40.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
116
|
+
omdev-0.0.0.dev40.dist-info/entry_points.txt,sha256=dHLXFmq5D9B8qUyhRtFqTGWGxlbx3t5ejedjrnXNYLU,33
|
|
117
|
+
omdev-0.0.0.dev40.dist-info/top_level.txt,sha256=1nr7j30fEWgLYHW3lGR9pkdHkb7knv1U1ES1XRNVQ6k,6
|
|
118
|
+
omdev-0.0.0.dev40.dist-info/RECORD,,
|
omdev/cli/_version.py
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|