omdev 0.0.0.dev374__py3-none-any.whl → 0.0.0.dev375__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.
- omdev/cc/cli.py +44 -0
- omdev/scripts/ci.py +2 -2
- omdev/scripts/interp.py +2 -2
- omdev/scripts/pyproject.py +2 -2
- {omdev-0.0.0.dev374.dist-info → omdev-0.0.0.dev375.dist-info}/METADATA +2 -2
- {omdev-0.0.0.dev374.dist-info → omdev-0.0.0.dev375.dist-info}/RECORD +10 -10
- {omdev-0.0.0.dev374.dist-info → omdev-0.0.0.dev375.dist-info}/WHEEL +0 -0
- {omdev-0.0.0.dev374.dist-info → omdev-0.0.0.dev375.dist-info}/entry_points.txt +0 -0
- {omdev-0.0.0.dev374.dist-info → omdev-0.0.0.dev375.dist-info}/licenses/LICENSE +0 -0
- {omdev-0.0.0.dev374.dist-info → omdev-0.0.0.dev375.dist-info}/top_level.txt +0 -0
omdev/cc/cli.py
CHANGED
@@ -30,6 +30,7 @@ import shlex
|
|
30
30
|
import shutil
|
31
31
|
import subprocess
|
32
32
|
import tempfile
|
33
|
+
import textwrap
|
33
34
|
import typing as ta
|
34
35
|
|
35
36
|
from omlish import check
|
@@ -37,6 +38,7 @@ from omlish import marshal as msh
|
|
37
38
|
from omlish.argparse import all as ap
|
38
39
|
from omlish.formats import json
|
39
40
|
|
41
|
+
from .. import intellij as ij
|
40
42
|
from .. import magic
|
41
43
|
from ..cache import data as dcache
|
42
44
|
from .cdeps import Cdep
|
@@ -186,6 +188,48 @@ class Cli(ap.Cli):
|
|
186
188
|
cdeps = load_cdeps()
|
187
189
|
print(json.dumps_pretty(msh.marshal(cdeps)))
|
188
190
|
|
191
|
+
@ap.cmd(
|
192
|
+
ap.arg('src-file'),
|
193
|
+
)
|
194
|
+
def ij(self) -> None:
|
195
|
+
src_file = self.args.src_file
|
196
|
+
src_file_name = os.path.basename(src_file)
|
197
|
+
prj_name = src_file_name.rpartition('.')[0]
|
198
|
+
|
199
|
+
# with open(src_file) as f:
|
200
|
+
# src = f.read()
|
201
|
+
# shebang = src.splitlines()[0]
|
202
|
+
# shebang_parts = shlex.split(shebang)
|
203
|
+
# cc_run_pos = next(i for i in range(len(shebang_parts) - 1) if shebang_parts[i:i + 2] == ['cc', 'run'])
|
204
|
+
# cc_run_args = shebang_parts[cc_run_pos + 2:]
|
205
|
+
# print(cc_run_args)
|
206
|
+
|
207
|
+
tmp_dir = tempfile.mkdtemp(f'__{prj_name}')
|
208
|
+
|
209
|
+
src_dir = os.path.join(tmp_dir, 'src')
|
210
|
+
os.mkdir(src_dir)
|
211
|
+
|
212
|
+
os.symlink(os.path.abspath(src_file), os.path.join(src_dir, src_file_name))
|
213
|
+
|
214
|
+
cmake_lists_src = textwrap.dedent(f"""\
|
215
|
+
cmake_minimum_required(VERSION 3.14)
|
216
|
+
project({prj_name})
|
217
|
+
|
218
|
+
add_executable({prj_name} src/{src_file_name})
|
219
|
+
|
220
|
+
set_target_properties({prj_name} PROPERTIES
|
221
|
+
CXX_STANDARD 20
|
222
|
+
CXX_STANDARD_REQUIRED YES
|
223
|
+
CXX_EXTENSIONS NO
|
224
|
+
)
|
225
|
+
""")
|
226
|
+
|
227
|
+
cmake_lists_path = os.path.join(tmp_dir, 'CMakeLists.txt')
|
228
|
+
with open(cmake_lists_path, 'w') as f:
|
229
|
+
f.write(cmake_lists_src)
|
230
|
+
|
231
|
+
ij.open_ide(tmp_dir, ide=ij.Ide.CLION)
|
232
|
+
|
189
233
|
|
190
234
|
def _main() -> None:
|
191
235
|
Cli().cli_run_and_exit()
|
omdev/scripts/ci.py
CHANGED
@@ -1191,7 +1191,7 @@ JSON_PRETTY_KWARGS: ta.Mapping[str, ta.Any] = dict(
|
|
1191
1191
|
indent=JSON_PRETTY_INDENT,
|
1192
1192
|
)
|
1193
1193
|
|
1194
|
-
json_dump_pretty: ta.Callable[...,
|
1194
|
+
json_dump_pretty: ta.Callable[..., None] = functools.partial(json.dump, **JSON_PRETTY_KWARGS)
|
1195
1195
|
json_dumps_pretty: ta.Callable[..., str] = functools.partial(json.dumps, **JSON_PRETTY_KWARGS)
|
1196
1196
|
|
1197
1197
|
|
@@ -1205,7 +1205,7 @@ JSON_COMPACT_KWARGS: ta.Mapping[str, ta.Any] = dict(
|
|
1205
1205
|
separators=JSON_COMPACT_SEPARATORS,
|
1206
1206
|
)
|
1207
1207
|
|
1208
|
-
json_dump_compact: ta.Callable[...,
|
1208
|
+
json_dump_compact: ta.Callable[..., None] = functools.partial(json.dump, **JSON_COMPACT_KWARGS)
|
1209
1209
|
json_dumps_compact: ta.Callable[..., str] = functools.partial(json.dumps, **JSON_COMPACT_KWARGS)
|
1210
1210
|
|
1211
1211
|
|
omdev/scripts/interp.py
CHANGED
@@ -1066,7 +1066,7 @@ JSON_PRETTY_KWARGS: ta.Mapping[str, ta.Any] = dict(
|
|
1066
1066
|
indent=JSON_PRETTY_INDENT,
|
1067
1067
|
)
|
1068
1068
|
|
1069
|
-
json_dump_pretty: ta.Callable[...,
|
1069
|
+
json_dump_pretty: ta.Callable[..., None] = functools.partial(json.dump, **JSON_PRETTY_KWARGS)
|
1070
1070
|
json_dumps_pretty: ta.Callable[..., str] = functools.partial(json.dumps, **JSON_PRETTY_KWARGS)
|
1071
1071
|
|
1072
1072
|
|
@@ -1080,7 +1080,7 @@ JSON_COMPACT_KWARGS: ta.Mapping[str, ta.Any] = dict(
|
|
1080
1080
|
separators=JSON_COMPACT_SEPARATORS,
|
1081
1081
|
)
|
1082
1082
|
|
1083
|
-
json_dump_compact: ta.Callable[...,
|
1083
|
+
json_dump_compact: ta.Callable[..., None] = functools.partial(json.dump, **JSON_COMPACT_KWARGS)
|
1084
1084
|
json_dumps_compact: ta.Callable[..., str] = functools.partial(json.dumps, **JSON_COMPACT_KWARGS)
|
1085
1085
|
|
1086
1086
|
|
omdev/scripts/pyproject.py
CHANGED
@@ -2489,7 +2489,7 @@ JSON_PRETTY_KWARGS: ta.Mapping[str, ta.Any] = dict(
|
|
2489
2489
|
indent=JSON_PRETTY_INDENT,
|
2490
2490
|
)
|
2491
2491
|
|
2492
|
-
json_dump_pretty: ta.Callable[...,
|
2492
|
+
json_dump_pretty: ta.Callable[..., None] = functools.partial(json.dump, **JSON_PRETTY_KWARGS)
|
2493
2493
|
json_dumps_pretty: ta.Callable[..., str] = functools.partial(json.dumps, **JSON_PRETTY_KWARGS)
|
2494
2494
|
|
2495
2495
|
|
@@ -2503,7 +2503,7 @@ JSON_COMPACT_KWARGS: ta.Mapping[str, ta.Any] = dict(
|
|
2503
2503
|
separators=JSON_COMPACT_SEPARATORS,
|
2504
2504
|
)
|
2505
2505
|
|
2506
|
-
json_dump_compact: ta.Callable[...,
|
2506
|
+
json_dump_compact: ta.Callable[..., None] = functools.partial(json.dump, **JSON_COMPACT_KWARGS)
|
2507
2507
|
json_dumps_compact: ta.Callable[..., str] = functools.partial(json.dumps, **JSON_COMPACT_KWARGS)
|
2508
2508
|
|
2509
2509
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: omdev
|
3
|
-
Version: 0.0.0.
|
3
|
+
Version: 0.0.0.dev375
|
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.13
|
14
14
|
License-File: LICENSE
|
15
|
-
Requires-Dist: omlish==0.0.0.
|
15
|
+
Requires-Dist: omlish==0.0.0.dev375
|
16
16
|
Provides-Extra: all
|
17
17
|
Requires-Dist: black~=25.1; extra == "all"
|
18
18
|
Requires-Dist: pycparser~=2.22; extra == "all"
|
@@ -36,7 +36,7 @@ omdev/cc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
36
36
|
omdev/cc/__main__.py,sha256=n7gxSRYZ1QZOUxQPCT0_n9Xl26zi2UIvCwyGW_m67nA,166
|
37
37
|
omdev/cc/cdeps.py,sha256=Uou-V1qcwWhe14iTu39W7yxOlDdr_P96Ai8wQjAp3zQ,1535
|
38
38
|
omdev/cc/cdeps.toml,sha256=MqZ1OQHQ2JPvQpHRL32GpRgQWQRtzjPI2EWl4EqSm-I,1004
|
39
|
-
omdev/cc/cli.py,sha256=
|
39
|
+
omdev/cc/cli.py,sha256=WkA39T1sG2NOXDxImapE4BU7Bg_ZijjErk7HvTfV-6E,6427
|
40
40
|
omdev/cc/srclangs.py,sha256=3u_APHgknuc-BPRQSDISwSzouluKsnLlBxodp-XCl_E,728
|
41
41
|
omdev/cexts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
42
42
|
omdev/cexts/_boilerplate.cc,sha256=sbpXEgdFrkdzZXgaNWFFNN27fL9TZu6VrwvMY4-nnFM,1726
|
@@ -257,9 +257,9 @@ omdev/pyproject/resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJW
|
|
257
257
|
omdev/pyproject/resources/docker-dev.sh,sha256=DHkz5D18jok_oDolfg2mqrvGRWFoCe9GQo04dR1czcc,838
|
258
258
|
omdev/pyproject/resources/python.sh,sha256=rFaN4SiJ9hdLDXXsDTwugI6zsw6EPkgYMmtacZeTbvw,749
|
259
259
|
omdev/scripts/__init__.py,sha256=MKCvUAEQwsIvwLixwtPlpBqmkMXLCnjjXyAXvVpDwVk,91
|
260
|
-
omdev/scripts/ci.py,sha256=
|
261
|
-
omdev/scripts/interp.py,sha256=
|
262
|
-
omdev/scripts/pyproject.py,sha256=
|
260
|
+
omdev/scripts/ci.py,sha256=TTi3EGLN0h1L5lQovZ70Q6fNs3MAkgEFYGIiKbF4ufE,362069
|
261
|
+
omdev/scripts/interp.py,sha256=26l9809srcsgFo5soTMoybo9NqSBAKIBm0x5Vv-v5Wo,158061
|
262
|
+
omdev/scripts/pyproject.py,sha256=Z4rhwcD4l3_tszNdKFwd4TlmvGEKNmr8EYPaHNXwux8,269559
|
263
263
|
omdev/scripts/slowcat.py,sha256=lssv4yrgJHiWfOiHkUut2p8E8Tq32zB-ujXESQxFFHY,2728
|
264
264
|
omdev/scripts/tmpexec.py,sha256=WTYcf56Tj2qjYV14AWmV8SfT0u6Y8eIU6cKgQRvEK3c,1442
|
265
265
|
omdev/tokens/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -307,9 +307,9 @@ omdev/tools/jsonview/resources/jsonview.js,sha256=faDvXDOXKvEvjOuIlz4D3F2ReQXb_b
|
|
307
307
|
omdev/tools/pawk/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
308
308
|
omdev/tools/pawk/__main__.py,sha256=VCqeRVnqT1RPEoIrqHFSu4PXVMg4YEgF4qCQm90-eRI,66
|
309
309
|
omdev/tools/pawk/pawk.py,sha256=ao5mdrpiSU4AZ8mBozoEaV3UVlmVTnRG9wD9XP70MZE,11429
|
310
|
-
omdev-0.0.0.
|
311
|
-
omdev-0.0.0.
|
312
|
-
omdev-0.0.0.
|
313
|
-
omdev-0.0.0.
|
314
|
-
omdev-0.0.0.
|
315
|
-
omdev-0.0.0.
|
310
|
+
omdev-0.0.0.dev375.dist-info/licenses/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
|
311
|
+
omdev-0.0.0.dev375.dist-info/METADATA,sha256=3WkI2Wric32qY-6FD1181T-ldqzgG1vvJTJvPLA7YJ4,1674
|
312
|
+
omdev-0.0.0.dev375.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
313
|
+
omdev-0.0.0.dev375.dist-info/entry_points.txt,sha256=dHLXFmq5D9B8qUyhRtFqTGWGxlbx3t5ejedjrnXNYLU,33
|
314
|
+
omdev-0.0.0.dev375.dist-info/top_level.txt,sha256=1nr7j30fEWgLYHW3lGR9pkdHkb7knv1U1ES1XRNVQ6k,6
|
315
|
+
omdev-0.0.0.dev375.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|