ominfra 0.0.0.dev238__py3-none-any.whl → 0.0.0.dev239__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/manage/main.py +2 -1
- ominfra/scripts/manage.py +50 -1
- {ominfra-0.0.0.dev238.dist-info → ominfra-0.0.0.dev239.dist-info}/METADATA +3 -3
- {ominfra-0.0.0.dev238.dist-info → ominfra-0.0.0.dev239.dist-info}/RECORD +8 -8
- {ominfra-0.0.0.dev238.dist-info → ominfra-0.0.0.dev239.dist-info}/LICENSE +0 -0
- {ominfra-0.0.0.dev238.dist-info → ominfra-0.0.0.dev239.dist-info}/WHEEL +0 -0
- {ominfra-0.0.0.dev238.dist-info → ominfra-0.0.0.dev239.dist-info}/entry_points.txt +0 -0
- {ominfra-0.0.0.dev238.dist-info → ominfra-0.0.0.dev239.dist-info}/top_level.txt +0 -0
ominfra/manage/main.py
CHANGED
@@ -11,6 +11,7 @@ import os.path
|
|
11
11
|
import sys
|
12
12
|
import typing as ta
|
13
13
|
|
14
|
+
from omdev.home.paths import get_config_dir
|
14
15
|
from omlish.argparse.cli import ArgparseCli
|
15
16
|
from omlish.argparse.cli import argparse_arg
|
16
17
|
from omlish.argparse.cli import argparse_cmd
|
@@ -43,7 +44,7 @@ class MainCli(ArgparseCli):
|
|
43
44
|
@cached_nullary
|
44
45
|
def config(self) -> ManageConfig:
|
45
46
|
if (cf := self.config_file) is None:
|
46
|
-
cf = os.path.
|
47
|
+
cf = os.path.join(get_config_dir(), 'manage', 'manage.yml')
|
47
48
|
if not os.path.isfile(cf):
|
48
49
|
cf = None
|
49
50
|
|
ominfra/scripts/manage.py
CHANGED
@@ -151,6 +151,55 @@ SubprocessChannelOption = ta.Literal['pipe', 'stdout', 'devnull'] # ta.TypeAlia
|
|
151
151
|
SystemPackageOrStr = ta.Union['SystemPackage', str]
|
152
152
|
|
153
153
|
|
154
|
+
########################################
|
155
|
+
# ../../../omdev/home/paths.py
|
156
|
+
"""
|
157
|
+
TODO:
|
158
|
+
- XDG cache root
|
159
|
+
"""
|
160
|
+
|
161
|
+
|
162
|
+
##
|
163
|
+
|
164
|
+
|
165
|
+
HOME_DIR_ENV_VAR = 'OMLISH_HOME'
|
166
|
+
DEFAULT_HOME_DIR = '~/.omlish'
|
167
|
+
|
168
|
+
|
169
|
+
def get_home_dir() -> str:
|
170
|
+
return os.path.expanduser(os.getenv(HOME_DIR_ENV_VAR, DEFAULT_HOME_DIR))
|
171
|
+
|
172
|
+
|
173
|
+
#
|
174
|
+
|
175
|
+
|
176
|
+
def get_config_dir() -> str:
|
177
|
+
return os.path.join(get_home_dir(), 'config')
|
178
|
+
|
179
|
+
|
180
|
+
def get_run_dir() -> str:
|
181
|
+
return os.path.join(get_home_dir(), 'run')
|
182
|
+
|
183
|
+
|
184
|
+
def get_shadow_dir() -> str:
|
185
|
+
return os.path.join(get_home_dir(), 'shadow')
|
186
|
+
|
187
|
+
|
188
|
+
def get_state_dir() -> str:
|
189
|
+
return os.path.join(get_home_dir(), 'state')
|
190
|
+
|
191
|
+
|
192
|
+
##
|
193
|
+
|
194
|
+
|
195
|
+
CACHE_DIR_ENV_VAR = 'OMLISH_CACHE'
|
196
|
+
DEFAULT_CACHE_DIR = '~/.cache/omlish'
|
197
|
+
|
198
|
+
|
199
|
+
def get_cache_dir() -> str:
|
200
|
+
return os.path.expanduser(os.getenv(DEFAULT_CACHE_DIR, DEFAULT_CACHE_DIR))
|
201
|
+
|
202
|
+
|
154
203
|
########################################
|
155
204
|
# ../../../omdev/packaging/versions.py
|
156
205
|
# Copyright (c) Donald Stufft and individual contributors.
|
@@ -13390,7 +13439,7 @@ class MainCli(ArgparseCli):
|
|
13390
13439
|
@cached_nullary
|
13391
13440
|
def config(self) -> ManageConfig:
|
13392
13441
|
if (cf := self.config_file) is None:
|
13393
|
-
cf = os.path.
|
13442
|
+
cf = os.path.join(get_config_dir(), 'manage', 'manage.yml')
|
13394
13443
|
if not os.path.isfile(cf):
|
13395
13444
|
cf = None
|
13396
13445
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: ominfra
|
3
|
-
Version: 0.0.0.
|
3
|
+
Version: 0.0.0.dev239
|
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.dev239
|
16
|
+
Requires-Dist: omlish==0.0.0.dev239
|
17
17
|
Provides-Extra: all
|
18
18
|
Requires-Dist: paramiko~=3.5; extra == "all"
|
19
19
|
Requires-Dist: asyncssh~=2.18; extra == "all"
|
@@ -52,7 +52,7 @@ ominfra/manage/bootstrap.py,sha256=1RIRhVkUZjxZcZerHMg8U6xgWhhemGgPN5cDye8dQ68,4
|
|
52
52
|
ominfra/manage/bootstrap_.py,sha256=B9UfR9J7mS3J54PFaSe1MQS5lCnKgxt5dDRJ9mnHYwg,656
|
53
53
|
ominfra/manage/config.py,sha256=1y2N_8nXHBZc6YbW6BaRZoDDCTBmiHuWtTOQ7zdr5VE,184
|
54
54
|
ominfra/manage/inject.py,sha256=_FVaMZUBKi-oObv14H77luWYCodxNJJD1t4pNQzckFE,2030
|
55
|
-
ominfra/manage/main.py,sha256=
|
55
|
+
ominfra/manage/main.py,sha256=sA0Kv3g4KAtRN5AKgzEF0r0g0pviKCtlUrr9SJkqmIo,4436
|
56
56
|
ominfra/manage/marshal.py,sha256=WKj7IU9bo4fBMSSzT6ZMm_WFalXIJZ-V7j8oi92fNhk,305
|
57
57
|
ominfra/manage/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
58
58
|
ominfra/manage/commands/base.py,sha256=LtaI0AgnplttQK7gNncNItq8yuTZQimJTaprVpZktI8,3993
|
@@ -113,7 +113,7 @@ ominfra/manage/targets/inject.py,sha256=P4597xWM-V3I_gCt2O71OLhYQkkXtuJvkYRsIbhh
|
|
113
113
|
ominfra/manage/targets/targets.py,sha256=7GP6UAZyJFEhpkJN6UQdpr_WN3p7C76v-s445y-WB6U,1885
|
114
114
|
ominfra/scripts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
115
115
|
ominfra/scripts/journald2aws.py,sha256=Hub3-WL7ZzxU9-UaIB78eT9grq4XldTyd3EZmcY2ulI,164834
|
116
|
-
ominfra/scripts/manage.py,sha256=
|
116
|
+
ominfra/scripts/manage.py,sha256=rxq3p8MHhw2Z2SwxRp61US4CPidoMIIHshARYTGWCZo,374730
|
117
117
|
ominfra/scripts/supervisor.py,sha256=8vVoR8kq7Qh2z_NdOrDXXnNCu9N5TnOM2M5om4D-ZmA,296097
|
118
118
|
ominfra/supervisor/LICENSE.txt,sha256=ZrHY15PVR98y26Yg6iQfa-SXnUaYTDhrUsPVcEO5OKM,1874
|
119
119
|
ominfra/supervisor/__init__.py,sha256=Y3l4WY4JRi2uLG6kgbGp93fuGfkxkKwZDvhsa0Rwgtk,15
|
@@ -156,9 +156,9 @@ ominfra/tailscale/api.py,sha256=C5-t_b6jZXUWcy5k8bXm7CFnk73pSdrlMOgGDeGVrpw,1370
|
|
156
156
|
ominfra/tailscale/cli.py,sha256=3FnJbgpLw6gInTfhERd1mDy9ijjMUGxkdYVo43Tnxx4,3555
|
157
157
|
ominfra/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
158
158
|
ominfra/tools/listresources.py,sha256=auGP1LlbBJSFKUWNvQo_UzA8IsBNZBTMwEkFFRJ4FX4,6185
|
159
|
-
ominfra-0.0.0.
|
160
|
-
ominfra-0.0.0.
|
161
|
-
ominfra-0.0.0.
|
162
|
-
ominfra-0.0.0.
|
163
|
-
ominfra-0.0.0.
|
164
|
-
ominfra-0.0.0.
|
159
|
+
ominfra-0.0.0.dev239.dist-info/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
|
160
|
+
ominfra-0.0.0.dev239.dist-info/METADATA,sha256=wwV87zGXFGQxOia12xE5Bo6ZAolfo9INumkNDnsFRuE,731
|
161
|
+
ominfra-0.0.0.dev239.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
162
|
+
ominfra-0.0.0.dev239.dist-info/entry_points.txt,sha256=kgecQ2MgGrM9qK744BoKS3tMesaC3yjLnl9pa5CRczg,37
|
163
|
+
ominfra-0.0.0.dev239.dist-info/top_level.txt,sha256=E-b2OHkk_AOBLXHYZQ2EOFKl-_6uOGd8EjeG-Zy6h_w,8
|
164
|
+
ominfra-0.0.0.dev239.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|