omdev 0.0.0.dev41__tar.gz → 0.0.0.dev43__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.

Potentially problematic release.


This version of omdev might be problematic. Click here for more details.

Files changed (126) hide show
  1. {omdev-0.0.0.dev41/omdev.egg-info → omdev-0.0.0.dev43}/PKG-INFO +2 -2
  2. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/.manifests.json +12 -0
  3. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/cache/data/cache.py +74 -4
  4. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/cache/data/specs.py +5 -0
  5. omdev-0.0.0.dev43/omdev/cli/clicmds.py +83 -0
  6. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/cli/main.py +2 -13
  7. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43/omdev.egg-info}/PKG-INFO +2 -2
  8. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev.egg-info/SOURCES.txt +1 -0
  9. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev.egg-info/requires.txt +1 -1
  10. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/pyproject.toml +2 -2
  11. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/LICENSE +0 -0
  12. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/MANIFEST.in +0 -0
  13. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/README.rst +0 -0
  14. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/__about__.py +0 -0
  15. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/__init__.py +0 -0
  16. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/amalg/__init__.py +0 -0
  17. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/amalg/__main__.py +0 -0
  18. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/amalg/amalg.py +0 -0
  19. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/bracepy.py +0 -0
  20. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/cache/__init__.py +0 -0
  21. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/cache/compute/__init__.py +0 -0
  22. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/cache/compute/cache.py +0 -0
  23. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/cache/compute/contexts.py +0 -0
  24. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/cache/compute/currents.py +0 -0
  25. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/cache/compute/fns.py +0 -0
  26. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/cache/compute/resolvers.py +0 -0
  27. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/cache/compute/storage.py +0 -0
  28. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/cache/compute/types.py +0 -0
  29. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/cache/data/__init__.py +0 -0
  30. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/cache/data/actions.py +0 -0
  31. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/cache/data/consts.py +0 -0
  32. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/cache/data/defaults.py +0 -0
  33. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/cache/data/manifests.py +0 -0
  34. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/cexts/__init__.py +0 -0
  35. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/cexts/_boilerplate.cc +0 -0
  36. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/cexts/_distutils/LICENSE +0 -0
  37. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/cexts/_distutils/__init__.py +0 -0
  38. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/cexts/_distutils/build_ext.py +0 -0
  39. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/cexts/_distutils/compilers/__init__.py +0 -0
  40. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/cexts/_distutils/compilers/ccompiler.py +0 -0
  41. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/cexts/_distutils/compilers/options.py +0 -0
  42. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/cexts/_distutils/compilers/unixccompiler.py +0 -0
  43. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/cexts/_distutils/dir_util.py +0 -0
  44. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/cexts/_distutils/errors.py +0 -0
  45. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/cexts/_distutils/extension.py +0 -0
  46. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/cexts/_distutils/file_util.py +0 -0
  47. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/cexts/_distutils/modified.py +0 -0
  48. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/cexts/_distutils/spawn.py +0 -0
  49. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/cexts/_distutils/sysconfig.py +0 -0
  50. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/cexts/_distutils/util.py +0 -0
  51. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/cexts/_distutils/version.py +0 -0
  52. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/cexts/build.py +0 -0
  53. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/cexts/cmake.py +0 -0
  54. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/cexts/importhook.py +0 -0
  55. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/cexts/magic.py +0 -0
  56. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/cexts/scan.py +0 -0
  57. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/classdot.py +0 -0
  58. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/cli/__init__.py +0 -0
  59. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/cli/__main__.py +0 -0
  60. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/cli/install.py +0 -0
  61. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/cli/types.py +0 -0
  62. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/cmake.py +0 -0
  63. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/findimports.py +0 -0
  64. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/findmagic.py +0 -0
  65. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/git.py +0 -0
  66. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/interp/__init__.py +0 -0
  67. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/interp/__main__.py +0 -0
  68. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/interp/cli.py +0 -0
  69. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/interp/inspect.py +0 -0
  70. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/interp/providers.py +0 -0
  71. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/interp/pyenv.py +0 -0
  72. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/interp/resolvers.py +0 -0
  73. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/interp/standalone.py +0 -0
  74. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/interp/system.py +0 -0
  75. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/interp/types.py +0 -0
  76. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/manifests/__init__.py +0 -0
  77. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/manifests/build.py +0 -0
  78. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/manifests/load.py +0 -0
  79. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/manifests/types.py +0 -0
  80. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/mypy/__init__.py +0 -0
  81. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/mypy/debug.py +0 -0
  82. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/packaging/__init__.py +0 -0
  83. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/packaging/names.py +0 -0
  84. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/packaging/requires.py +0 -0
  85. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/packaging/specifiers.py +0 -0
  86. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/packaging/versions.py +0 -0
  87. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/precheck/__init__.py +0 -0
  88. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/precheck/__main__.py +0 -0
  89. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/precheck/base.py +0 -0
  90. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/precheck/git.py +0 -0
  91. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/precheck/lite.py +0 -0
  92. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/precheck/precheck.py +0 -0
  93. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/precheck/scripts.py +0 -0
  94. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/pyproject/__init__.py +0 -0
  95. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/pyproject/__main__.py +0 -0
  96. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/pyproject/cexts.py +0 -0
  97. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/pyproject/cli.py +0 -0
  98. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/pyproject/configs.py +0 -0
  99. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/pyproject/pkg.py +0 -0
  100. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/pyproject/reqs.py +0 -0
  101. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/revisions.py +0 -0
  102. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/scripts/__init__.py +0 -0
  103. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/scripts/bumpversion.py +0 -0
  104. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/scripts/execrss.py +0 -0
  105. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/scripts/exectime.py +0 -0
  106. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/scripts/importtrace.py +0 -0
  107. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/scripts/interp.py +0 -0
  108. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/scripts/pyproject.py +0 -0
  109. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/secrets.py +0 -0
  110. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/tokens.py +0 -0
  111. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/toml/__init__.py +0 -0
  112. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/toml/parser.py +0 -0
  113. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/toml/writer.py +0 -0
  114. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/tools/__init__.py +0 -0
  115. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/tools/dockertools.py +0 -0
  116. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/tools/gittools.py +0 -0
  117. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/tools/importscan.py +0 -0
  118. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/tools/piptools.py +0 -0
  119. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/tools/proftools.py +0 -0
  120. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/tools/rst.py +0 -0
  121. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/tools/sqlrepl.py +0 -0
  122. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev/wheelfile.py +0 -0
  123. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev.egg-info/dependency_links.txt +0 -0
  124. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev.egg-info/entry_points.txt +0 -0
  125. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/omdev.egg-info/top_level.txt +0 -0
  126. {omdev-0.0.0.dev41 → omdev-0.0.0.dev43}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: omdev
