ominfra 0.0.0.dev180__py3-none-any.whl → 0.0.0.dev182__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.
- ominfra/scripts/manage.py +264 -250
- {ominfra-0.0.0.dev180.dist-info → ominfra-0.0.0.dev182.dist-info}/METADATA +3 -3
- {ominfra-0.0.0.dev180.dist-info → ominfra-0.0.0.dev182.dist-info}/RECORD +7 -7
- {ominfra-0.0.0.dev180.dist-info → ominfra-0.0.0.dev182.dist-info}/LICENSE +0 -0
- {ominfra-0.0.0.dev180.dist-info → ominfra-0.0.0.dev182.dist-info}/WHEEL +0 -0
- {ominfra-0.0.0.dev180.dist-info → ominfra-0.0.0.dev182.dist-info}/entry_points.txt +0 -0
- {ominfra-0.0.0.dev180.dist-info → ominfra-0.0.0.dev182.dist-info}/top_level.txt +0 -0
ominfra/scripts/manage.py
CHANGED
@@ -8850,9 +8850,15 @@ class InterpInspection:
|
|
8850
8850
|
|
8851
8851
|
|
8852
8852
|
class InterpInspector:
|
8853
|
-
def __init__(
|
8853
|
+
def __init__(
|
8854
|
+
self,
|
8855
|
+
*,
|
8856
|
+
log: ta.Optional[logging.Logger] = None,
|
8857
|
+
) -> None:
|
8854
8858
|
super().__init__()
|
8855
8859
|
|
8860
|
+
self._log = log
|
8861
|
+
|
8856
8862
|
self._cache: ta.Dict[str, ta.Optional[InterpInspection]] = {}
|
8857
8863
|
|
8858
8864
|
_RAW_INSPECTION_CODE = """
|
@@ -8901,13 +8907,95 @@ class InterpInspector:
|
|
8901
8907
|
try:
|
8902
8908
|
ret = await self._inspect(exe)
|
8903
8909
|
except Exception as e: # noqa
|
8904
|
-
if
|
8905
|
-
|
8910
|
+
if self._log is not None and self._log.isEnabledFor(logging.DEBUG):
|
8911
|
+
self._log.exception('Failed to inspect interp: %s', exe)
|
8906
8912
|
ret = None
|
8907
8913
|
self._cache[exe] = ret
|
8908
8914
|
return ret
|
8909
8915
|
|
8910
8916
|
|
8917
|
+
########################################
|
8918
|
+
# ../../../omdev/interp/pyenv/pyenv.py
|
8919
|
+
"""
|
8920
|
+
TODO:
|
8921
|
+
- custom tags
|
8922
|
+
- 'aliases'
|
8923
|
+
- https://github.com/pyenv/pyenv/pull/2966
|
8924
|
+
- https://github.com/pyenv/pyenv/issues/218 (lol)
|
8925
|
+
- probably need custom (temp?) definition file
|
8926
|
+
- *or* python-build directly just into the versions dir?
|
8927
|
+
- optionally install / upgrade pyenv itself
|
8928
|
+
- new vers dont need these custom mac opts, only run on old vers
|
8929
|
+
"""
|
8930
|
+
|
8931
|
+
|
8932
|
+
class Pyenv:
|
8933
|
+
def __init__(
|
8934
|
+
self,
|
8935
|
+
*,
|
8936
|
+
root: ta.Optional[str] = None,
|
8937
|
+
) -> None:
|
8938
|
+
if root is not None and not (isinstance(root, str) and root):
|
8939
|
+
raise ValueError(f'pyenv_root: {root!r}')
|
8940
|
+
|
8941
|
+
super().__init__()
|
8942
|
+
|
8943
|
+
self._root_kw = root
|
8944
|
+
|
8945
|
+
@async_cached_nullary
|
8946
|
+
async def root(self) -> ta.Optional[str]:
|
8947
|
+
if self._root_kw is not None:
|
8948
|
+
return self._root_kw
|
8949
|
+
|
8950
|
+
if shutil.which('pyenv'):
|
8951
|
+
return await asyncio_subprocesses.check_output_str('pyenv', 'root')
|
8952
|
+
|
8953
|
+
d = os.path.expanduser('~/.pyenv')
|
8954
|
+
if os.path.isdir(d) and os.path.isfile(os.path.join(d, 'bin', 'pyenv')):
|
8955
|
+
return d
|
8956
|
+
|
8957
|
+
return None
|
8958
|
+
|
8959
|
+
@async_cached_nullary
|
8960
|
+
async def exe(self) -> str:
|
8961
|
+
return os.path.join(check.not_none(await self.root()), 'bin', 'pyenv')
|
8962
|
+
|
8963
|
+
async def version_exes(self) -> ta.List[ta.Tuple[str, str]]:
|
8964
|
+
if (root := await self.root()) is None:
|
8965
|
+
return []
|
8966
|
+
ret = []
|
8967
|
+
vp = os.path.join(root, 'versions')
|
8968
|
+
if os.path.isdir(vp):
|
8969
|
+
for dn in os.listdir(vp):
|
8970
|
+
ep = os.path.join(vp, dn, 'bin', 'python')
|
8971
|
+
if not os.path.isfile(ep):
|
8972
|
+
continue
|
8973
|
+
ret.append((dn, ep))
|
8974
|
+
return ret
|
8975
|
+
|
8976
|
+
async def installable_versions(self) -> ta.List[str]:
|
8977
|
+
if await self.root() is None:
|
8978
|
+
return []
|
8979
|
+
ret = []
|
8980
|
+
s = await asyncio_subprocesses.check_output_str(await self.exe(), 'install', '--list')
|
8981
|
+
for l in s.splitlines():
|
8982
|
+
if not l.startswith(' '):
|
8983
|
+
continue
|
8984
|
+
l = l.strip()
|
8985
|
+
if not l:
|
8986
|
+
continue
|
8987
|
+
ret.append(l)
|
8988
|
+
return ret
|
8989
|
+
|
8990
|
+
async def update(self) -> bool:
|
8991
|
+
if (root := await self.root()) is None:
|
8992
|
+
return False
|
8993
|
+
if not os.path.isdir(os.path.join(root, '.git')):
|
8994
|
+
return False
|
8995
|
+
await asyncio_subprocesses.check_call('git', 'pull', cwd=root)
|
8996
|
+
return True
|
8997
|
+
|
8998
|
+
|
8911
8999
|
########################################
|
8912
9000
|
# ../../../omdev/interp/resolvers.py
|
8913
9001
|
|
@@ -9692,12 +9780,14 @@ class SystemInterpProvider(InterpProvider):
|
|
9692
9780
|
options: Options = Options(),
|
9693
9781
|
*,
|
9694
9782
|
inspector: ta.Optional[InterpInspector] = None,
|
9783
|
+
log: ta.Optional[logging.Logger] = None,
|
9695
9784
|
) -> None:
|
9696
9785
|
super().__init__()
|
9697
9786
|
|
9698
9787
|
self._options = options
|
9699
9788
|
|
9700
9789
|
self._inspector = inspector
|
9790
|
+
self._log = log
|
9701
9791
|
|
9702
9792
|
#
|
9703
9793
|
|
@@ -9771,7 +9861,8 @@ class SystemInterpProvider(InterpProvider):
|
|
9771
9861
|
lst = []
|
9772
9862
|
for e in self.exes():
|
9773
9863
|
if (ev := await self.get_exe_version(e)) is None:
|
9774
|
-
|
9864
|
+
if self._log is not None:
|
9865
|
+
self._log.debug('Invalid system version: %s', e)
|
9775
9866
|
continue
|
9776
9867
|
lst.append((e, ev))
|
9777
9868
|
return lst
|
@@ -9793,88 +9884,7 @@ class SystemInterpProvider(InterpProvider):
|
|
9793
9884
|
|
9794
9885
|
|
9795
9886
|
########################################
|
9796
|
-
# ../../../omdev/interp/pyenv/
|
9797
|
-
"""
|
9798
|
-
TODO:
|
9799
|
-
- custom tags
|
9800
|
-
- 'aliases'
|
9801
|
-
- https://github.com/pyenv/pyenv/pull/2966
|
9802
|
-
- https://github.com/pyenv/pyenv/issues/218 (lol)
|
9803
|
-
- probably need custom (temp?) definition file
|
9804
|
-
- *or* python-build directly just into the versions dir?
|
9805
|
-
- optionally install / upgrade pyenv itself
|
9806
|
-
- new vers dont need these custom mac opts, only run on old vers
|
9807
|
-
"""
|
9808
|
-
|
9809
|
-
|
9810
|
-
##
|
9811
|
-
|
9812
|
-
|
9813
|
-
class Pyenv:
|
9814
|
-
def __init__(
|
9815
|
-
self,
|
9816
|
-
*,
|
9817
|
-
root: ta.Optional[str] = None,
|
9818
|
-
) -> None:
|
9819
|
-
if root is not None and not (isinstance(root, str) and root):
|
9820
|
-
raise ValueError(f'pyenv_root: {root!r}')
|
9821
|
-
|
9822
|
-
super().__init__()
|
9823
|
-
|
9824
|
-
self._root_kw = root
|
9825
|
-
|
9826
|
-
@async_cached_nullary
|
9827
|
-
async def root(self) -> ta.Optional[str]:
|
9828
|
-
if self._root_kw is not None:
|
9829
|
-
return self._root_kw
|
9830
|
-
|
9831
|
-
if shutil.which('pyenv'):
|
9832
|
-
return await asyncio_subprocesses.check_output_str('pyenv', 'root')
|
9833
|
-
|
9834
|
-
d = os.path.expanduser('~/.pyenv')
|
9835
|
-
if os.path.isdir(d) and os.path.isfile(os.path.join(d, 'bin', 'pyenv')):
|
9836
|
-
return d
|
9837
|
-
|
9838
|
-
return None
|
9839
|
-
|
9840
|
-
@async_cached_nullary
|
9841
|
-
async def exe(self) -> str:
|
9842
|
-
return os.path.join(check.not_none(await self.root()), 'bin', 'pyenv')
|
9843
|
-
|
9844
|
-
async def version_exes(self) -> ta.List[ta.Tuple[str, str]]:
|
9845
|
-
if (root := await self.root()) is None:
|
9846
|
-
return []
|
9847
|
-
ret = []
|
9848
|
-
vp = os.path.join(root, 'versions')
|
9849
|
-
if os.path.isdir(vp):
|
9850
|
-
for dn in os.listdir(vp):
|
9851
|
-
ep = os.path.join(vp, dn, 'bin', 'python')
|
9852
|
-
if not os.path.isfile(ep):
|
9853
|
-
continue
|
9854
|
-
ret.append((dn, ep))
|
9855
|
-
return ret
|
9856
|
-
|
9857
|
-
async def installable_versions(self) -> ta.List[str]:
|
9858
|
-
if await self.root() is None:
|
9859
|
-
return []
|
9860
|
-
ret = []
|
9861
|
-
s = await asyncio_subprocesses.check_output_str(await self.exe(), 'install', '--list')
|
9862
|
-
for l in s.splitlines():
|
9863
|
-
if not l.startswith(' '):
|
9864
|
-
continue
|
9865
|
-
l = l.strip()
|
9866
|
-
if not l:
|
9867
|
-
continue
|
9868
|
-
ret.append(l)
|
9869
|
-
return ret
|
9870
|
-
|
9871
|
-
async def update(self) -> bool:
|
9872
|
-
if (root := await self.root()) is None:
|
9873
|
-
return False
|
9874
|
-
if not os.path.isdir(os.path.join(root, '.git')):
|
9875
|
-
return False
|
9876
|
-
await asyncio_subprocesses.check_call('git', 'pull', cwd=root)
|
9877
|
-
return True
|
9887
|
+
# ../../../omdev/interp/pyenv/install.py
|
9878
9888
|
|
9879
9889
|
|
9880
9890
|
##
|
@@ -10112,133 +10122,6 @@ class PyenvVersionInstaller:
|
|
10112
10122
|
return exe
|
10113
10123
|
|
10114
10124
|
|
10115
|
-
##
|
10116
|
-
|
10117
|
-
|
10118
|
-
class PyenvInterpProvider(InterpProvider):
|
10119
|
-
@dc.dataclass(frozen=True)
|
10120
|
-
class Options:
|
10121
|
-
inspect: bool = False
|
10122
|
-
|
10123
|
-
try_update: bool = False
|
10124
|
-
|
10125
|
-
def __init__(
|
10126
|
-
self,
|
10127
|
-
options: Options = Options(),
|
10128
|
-
*,
|
10129
|
-
pyenv: Pyenv,
|
10130
|
-
inspector: InterpInspector,
|
10131
|
-
) -> None:
|
10132
|
-
super().__init__()
|
10133
|
-
|
10134
|
-
self._options = options
|
10135
|
-
|
10136
|
-
self._pyenv = pyenv
|
10137
|
-
self._inspector = inspector
|
10138
|
-
|
10139
|
-
#
|
10140
|
-
|
10141
|
-
@staticmethod
|
10142
|
-
def guess_version(s: str) -> ta.Optional[InterpVersion]:
|
10143
|
-
def strip_sfx(s: str, sfx: str) -> ta.Tuple[str, bool]:
|
10144
|
-
if s.endswith(sfx):
|
10145
|
-
return s[:-len(sfx)], True
|
10146
|
-
return s, False
|
10147
|
-
ok = {}
|
10148
|
-
s, ok['debug'] = strip_sfx(s, '-debug')
|
10149
|
-
s, ok['threaded'] = strip_sfx(s, 't')
|
10150
|
-
try:
|
10151
|
-
v = Version(s)
|
10152
|
-
except InvalidVersion:
|
10153
|
-
return None
|
10154
|
-
return InterpVersion(v, InterpOpts(**ok))
|
10155
|
-
|
10156
|
-
class Installed(ta.NamedTuple):
|
10157
|
-
name: str
|
10158
|
-
exe: str
|
10159
|
-
version: InterpVersion
|
10160
|
-
|
10161
|
-
async def _make_installed(self, vn: str, ep: str) -> ta.Optional[Installed]:
|
10162
|
-
iv: ta.Optional[InterpVersion]
|
10163
|
-
if self._options.inspect:
|
10164
|
-
try:
|
10165
|
-
iv = check.not_none(await self._inspector.inspect(ep)).iv
|
10166
|
-
except Exception as e: # noqa
|
10167
|
-
return None
|
10168
|
-
else:
|
10169
|
-
iv = self.guess_version(vn)
|
10170
|
-
if iv is None:
|
10171
|
-
return None
|
10172
|
-
return PyenvInterpProvider.Installed(
|
10173
|
-
name=vn,
|
10174
|
-
exe=ep,
|
10175
|
-
version=iv,
|
10176
|
-
)
|
10177
|
-
|
10178
|
-
async def installed(self) -> ta.Sequence[Installed]:
|
10179
|
-
ret: ta.List[PyenvInterpProvider.Installed] = []
|
10180
|
-
for vn, ep in await self._pyenv.version_exes():
|
10181
|
-
if (i := await self._make_installed(vn, ep)) is None:
|
10182
|
-
log.debug('Invalid pyenv version: %s', vn)
|
10183
|
-
continue
|
10184
|
-
ret.append(i)
|
10185
|
-
return ret
|
10186
|
-
|
10187
|
-
#
|
10188
|
-
|
10189
|
-
async def get_installed_versions(self, spec: InterpSpecifier) -> ta.Sequence[InterpVersion]:
|
10190
|
-
return [i.version for i in await self.installed()]
|
10191
|
-
|
10192
|
-
async def get_installed_version(self, version: InterpVersion) -> Interp:
|
10193
|
-
for i in await self.installed():
|
10194
|
-
if i.version == version:
|
10195
|
-
return Interp(
|
10196
|
-
exe=i.exe,
|
10197
|
-
version=i.version,
|
10198
|
-
)
|
10199
|
-
raise KeyError(version)
|
10200
|
-
|
10201
|
-
#
|
10202
|
-
|
10203
|
-
async def _get_installable_versions(self, spec: InterpSpecifier) -> ta.Sequence[InterpVersion]:
|
10204
|
-
lst = []
|
10205
|
-
|
10206
|
-
for vs in await self._pyenv.installable_versions():
|
10207
|
-
if (iv := self.guess_version(vs)) is None:
|
10208
|
-
continue
|
10209
|
-
if iv.opts.debug:
|
10210
|
-
raise Exception('Pyenv installable versions not expected to have debug suffix')
|
10211
|
-
for d in [False, True]:
|
10212
|
-
lst.append(dc.replace(iv, opts=dc.replace(iv.opts, debug=d)))
|
10213
|
-
|
10214
|
-
return lst
|
10215
|
-
|
10216
|
-
async def get_installable_versions(self, spec: InterpSpecifier) -> ta.Sequence[InterpVersion]:
|
10217
|
-
lst = await self._get_installable_versions(spec)
|
10218
|
-
|
10219
|
-
if self._options.try_update and not any(v in spec for v in lst):
|
10220
|
-
if self._pyenv.update():
|
10221
|
-
lst = await self._get_installable_versions(spec)
|
10222
|
-
|
10223
|
-
return lst
|
10224
|
-
|
10225
|
-
async def install_version(self, version: InterpVersion) -> Interp:
|
10226
|
-
inst_version = str(version.version)
|
10227
|
-
inst_opts = version.opts
|
10228
|
-
if inst_opts.threaded:
|
10229
|
-
inst_version += 't'
|
10230
|
-
inst_opts = dc.replace(inst_opts, threaded=False)
|
10231
|
-
|
10232
|
-
installer = PyenvVersionInstaller(
|
10233
|
-
inst_version,
|
10234
|
-
interp_opts=inst_opts,
|
10235
|
-
pyenv=self._pyenv,
|
10236
|
-
)
|
10237
|
-
|
10238
|
-
exe = await installer.install()
|
10239
|
-
return Interp(exe, version)
|
10240
|
-
|
10241
|
-
|
10242
10125
|
########################################
|
10243
10126
|
# ../commands/inject.py
|
10244
10127
|
|
@@ -10566,18 +10449,134 @@ def bind_interp_providers() -> InjectorBindings:
|
|
10566
10449
|
|
10567
10450
|
|
10568
10451
|
########################################
|
10569
|
-
# ../../../omdev/interp/pyenv/
|
10452
|
+
# ../../../omdev/interp/pyenv/provider.py
|
10570
10453
|
|
10571
10454
|
|
10572
|
-
|
10573
|
-
|
10574
|
-
|
10455
|
+
class PyenvInterpProvider(InterpProvider):
|
10456
|
+
@dc.dataclass(frozen=True)
|
10457
|
+
class Options:
|
10458
|
+
inspect: bool = False
|
10575
10459
|
|
10576
|
-
|
10577
|
-
inj.bind(InterpProvider, to_key=PyenvInterpProvider, array=True),
|
10578
|
-
]
|
10460
|
+
try_update: bool = False
|
10579
10461
|
|
10580
|
-
|
10462
|
+
def __init__(
|
10463
|
+
self,
|
10464
|
+
options: Options = Options(),
|
10465
|
+
*,
|
10466
|
+
pyenv: Pyenv,
|
10467
|
+
inspector: InterpInspector,
|
10468
|
+
log: ta.Optional[logging.Logger] = None,
|
10469
|
+
) -> None:
|
10470
|
+
super().__init__()
|
10471
|
+
|
10472
|
+
self._options = options
|
10473
|
+
|
10474
|
+
self._pyenv = pyenv
|
10475
|
+
self._inspector = inspector
|
10476
|
+
self._log = log
|
10477
|
+
|
10478
|
+
#
|
10479
|
+
|
10480
|
+
@staticmethod
|
10481
|
+
def guess_version(s: str) -> ta.Optional[InterpVersion]:
|
10482
|
+
def strip_sfx(s: str, sfx: str) -> ta.Tuple[str, bool]:
|
10483
|
+
if s.endswith(sfx):
|
10484
|
+
return s[:-len(sfx)], True
|
10485
|
+
return s, False
|
10486
|
+
ok = {}
|
10487
|
+
s, ok['debug'] = strip_sfx(s, '-debug')
|
10488
|
+
s, ok['threaded'] = strip_sfx(s, 't')
|
10489
|
+
try:
|
10490
|
+
v = Version(s)
|
10491
|
+
except InvalidVersion:
|
10492
|
+
return None
|
10493
|
+
return InterpVersion(v, InterpOpts(**ok))
|
10494
|
+
|
10495
|
+
class Installed(ta.NamedTuple):
|
10496
|
+
name: str
|
10497
|
+
exe: str
|
10498
|
+
version: InterpVersion
|
10499
|
+
|
10500
|
+
async def _make_installed(self, vn: str, ep: str) -> ta.Optional[Installed]:
|
10501
|
+
iv: ta.Optional[InterpVersion]
|
10502
|
+
if self._options.inspect:
|
10503
|
+
try:
|
10504
|
+
iv = check.not_none(await self._inspector.inspect(ep)).iv
|
10505
|
+
except Exception as e: # noqa
|
10506
|
+
return None
|
10507
|
+
else:
|
10508
|
+
iv = self.guess_version(vn)
|
10509
|
+
if iv is None:
|
10510
|
+
return None
|
10511
|
+
return PyenvInterpProvider.Installed(
|
10512
|
+
name=vn,
|
10513
|
+
exe=ep,
|
10514
|
+
version=iv,
|
10515
|
+
)
|
10516
|
+
|
10517
|
+
async def installed(self) -> ta.Sequence[Installed]:
|
10518
|
+
ret: ta.List[PyenvInterpProvider.Installed] = []
|
10519
|
+
for vn, ep in await self._pyenv.version_exes():
|
10520
|
+
if (i := await self._make_installed(vn, ep)) is None:
|
10521
|
+
if self._log is not None:
|
10522
|
+
self._log.debug('Invalid pyenv version: %s', vn)
|
10523
|
+
continue
|
10524
|
+
ret.append(i)
|
10525
|
+
return ret
|
10526
|
+
|
10527
|
+
#
|
10528
|
+
|
10529
|
+
async def get_installed_versions(self, spec: InterpSpecifier) -> ta.Sequence[InterpVersion]:
|
10530
|
+
return [i.version for i in await self.installed()]
|
10531
|
+
|
10532
|
+
async def get_installed_version(self, version: InterpVersion) -> Interp:
|
10533
|
+
for i in await self.installed():
|
10534
|
+
if i.version == version:
|
10535
|
+
return Interp(
|
10536
|
+
exe=i.exe,
|
10537
|
+
version=i.version,
|
10538
|
+
)
|
10539
|
+
raise KeyError(version)
|
10540
|
+
|
10541
|
+
#
|
10542
|
+
|
10543
|
+
async def _get_installable_versions(self, spec: InterpSpecifier) -> ta.Sequence[InterpVersion]:
|
10544
|
+
lst = []
|
10545
|
+
|
10546
|
+
for vs in await self._pyenv.installable_versions():
|
10547
|
+
if (iv := self.guess_version(vs)) is None:
|
10548
|
+
continue
|
10549
|
+
if iv.opts.debug:
|
10550
|
+
raise Exception('Pyenv installable versions not expected to have debug suffix')
|
10551
|
+
for d in [False, True]:
|
10552
|
+
lst.append(dc.replace(iv, opts=dc.replace(iv.opts, debug=d)))
|
10553
|
+
|
10554
|
+
return lst
|
10555
|
+
|
10556
|
+
async def get_installable_versions(self, spec: InterpSpecifier) -> ta.Sequence[InterpVersion]:
|
10557
|
+
lst = await self._get_installable_versions(spec)
|
10558
|
+
|
10559
|
+
if self._options.try_update and not any(v in spec for v in lst):
|
10560
|
+
if self._pyenv.update():
|
10561
|
+
lst = await self._get_installable_versions(spec)
|
10562
|
+
|
10563
|
+
return lst
|
10564
|
+
|
10565
|
+
async def install_version(self, version: InterpVersion) -> Interp:
|
10566
|
+
inst_version = str(version.version)
|
10567
|
+
inst_opts = version.opts
|
10568
|
+
if inst_opts.threaded:
|
10569
|
+
inst_version += 't'
|
10570
|
+
inst_opts = dc.replace(inst_opts, threaded=False)
|
10571
|
+
|
10572
|
+
installer = PyenvVersionInstaller(
|
10573
|
+
inst_version,
|
10574
|
+
interp_opts=inst_opts,
|
10575
|
+
pyenv=self._pyenv,
|
10576
|
+
)
|
10577
|
+
|
10578
|
+
exe = await installer.install()
|
10579
|
+
return Interp(exe, version)
|
10581
10580
|
|
10582
10581
|
|
10583
10582
|
########################################
|
@@ -10943,6 +10942,50 @@ class SshManageTargetConnector(ManageTargetConnector):
|
|
10943
10942
|
yield rce
|
10944
10943
|
|
10945
10944
|
|
10945
|
+
########################################
|
10946
|
+
# ../../../omdev/interp/pyenv/inject.py
|
10947
|
+
|
10948
|
+
|
10949
|
+
def bind_interp_pyenv() -> InjectorBindings:
|
10950
|
+
lst: ta.List[InjectorBindingOrBindings] = [
|
10951
|
+
inj.bind(Pyenv, singleton=True),
|
10952
|
+
|
10953
|
+
inj.bind(PyenvInterpProvider, singleton=True),
|
10954
|
+
inj.bind(InterpProvider, to_key=PyenvInterpProvider, array=True),
|
10955
|
+
]
|
10956
|
+
|
10957
|
+
return inj.as_bindings(*lst)
|
10958
|
+
|
10959
|
+
|
10960
|
+
########################################
|
10961
|
+
# ../targets/inject.py
|
10962
|
+
|
10963
|
+
|
10964
|
+
def bind_targets() -> InjectorBindings:
|
10965
|
+
lst: ta.List[InjectorBindingOrBindings] = [
|
10966
|
+
inj.bind(LocalManageTargetConnector, singleton=True),
|
10967
|
+
inj.bind(DockerManageTargetConnector, singleton=True),
|
10968
|
+
inj.bind(SshManageTargetConnector, singleton=True),
|
10969
|
+
|
10970
|
+
inj.bind(TypeSwitchedManageTargetConnector, singleton=True),
|
10971
|
+
inj.bind(ManageTargetConnector, to_key=TypeSwitchedManageTargetConnector),
|
10972
|
+
]
|
10973
|
+
|
10974
|
+
#
|
10975
|
+
|
10976
|
+
def provide_manage_target_connector_map(injector: Injector) -> ManageTargetConnectorMap:
|
10977
|
+
return ManageTargetConnectorMap({
|
10978
|
+
LocalManageTarget: injector[LocalManageTargetConnector],
|
10979
|
+
DockerManageTarget: injector[DockerManageTargetConnector],
|
10980
|
+
SshManageTarget: injector[SshManageTargetConnector],
|
10981
|
+
})
|
10982
|
+
lst.append(inj.bind(provide_manage_target_connector_map, singleton=True))
|
10983
|
+
|
10984
|
+
#
|
10985
|
+
|
10986
|
+
return inj.as_bindings(*lst)
|
10987
|
+
|
10988
|
+
|
10946
10989
|
########################################
|
10947
10990
|
# ../../../omdev/interp/inject.py
|
10948
10991
|
|
@@ -10984,35 +11027,6 @@ def bind_interp() -> InjectorBindings:
|
|
10984
11027
|
return inj.as_bindings(*lst)
|
10985
11028
|
|
10986
11029
|
|
10987
|
-
########################################
|
10988
|
-
# ../targets/inject.py
|
10989
|
-
|
10990
|
-
|
10991
|
-
def bind_targets() -> InjectorBindings:
|
10992
|
-
lst: ta.List[InjectorBindingOrBindings] = [
|
10993
|
-
inj.bind(LocalManageTargetConnector, singleton=True),
|
10994
|
-
inj.bind(DockerManageTargetConnector, singleton=True),
|
10995
|
-
inj.bind(SshManageTargetConnector, singleton=True),
|
10996
|
-
|
10997
|
-
inj.bind(TypeSwitchedManageTargetConnector, singleton=True),
|
10998
|
-
inj.bind(ManageTargetConnector, to_key=TypeSwitchedManageTargetConnector),
|
10999
|
-
]
|
11000
|
-
|
11001
|
-
#
|
11002
|
-
|
11003
|
-
def provide_manage_target_connector_map(injector: Injector) -> ManageTargetConnectorMap:
|
11004
|
-
return ManageTargetConnectorMap({
|
11005
|
-
LocalManageTarget: injector[LocalManageTargetConnector],
|
11006
|
-
DockerManageTarget: injector[DockerManageTargetConnector],
|
11007
|
-
SshManageTarget: injector[SshManageTargetConnector],
|
11008
|
-
})
|
11009
|
-
lst.append(inj.bind(provide_manage_target_connector_map, singleton=True))
|
11010
|
-
|
11011
|
-
#
|
11012
|
-
|
11013
|
-
return inj.as_bindings(*lst)
|
11014
|
-
|
11015
|
-
|
11016
11030
|
########################################
|
11017
11031
|
# ../../../omdev/interp/default.py
|
11018
11032
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: ominfra
|
3
|
-
Version: 0.0.0.
|
3
|
+
Version: 0.0.0.dev182
|
4
4
|
Summary: ominfra
|
5
5
|
Author: wrmsr
|
6
6
|
License: BSD-3-Clause
|
@@ -12,8 +12,8 @@ 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: omdev==0.0.0.
|
16
|
-
Requires-Dist: omlish==0.0.0.
|
15
|
+
Requires-Dist: omdev==0.0.0.dev182
|
16
|
+
Requires-Dist: omlish==0.0.0.dev182
|
17
17
|
Provides-Extra: all
|
18
18
|
Requires-Dist: paramiko~=3.5; extra == "all"
|
19
19
|
Requires-Dist: asyncssh~=2.18; extra == "all"
|
@@ -88,7 +88,7 @@ ominfra/manage/targets/inject.py,sha256=P4597xWM-V3I_gCt2O71OLhYQkkXtuJvkYRsIbhh
|
|
88
88
|
ominfra/manage/targets/targets.py,sha256=7GP6UAZyJFEhpkJN6UQdpr_WN3p7C76v-s445y-WB6U,1885
|
89
89
|
ominfra/scripts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
90
90
|
ominfra/scripts/journald2aws.py,sha256=yEnBAd0Q_3lBkVoTvlJ_uCcUxz7Ckn2qoSWZVhMihvQ,157696
|
91
|
-
ominfra/scripts/manage.py,sha256=
|
91
|
+
ominfra/scripts/manage.py,sha256=TT4-RKT2fpIAmTmfGU9ANDbrtKwx63BOSkUPK7myjh0,327805
|
92
92
|
ominfra/scripts/supervisor.py,sha256=aEngsVXbK7DNEtILJ_eMMlUu113kfT2uFJ-bdbcPTro,281984
|
93
93
|
ominfra/supervisor/LICENSE.txt,sha256=yvqaMNsDhWxziHa9ien6qCW1SkZv-DQlAg96XjfSee8,1746
|
94
94
|
ominfra/supervisor/__init__.py,sha256=Y3l4WY4JRi2uLG6kgbGp93fuGfkxkKwZDvhsa0Rwgtk,15
|
@@ -131,9 +131,9 @@ ominfra/tailscale/api.py,sha256=C5-t_b6jZXUWcy5k8bXm7CFnk73pSdrlMOgGDeGVrpw,1370
|
|
131
131
|
ominfra/tailscale/cli.py,sha256=3FnJbgpLw6gInTfhERd1mDy9ijjMUGxkdYVo43Tnxx4,3555
|
132
132
|
ominfra/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
133
133
|
ominfra/tools/listresources.py,sha256=4qVg5txsb10EHhvqXXeM6gJ2jx9LbroEnPydDv1uXs0,6176
|
134
|
-
ominfra-0.0.0.
|
135
|
-
ominfra-0.0.0.
|
136
|
-
ominfra-0.0.0.
|
137
|
-
ominfra-0.0.0.
|
138
|
-
ominfra-0.0.0.
|
139
|
-
ominfra-0.0.0.
|
134
|
+
ominfra-0.0.0.dev182.dist-info/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
|
135
|
+
ominfra-0.0.0.dev182.dist-info/METADATA,sha256=7uiF4hH6SWBDS3BfzJL-Yia-Z2v4jchDSMpBZs1Ex6Q,731
|
136
|
+
ominfra-0.0.0.dev182.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
137
|
+
ominfra-0.0.0.dev182.dist-info/entry_points.txt,sha256=kgecQ2MgGrM9qK744BoKS3tMesaC3yjLnl9pa5CRczg,37
|
138
|
+
ominfra-0.0.0.dev182.dist-info/top_level.txt,sha256=E-b2OHkk_AOBLXHYZQ2EOFKl-_6uOGd8EjeG-Zy6h_w,8
|
139
|
+
ominfra-0.0.0.dev182.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|