omdev 0.0.0.dev45__py3-none-any.whl → 0.0.0.dev46__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/cli/install.py +2 -0
- omdev/cli/main.py +2 -2
- omdev/cli/managers.py +5 -17
- {omdev-0.0.0.dev45.dist-info → omdev-0.0.0.dev46.dist-info}/METADATA +2 -2
- {omdev-0.0.0.dev45.dist-info → omdev-0.0.0.dev46.dist-info}/RECORD +9 -9
- {omdev-0.0.0.dev45.dist-info → omdev-0.0.0.dev46.dist-info}/LICENSE +0 -0
- {omdev-0.0.0.dev45.dist-info → omdev-0.0.0.dev46.dist-info}/WHEEL +0 -0
- {omdev-0.0.0.dev45.dist-info → omdev-0.0.0.dev46.dist-info}/entry_points.txt +0 -0
- {omdev-0.0.0.dev45.dist-info → omdev-0.0.0.dev46.dist-info}/top_level.txt +0 -0
omdev/cli/install.py
CHANGED
|
@@ -86,6 +86,7 @@ class UvxInstallManager(InstallManager):
|
|
|
86
86
|
'--from', opts.cli_pkg,
|
|
87
87
|
'om',
|
|
88
88
|
'_post_install',
|
|
89
|
+
opts.cli_pkg,
|
|
89
90
|
])
|
|
90
91
|
|
|
91
92
|
|
|
@@ -125,6 +126,7 @@ class PipxInstallManager(InstallManager):
|
|
|
125
126
|
subprocess.check_call([
|
|
126
127
|
exe,
|
|
127
128
|
'_post_install',
|
|
129
|
+
opts.cli_pkg,
|
|
128
130
|
])
|
|
129
131
|
|
|
130
132
|
|
omdev/cli/main.py
CHANGED
omdev/cli/managers.py
CHANGED
|
@@ -11,9 +11,6 @@ def _normalize_pkg_name(s: str) -> str:
|
|
|
11
11
|
return s.lower().replace('_', '-')
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
CLI_PKG = _normalize_pkg_name(__name__.split('.')[0])
|
|
15
|
-
|
|
16
|
-
|
|
17
14
|
##
|
|
18
15
|
|
|
19
16
|
|
|
@@ -22,7 +19,7 @@ class ManagerType(enum.Enum):
|
|
|
22
19
|
PIPX = 'pipx'
|
|
23
20
|
|
|
24
21
|
|
|
25
|
-
def
|
|
22
|
+
def detect_install_manager(cli_pkg: str) -> ManagerType | None:
|
|
26
23
|
if os.path.isfile(fp := os.path.join(sys.prefix, 'uv-receipt.toml')):
|
|
27
24
|
import tomllib
|
|
28
25
|
|
|
@@ -31,7 +28,7 @@ def _detect_install_manager() -> ManagerType | None:
|
|
|
31
28
|
|
|
32
29
|
reqs = dct.get('tool', {}).get('requirements')
|
|
33
30
|
main_pkg = _normalize_pkg_name(reqs[0].get('name', ''))
|
|
34
|
-
if reqs and main_pkg ==
|
|
31
|
+
if reqs and main_pkg == cli_pkg:
|
|
35
32
|
return ManagerType.UVX
|
|
36
33
|
|
|
37
34
|
if os.path.isfile(fp := os.path.join(sys.prefix, 'pipx_metadata.json')):
|
|
@@ -41,21 +38,12 @@ def _detect_install_manager() -> ManagerType | None:
|
|
|
41
38
|
dct = json.loads(f.read())
|
|
42
39
|
|
|
43
40
|
main_pkg = _normalize_pkg_name(dct.get('main_package', {}).get('package_or_url', ''))
|
|
44
|
-
if main_pkg ==
|
|
41
|
+
if main_pkg == cli_pkg:
|
|
45
42
|
return ManagerType.PIPX
|
|
46
43
|
|
|
47
44
|
return None
|
|
48
45
|
|
|
49
46
|
|
|
50
|
-
def detect_install_manager() -> ManagerType | None:
|
|
51
|
-
try:
|
|
52
|
-
return globals()['_DETECTED_MANAGER_TYPE']
|
|
53
|
-
except KeyError:
|
|
54
|
-
pass
|
|
55
|
-
ret = globals()['_DETECTED_MANAGER_TYPE'] = _detect_install_manager()
|
|
56
|
-
return ret
|
|
57
|
-
|
|
58
|
-
|
|
59
47
|
##
|
|
60
48
|
# Python is insistent in prepending sys.path with an empty string (translating to the current working directory),
|
|
61
49
|
# which leads to problems when using the cli in directories containing python packages (such as within this very
|
|
@@ -100,8 +88,8 @@ def _install_path_hack_file() -> None:
|
|
|
100
88
|
##
|
|
101
89
|
|
|
102
90
|
|
|
103
|
-
def setup_install_manager() -> None:
|
|
104
|
-
if detect_install_manager() is None:
|
|
91
|
+
def setup_install_manager(cli_pkg: str) -> None:
|
|
92
|
+
if detect_install_manager(cli_pkg) is None:
|
|
105
93
|
return
|
|
106
94
|
|
|
107
95
|
_install_path_hack_file()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: omdev
|
|
3
|
-
Version: 0.0.0.
|
|
3
|
+
Version: 0.0.0.dev46
|
|
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.dev46
|
|
16
16
|
Provides-Extra: all
|
|
17
17
|
Requires-Dist: pycparser ~=2.22 ; extra == 'all'
|
|
18
18
|
Requires-Dist: cffi ~=1.17 ; extra == 'all'
|
|
@@ -56,9 +56,9 @@ omdev/cexts/_distutils/compilers/unixccompiler.py,sha256=o1h8QuyupLntv4F21_XjzAZ
|
|
|
56
56
|
omdev/cli/__init__.py,sha256=V_l6VP1SZMlJbO-8CJwSuO9TThOy2S_oaPepNYgIrbE,37
|
|
57
57
|
omdev/cli/__main__.py,sha256=5IeIERm-371fSI5ZvPv8eldAJBwgKwpR0R49pTsILNM,76
|
|
58
58
|
omdev/cli/clicli.py,sha256=NY4MF16007Ri31rUsq868u1V9JYDb_2atBALqjjXJK4,1624
|
|
59
|
-
omdev/cli/install.py,sha256=
|
|
60
|
-
omdev/cli/main.py,sha256=
|
|
61
|
-
omdev/cli/managers.py,sha256=
|
|
59
|
+
omdev/cli/install.py,sha256=SNsCGUeX5IRR9qpkBUCeK7l0nJ_21JsmTYw7Fwu_cs8,4547
|
|
60
|
+
omdev/cli/main.py,sha256=yRbomneGgDPc7cjN8nMpjLmwKqOrKM6U36b5ED9q6T8,2058
|
|
61
|
+
omdev/cli/managers.py,sha256=SbI9XVP2BL8HOjOPyB8pkzB3enKfN6kabgpr9Y_VSW8,2592
|
|
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.dev46.dist-info/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
|
|
117
|
+
omdev-0.0.0.dev46.dist-info/METADATA,sha256=XQ_vi_7osOuVsrnp1mFQAuBGFkT317XYxBLXjWzDZBg,1252
|
|
118
|
+
omdev-0.0.0.dev46.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
119
|
+
omdev-0.0.0.dev46.dist-info/entry_points.txt,sha256=dHLXFmq5D9B8qUyhRtFqTGWGxlbx3t5ejedjrnXNYLU,33
|
|
120
|
+
omdev-0.0.0.dev46.dist-info/top_level.txt,sha256=1nr7j30fEWgLYHW3lGR9pkdHkb7knv1U1ES1XRNVQ6k,6
|
|
121
|
+
omdev-0.0.0.dev46.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|