3
- Version: 0.0.0.dev41
3
+ Version: 0.0.0.dev43
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.dev41
15
+ Requires-Dist: omlish==0.0.0.dev43
16
16
  Provides-Extra: all
17
17
  Requires-Dist: pycparser~=2.22; extra == "all"
18
18
  Requires-Dist: cffi~=1.17; extra == "all"
@@ -35,6 +35,18 @@
35
35
  }
36
36
  }
37
37
  },
38
+ {
39
+ "module": ".cli.clicmds",
40
+ "attr": "_CLI_MODULE",
41
+ "file": "omdev/cli/clicmds.py",
42
+ "line": 57,
43
+ "value": {
44
+ "$.cli.types.CliModule": {
45
+ "cmd_name": "cli",
46
+ "mod_name": "omdev.cli.clicmds"
47
+ }
48
+ }
49
+ },
38
50
  {
39
51
  "module": ".interp.__main__",
40
52
  "attr": "_CLI_MODULE",
@@ -10,11 +10,14 @@ TODO:
10
10
  - chaining? or is this compcache..
11
11
  - download resume ala hf_hub
12
12
  """
13
+ import contextlib
13
14
  import logging
14
15
  import os.path
15
16
  import shutil
16
17
  import subprocess
17
18
  import tempfile
19
+ import typing as ta
20
+ import urllib.error
18
21
  import urllib.parse
19
22
  import urllib.request
20
23
 
@@ -40,6 +43,57 @@ log = logging.getLogger(__name__)
40
43
  ##
41
44
 
42
45
 
46
+ def _url_retrieve(
47
+ req: urllib.request.Request,
48
+ out_file: str | None = None,
49
+ ) -> tuple[str, ta.Any]:
50
+ p = urllib.parse.urlparse(req.full_url)
51
+
52
+ with contextlib.ExitStack() as es:
53
+ fp = es.enter_context(contextlib.closing(urllib.request.urlopen(req))) # noqa
54
+
55
+ headers = fp.info()
56
+
57
+ # Just return the local path and the "headers" for file:// URLs. No sense in performing a copy unless requested.
58
+ if p.scheme == 'file' and not out_file:
59
+ return os.path.normpath(p.path), headers
60
+
61
+ success = False
62
+
63
+ tfp: ta.Any
64
+ if out_file:
65
+ tfp = es.enter_context(open(out_file, 'wb'))
66
+
67
+ else:
68
+ tfp = es.enter_context(tempfile.NamedTemporaryFile(delete=False))
69
+ out_file = tfp.name
70
+
71
+ def _cleanup():
72
+ if not success and out_file:
73
+ os.unlink(out_file)
74
+
75
+ es.enter_context(lang.defer(_cleanup)) # noqa
76
+
77
+ result = out_file, headers
78
+ size = -1
79
+ read = 0
80
+ if 'content-length' in headers:
81
+ size = int(headers['Content-Length'])
82
+
83
+ while block := fp.read(1024 * 8):
84
+ read += len(block)
85
+ tfp.write(block)
86
+
87
+ if size >= 0 and read < size:
88
+ raise urllib.error.ContentTooShortError(
89
+ f'retrieval incomplete: got only {read} out of {size} bytes',
90
+ result, # type: ignore
91
+ )
92
+
93
+ success = True
94
+ return result # type: ignore
95
+
96
+
43
97
  class Cache:
44
98
  def __init__(self, base_dir: str) -> None:
45
99
  super().__init__()
@@ -49,16 +103,32 @@ class Cache:
49
103
 
50
104
  #
51
105
 
52
- def _fetch_url(self, url: str, out_file: str) -> None:
106
+ def _fetch_url(
107
+ self,
108
+ url: str,
109
+ out_file: str,
110
+ *,
111
+ headers: ta.Mapping[str, str] | None = None,
112
+ ) -> None:
53
113
  log.info('Fetching url: %s -> %s', url, out_file)
54
114
 
55
- urllib.request.urlretrieve(url, out_file) # noqa
115
+ _url_retrieve(
116
+ urllib.request.Request( # noqa
117
+ url,
118
+ **(dict(headers=headers) if headers is not None else {}), # type: ignore
119
+ ),
120
+ out_file,
121
+ )
56
122
 
57
123
  def _fetch_into(self, spec: Spec, data_dir: str) -> None:
58
124
  log.info('Fetching spec: %s %r -> %s', spec.digest, spec, data_dir)
59
125
 
60
126
  if isinstance(spec, UrlSpec):
61
- self._fetch_url(spec.url, os.path.join(data_dir, spec.file_name_or_default))
127
+ self._fetch_url(
128
+ spec.url,
129
+ os.path.join(data_dir, spec.file_name_or_default),
130
+ headers=spec.headers,
131
+ )
62
132
 
63
133
  elif isinstance(spec, GithubContentSpec):
64
134
  for repo_file in spec.files:
@@ -104,7 +174,7 @@ class Cache:
104
174
 
105
175
  def _perform_action(self, action: Action, data_dir: str) -> None:
106
176
  if isinstance(action, ExtractAction):
107
- for f in action.files:
177
+ for f in [action.files] if isinstance(action.files, str) else action.files:
108
178
  file = os.path.join(data_dir, f)
109
179
  if not os.path.isfile(file):
110
180
  raise Exception(f'Not file: {file}')
@@ -1,4 +1,5 @@
1
1
  import hashlib
2
+ import operator
2
3
  import typing as ta
3
4
  import urllib.parse
4
5
  import urllib.request
@@ -59,6 +60,10 @@ class UrlSpec(Spec):
59
60
  url: str = dc.xfield(validate=lambda u: bool(urllib.parse.urlparse(u)))
60
61
  file_name: str | None = None
61
62
 
63
+ _: dc.KW_ONLY
64
+
65
+ headers: ta.Mapping[str, str] | None = dc.field(default=None) | msh.update_field_metadata(omit_if=operator.not_)
66
+
62
67
  @cached.property
63
68
  def file_name_or_default(self) -> str:
64
69
  if self.file_name is not None:
@@ -0,0 +1,83 @@
1
+ import argparse
2
+ import inspect
3
+ import os
4
+ import subprocess
5
+ import sys
6
+
7
+ from omlish import __about__
8
+
9
+ from . import install
10
+ from .types import CliModule
11
+
12
+
13
+ def _print_version(args) -> None:
14
+ print(__about__.__version__)
15
+
16
+
17
+ def _print_revision(args) -> None:
18
+ print(__about__.__revision__)
19
+
20
+
21
+ def _reinstall(args) -> None:
22
+ mod_name = globals()['__spec__'].name
23
+ tool_name = '.'.join([mod_name.partition('.')[0], 'tools', 'piptools'])
24
+
25
+ out = subprocess.check_output([
26
+ sys.executable,
27
+ '-m',
28
+ tool_name,
29
+ 'list-root-dists',
30
+ ]).decode()
31
+
32
+ deps = sorted(
33
+ ({s for l in out.splitlines() if (s := l.strip())} | set(args.extra_deps or []))
34
+ - {install.DEFAULT_CLI_PKG} # noqa
35
+ )
36
+
37
+ if deps:
38
+ print('Reinstalling with following additional dependencies:')
39
+ print('\n'.join(' ' + d for d in deps))
40
+ else:
41
+ print('No additional dependencies detected.')
42
+ print()
43
+ print('Continue with reinstall? (ctrl-c to cancel)')
44
+ input()
45
+
46
+ install_src = inspect.getsource(install)
47
+
48
+ os.execl(
49
+ sys.executable,
50
+ sys.executable,
51
+ '-c',
52
+ install_src,
53
+ *deps,
54
+ )
55
+
56
+
57
+ # @omlish-manifest
58
+ _CLI_MODULE = CliModule('cli', __name__)
59
+
60
+
61
+ def _main(argv=None) -> None:
62
+ parser = argparse.ArgumentParser()
63
+ subparsers = parser.add_subparsers()
64
+
65
+ parser_version = subparsers.add_parser('version')
66
+ parser_version.set_defaults(func=_print_version)
67
+
68
+ parser_revision = subparsers.add_parser('revision')
69
+ parser_revision.set_defaults(func=_print_revision)
70
+
71
+ parser_reinstall = subparsers.add_parser('reinstall')
72
+ parser_reinstall.add_argument('extra_deps', nargs='*')
73
+ parser_reinstall.set_defaults(func=_reinstall)
74
+
75
+ args = parser.parse_args(argv)
76
+ if not getattr(args, 'func', None):
77
+ parser.print_help()
78
+ else:
79
+ args.func(args)
80
+
81
+
82
+ if __name__ == '__main__':
83
+ _main()
@@ -10,8 +10,8 @@ import argparse
10
10
  import os
11
11
  import runpy
12
12
  import sys
13
+ import typing as ta
13
14
 
14
- from omlish import __about__
15
15
  from omlish import check
16
16
 
17
17
  from ..manifests.load import ManifestLoader
@@ -23,18 +23,7 @@ from .types import CliModule
23
23
  ##
24
24
 
25
25
 
26
- def _print_version() -> None:
27
- print(__about__.__version__)
28
-
29
-
30
- def _print_revision() -> None:
31
- print(__about__.__revision__)
32
-
33
-
34
- _CLI_FUNCS = [
35
- CliFunc('version', _print_version),
36
- CliFunc('revision', _print_revision),
37
- ]
26
+ _CLI_FUNCS: ta.Sequence[CliFunc] = []
38
27
 
39
28
 
40
29
  ##
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: omdev
3
- Version: 0.0.0.dev41
3
+ Version: 0.0.0.dev43
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.dev41
15
+ Requires-Dist: omlish==0.0.0.dev43
16
16
  Provides-Extra: all
17
17
  Requires-Dist: pycparser~=2.22; extra == "all"
18
18
  Requires-Dist: cffi~=1.17; extra == "all"
@@ -65,6 +65,7 @@ omdev/cexts/_distutils/compilers/options.py
65
65
  omdev/cexts/_distutils/compilers/unixccompiler.py
66
66
  omdev/cli/__init__.py
67
67
  omdev/cli/__main__.py
68
+ omdev/cli/clicmds.py
68
69
  omdev/cli/install.py
69
70
  omdev/cli/main.py
70
71
  omdev/cli/types.py
@@ -1,4 +1,4 @@
1
- omlish==0.0.0.dev41
1
+ omlish==0.0.0.dev43
2
2
 
3
3
  [all]
4
4
  pycparser~=2.22
@@ -12,7 +12,7 @@ authors = [
12
12
  urls = {source = 'https://github.com/wrmsr/omlish'}
13
13
  license = {text = 'BSD-3-Clause'}
14
14
  requires-python = '~=3.12'
15
- version = '0.0.0.dev41'
15
+ version = '0.0.0.dev43'
16
16
  classifiers = [
17
17
  'License :: OSI Approved :: BSD License',
18
18
  'Development Status :: 2 - Pre-Alpha',
@@ -22,7 +22,7 @@ classifiers = [
22
22
  ]
23
23
  description = 'omdev'
24
24
  dependencies = [
25
- 'omlish == 0.0.0.dev41',
25
+ 'omlish == 0.0.0.dev43',
26
26
  ]
27
27
 
28
28
  [project.optional-dependencies]
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes