omdev 0.0.0.dev158__tar.gz → 0.0.0.dev159__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.
- {omdev-0.0.0.dev158/omdev.egg-info → omdev-0.0.0.dev159}/PKG-INFO +2 -2
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/amalg/amalg.py +3 -3
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/cache/data/cache.py +2 -2
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/cache/data/manifests.py +1 -1
- omdev-0.0.0.dev159/omdev/git/revisions.py +50 -0
- omdev-0.0.0.dev158/omdev/git.py → omdev-0.0.0.dev159/omdev/git/status.py +0 -111
- omdev-0.0.0.dev159/omdev/git/subtrees.py +100 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/interp/cli.py +2 -2
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/pyproject/cli.py +2 -2
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/revisions.py +1 -1
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/scripts/interp.py +12 -10
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/scripts/pyproject.py +27 -380
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/tools/git.py +2 -2
- omdev-0.0.0.dev159/omdev/tools/pawk/__init__.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159/omdev.egg-info}/PKG-INFO +2 -2
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev.egg-info/SOURCES.txt +4 -1
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev.egg-info/requires.txt +1 -1
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/pyproject.toml +2 -2
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/LICENSE +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/MANIFEST.in +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/README.rst +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/.manifests.json +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/__about__.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/__init__.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/amalg/__init__.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/amalg/__main__.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/antlr/__init__.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/antlr/consts.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/antlr/gen.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/bracepy.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/cache/__init__.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/cache/compute/__init__.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/cache/compute/cache.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/cache/compute/contexts.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/cache/compute/currents.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/cache/compute/fns.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/cache/compute/resolvers.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/cache/compute/storage.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/cache/compute/types.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/cache/data/__init__.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/cache/data/actions.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/cache/data/consts.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/cache/data/defaults.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/cache/data/specs.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/cexts/__init__.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/cexts/_boilerplate.cc +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/cexts/_distutils/LICENSE +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/cexts/_distutils/__init__.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/cexts/_distutils/build_ext.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/cexts/_distutils/compilers/__init__.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/cexts/_distutils/compilers/ccompiler.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/cexts/_distutils/compilers/options.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/cexts/_distutils/compilers/unixccompiler.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/cexts/_distutils/dir_util.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/cexts/_distutils/errors.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/cexts/_distutils/extension.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/cexts/_distutils/file_util.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/cexts/_distutils/modified.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/cexts/_distutils/spawn.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/cexts/_distutils/sysconfig.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/cexts/_distutils/util.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/cexts/_distutils/version.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/cexts/build.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/cexts/cmake.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/cexts/importhook.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/cexts/magic.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/cexts/scan.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/classdot.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/cli/__init__.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/cli/__main__.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/cli/_pathhack.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/cli/clicli.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/cli/install.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/cli/main.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/cli/managers.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/cli/types.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/clipboard/__init__.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/clipboard/clipboard.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/clipboard/darwin_cf.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/clipboard/linux_x11.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/cmake.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/findimports.py +0 -0
- {omdev-0.0.0.dev158/omdev/mypy → omdev-0.0.0.dev159/omdev/git}/__init__.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/imgur.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/interp/__init__.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/interp/__main__.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/interp/inspect.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/interp/providers.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/interp/pyenv.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/interp/resolvers.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/interp/standalone.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/interp/system.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/interp/types.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/magic/__init__.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/magic/find.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/magic/magic.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/magic/prepare.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/magic/styles.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/manifests/__init__.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/manifests/__main__.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/manifests/build.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/manifests/main.py +0 -0
- {omdev-0.0.0.dev158/omdev/packaging → omdev-0.0.0.dev159/omdev/mypy}/__init__.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/mypy/debug.py +0 -0
- {omdev-0.0.0.dev158/omdev/precheck → omdev-0.0.0.dev159/omdev/packaging}/__init__.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/packaging/marshal.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/packaging/names.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/packaging/requires.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/packaging/specifiers.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/packaging/versions.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/pip.py +0 -0
- {omdev-0.0.0.dev158/omdev/ptk/apps → omdev-0.0.0.dev159/omdev/precheck}/__init__.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/precheck/__main__.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/precheck/base.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/precheck/git.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/precheck/lite.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/precheck/main.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/precheck/manifests.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/precheck/scripts.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/ptk/__init__.py +0 -0
- {omdev-0.0.0.dev158/omdev/pycharm → omdev-0.0.0.dev159/omdev/ptk/apps}/__init__.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/ptk/apps/ncdu.py +0 -0
- {omdev-0.0.0.dev158/omdev/tools/json → omdev-0.0.0.dev159/omdev/pycharm}/__init__.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/pycharm/__main__.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/pycharm/cli.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/pyproject/__init__.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/pyproject/__main__.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/pyproject/cexts.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/pyproject/configs.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/pyproject/pkg.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/pyproject/reqs.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/pyproject/venvs.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/scripts/__init__.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/scripts/bumpversion.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/scripts/execrss.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/scripts/exectime.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/scripts/importtrace.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/scripts/slowcat.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/scripts/tmpexec.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/secrets.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/tokens.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/toml/__init__.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/toml/parser.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/toml/writer.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/tools/__init__.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/tools/cloc.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/tools/doc.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/tools/docker.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/tools/importscan.py +0 -0
- {omdev-0.0.0.dev158/omdev/tools/pawk → omdev-0.0.0.dev159/omdev/tools/json}/__init__.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/tools/json/__main__.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/tools/json/cli.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/tools/json/formats.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/tools/json/io.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/tools/json/parsing.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/tools/json/processing.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/tools/json/rendering.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/tools/mkrelimp.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/tools/notebook.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/tools/pawk/__main__.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/tools/pawk/pawk.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/tools/pip.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/tools/prof.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/tools/qr.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/tools/sqlrepl.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev/wheelfile.py +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev.egg-info/dependency_links.txt +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev.egg-info/entry_points.txt +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/omdev.egg-info/top_level.txt +0 -0
- {omdev-0.0.0.dev158 → omdev-0.0.0.dev159}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: omdev
|
|
3
|
-
Version: 0.0.0.
|
|
3
|
+
Version: 0.0.0.dev159
|
|
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.dev159
|
|
16
16
|
Provides-Extra: all
|
|
17
17
|
Requires-Dist: black~=24.10; extra == "all"
|
|
18
18
|
Requires-Dist: pycparser~=2.22; extra == "all"
|
|
@@ -41,7 +41,7 @@ import tokenize_rt as trt
|
|
|
41
41
|
from omlish import check
|
|
42
42
|
from omlish import collections as col
|
|
43
43
|
from omlish import lang
|
|
44
|
-
from omlish.lite.runtime import
|
|
44
|
+
from omlish.lite.runtime import LITE_REQUIRED_PYTHON_VERSION
|
|
45
45
|
from omlish.logs import all as logs
|
|
46
46
|
|
|
47
47
|
from .. import magic
|
|
@@ -595,11 +595,11 @@ def gen_amalg(
|
|
|
595
595
|
out.write('\n\n')
|
|
596
596
|
|
|
597
597
|
version_check_fail_msg = (
|
|
598
|
-
f'Requires python {
|
|
598
|
+
f'Requires python {LITE_REQUIRED_PYTHON_VERSION!r}, '
|
|
599
599
|
f'got {{sys.version_info}} from {{sys.executable}}'
|
|
600
600
|
)
|
|
601
601
|
out.write(textwrap.dedent(f"""
|
|
602
|
-
if sys.version_info < {
|
|
602
|
+
if sys.version_info < {LITE_REQUIRED_PYTHON_VERSION!r}:
|
|
603
603
|
raise OSError(f{version_check_fail_msg!r}) # noqa
|
|
604
604
|
""").lstrip())
|
|
605
605
|
out.write('\n\n')
|
|
@@ -27,7 +27,7 @@ from omlish import marshal as msh
|
|
|
27
27
|
from omlish.formats import json
|
|
28
28
|
from omlish.os.files import touch
|
|
29
29
|
|
|
30
|
-
from ... import
|
|
30
|
+
from ...git.subtrees import git_clone_subtree
|
|
31
31
|
from .actions import Action
|
|
32
32
|
from .actions import ExtractAction
|
|
33
33
|
from .manifests import Manifest
|
|
@@ -148,7 +148,7 @@ class Cache:
|
|
|
148
148
|
|
|
149
149
|
log.info('Cloning git repo: %s -> %s', spec.url, tmp_dir)
|
|
150
150
|
|
|
151
|
-
|
|
151
|
+
git_clone_subtree(
|
|
152
152
|
base_dir=tmp_dir,
|
|
153
153
|
repo_url=spec.url,
|
|
154
154
|
repo_dir='data',
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# ruff: noqa: UP006 UP007
|
|
2
|
+
# @omlish-lite
|
|
3
|
+
import os.path
|
|
4
|
+
import subprocess
|
|
5
|
+
import typing as ta
|
|
6
|
+
|
|
7
|
+
from omlish.subprocesses import subprocess_maybe_shell_wrap_exec
|
|
8
|
+
from omlish.subprocesses import subprocesses
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def get_git_revision(
|
|
12
|
+
*,
|
|
13
|
+
cwd: ta.Optional[str] = None,
|
|
14
|
+
) -> ta.Optional[str]:
|
|
15
|
+
subprocesses.check_output('git', '--version')
|
|
16
|
+
|
|
17
|
+
if cwd is None:
|
|
18
|
+
cwd = os.getcwd()
|
|
19
|
+
|
|
20
|
+
if subprocess.run( # noqa
|
|
21
|
+
subprocess_maybe_shell_wrap_exec(
|
|
22
|
+
'git',
|
|
23
|
+
'rev-parse',
|
|
24
|
+
'--is-inside-work-tree',
|
|
25
|
+
),
|
|
26
|
+
stdout=subprocess.PIPE,
|
|
27
|
+
stderr=subprocess.PIPE,
|
|
28
|
+
).returncode:
|
|
29
|
+
return None
|
|
30
|
+
|
|
31
|
+
has_untracked = bool(subprocesses.check_output(
|
|
32
|
+
'git',
|
|
33
|
+
'ls-files',
|
|
34
|
+
'.',
|
|
35
|
+
'--exclude-standard',
|
|
36
|
+
'--others',
|
|
37
|
+
cwd=cwd,
|
|
38
|
+
).decode().strip())
|
|
39
|
+
|
|
40
|
+
dirty_rev = subprocesses.check_output(
|
|
41
|
+
'git',
|
|
42
|
+
'describe',
|
|
43
|
+
'--match=NeVeRmAtCh',
|
|
44
|
+
'--always',
|
|
45
|
+
'--abbrev=40',
|
|
46
|
+
'--dirty',
|
|
47
|
+
cwd=cwd,
|
|
48
|
+
).decode().strip()
|
|
49
|
+
|
|
50
|
+
return dirty_rev + ('-untracked' if has_untracked else '')
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
# ruff: noqa: UP006 UP007
|
|
2
2
|
# @omlish-lite
|
|
3
|
-
"""
|
|
4
|
-
git status
|
|
5
|
-
--porcelain=v1
|
|
6
|
-
--ignore-submodules
|
|
7
|
-
2>/dev/null
|
|
8
|
-
"""
|
|
9
3
|
import dataclasses as dc
|
|
10
4
|
import enum
|
|
11
5
|
import os.path
|
|
@@ -16,111 +10,6 @@ from omlish.lite.check import check
|
|
|
16
10
|
from omlish.subprocesses import subprocess_maybe_shell_wrap_exec
|
|
17
11
|
|
|
18
12
|
|
|
19
|
-
##
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
def git_clone_subtree(
|
|
23
|
-
*,
|
|
24
|
-
base_dir: str,
|
|
25
|
-
repo_url: str,
|
|
26
|
-
repo_dir: str,
|
|
27
|
-
branch: ta.Optional[str] = None,
|
|
28
|
-
rev: ta.Optional[str] = None,
|
|
29
|
-
repo_subtrees: ta.Sequence[str],
|
|
30
|
-
) -> None:
|
|
31
|
-
if not bool(branch) ^ bool(rev):
|
|
32
|
-
raise ValueError('must set branch or rev')
|
|
33
|
-
|
|
34
|
-
if isinstance(repo_subtrees, str):
|
|
35
|
-
raise TypeError(repo_subtrees)
|
|
36
|
-
|
|
37
|
-
git_opts = [
|
|
38
|
-
'-c', 'advice.detachedHead=false',
|
|
39
|
-
]
|
|
40
|
-
|
|
41
|
-
subprocess.check_call(
|
|
42
|
-
subprocess_maybe_shell_wrap_exec(
|
|
43
|
-
'git',
|
|
44
|
-
*git_opts,
|
|
45
|
-
'clone',
|
|
46
|
-
'-n',
|
|
47
|
-
'--depth=1',
|
|
48
|
-
'--filter=tree:0',
|
|
49
|
-
*(['-b', branch] if branch else []),
|
|
50
|
-
'--single-branch',
|
|
51
|
-
repo_url,
|
|
52
|
-
repo_dir,
|
|
53
|
-
),
|
|
54
|
-
cwd=base_dir,
|
|
55
|
-
)
|
|
56
|
-
|
|
57
|
-
rd = os.path.join(base_dir, repo_dir)
|
|
58
|
-
subprocess.check_call(
|
|
59
|
-
subprocess_maybe_shell_wrap_exec(
|
|
60
|
-
'git',
|
|
61
|
-
*git_opts,
|
|
62
|
-
'sparse-checkout',
|
|
63
|
-
'set',
|
|
64
|
-
'--no-cone',
|
|
65
|
-
*repo_subtrees,
|
|
66
|
-
),
|
|
67
|
-
cwd=rd,
|
|
68
|
-
)
|
|
69
|
-
|
|
70
|
-
subprocess.check_call(
|
|
71
|
-
subprocess_maybe_shell_wrap_exec(
|
|
72
|
-
'git',
|
|
73
|
-
*git_opts,
|
|
74
|
-
'checkout',
|
|
75
|
-
*([rev] if rev else []),
|
|
76
|
-
),
|
|
77
|
-
cwd=rd,
|
|
78
|
-
)
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
def get_git_revision(
|
|
82
|
-
*,
|
|
83
|
-
cwd: ta.Optional[str] = None,
|
|
84
|
-
) -> ta.Optional[str]:
|
|
85
|
-
subprocess.check_output(subprocess_maybe_shell_wrap_exec('git', '--version'))
|
|
86
|
-
|
|
87
|
-
if cwd is None:
|
|
88
|
-
cwd = os.getcwd()
|
|
89
|
-
|
|
90
|
-
if subprocess.run( # noqa
|
|
91
|
-
subprocess_maybe_shell_wrap_exec(
|
|
92
|
-
'git',
|
|
93
|
-
'rev-parse',
|
|
94
|
-
'--is-inside-work-tree',
|
|
95
|
-
),
|
|
96
|
-
stdout=subprocess.PIPE,
|
|
97
|
-
stderr=subprocess.PIPE,
|
|
98
|
-
).returncode:
|
|
99
|
-
return None
|
|
100
|
-
|
|
101
|
-
has_untracked = bool(subprocess.check_output(subprocess_maybe_shell_wrap_exec(
|
|
102
|
-
'git',
|
|
103
|
-
'ls-files',
|
|
104
|
-
'.',
|
|
105
|
-
'--exclude-standard',
|
|
106
|
-
'--others',
|
|
107
|
-
), cwd=cwd).decode().strip())
|
|
108
|
-
|
|
109
|
-
dirty_rev = subprocess.check_output(subprocess_maybe_shell_wrap_exec(
|
|
110
|
-
'git',
|
|
111
|
-
'describe',
|
|
112
|
-
'--match=NeVeRmAtCh',
|
|
113
|
-
'--always',
|
|
114
|
-
'--abbrev=40',
|
|
115
|
-
'--dirty',
|
|
116
|
-
), cwd=cwd).decode().strip()
|
|
117
|
-
|
|
118
|
-
return dirty_rev + ('-untracked' if has_untracked else '')
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
##
|
|
122
|
-
|
|
123
|
-
|
|
124
13
|
_GIT_STATUS_LINE_ESCAPE_CODES: ta.Mapping[str, str] = {
|
|
125
14
|
'\\': '\\',
|
|
126
15
|
'"': '"',
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# ruff: noqa: UP006 UP007
|
|
2
|
+
# @omlish-lite
|
|
3
|
+
import dataclasses as dc
|
|
4
|
+
import os.path
|
|
5
|
+
import typing as ta
|
|
6
|
+
|
|
7
|
+
from omlish.subprocesses import subprocesses
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@dc.dataclass(frozen=True)
|
|
11
|
+
class GitSubtreeCloner:
|
|
12
|
+
base_dir: str
|
|
13
|
+
repo_url: str
|
|
14
|
+
repo_dir: str
|
|
15
|
+
|
|
16
|
+
# _: dc.KW_ONLY
|
|
17
|
+
|
|
18
|
+
repo_subtrees: ta.Sequence[str]
|
|
19
|
+
|
|
20
|
+
branch: ta.Optional[str] = None
|
|
21
|
+
rev: ta.Optional[str] = None
|
|
22
|
+
|
|
23
|
+
def __post_init__(self) -> None:
|
|
24
|
+
if not bool(self.branch) ^ bool(self.rev):
|
|
25
|
+
raise ValueError('must set branch or rev')
|
|
26
|
+
|
|
27
|
+
if isinstance(self.repo_subtrees, str):
|
|
28
|
+
raise TypeError(self.repo_subtrees)
|
|
29
|
+
|
|
30
|
+
@dc.dataclass(frozen=True)
|
|
31
|
+
class Command:
|
|
32
|
+
cmd: ta.Sequence[str]
|
|
33
|
+
cwd: str
|
|
34
|
+
|
|
35
|
+
def build_commands(self) -> ta.Iterator[Command]:
|
|
36
|
+
git_opts = [
|
|
37
|
+
'-c', 'advice.detachedHead=false',
|
|
38
|
+
]
|
|
39
|
+
|
|
40
|
+
yield GitSubtreeCloner.Command(
|
|
41
|
+
cmd=(
|
|
42
|
+
'git',
|
|
43
|
+
*git_opts,
|
|
44
|
+
'clone',
|
|
45
|
+
'-n',
|
|
46
|
+
'--depth=1',
|
|
47
|
+
'--filter=tree:0',
|
|
48
|
+
*(['-b', self.branch] if self.branch else []),
|
|
49
|
+
'--single-branch',
|
|
50
|
+
self.repo_url,
|
|
51
|
+
self.repo_dir,
|
|
52
|
+
),
|
|
53
|
+
cwd=self.base_dir,
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
rd = os.path.join(self.base_dir, self.repo_dir)
|
|
57
|
+
yield GitSubtreeCloner.Command(
|
|
58
|
+
cmd=(
|
|
59
|
+
'git',
|
|
60
|
+
*git_opts,
|
|
61
|
+
'sparse-checkout',
|
|
62
|
+
'set',
|
|
63
|
+
'--no-cone',
|
|
64
|
+
*self.repo_subtrees,
|
|
65
|
+
),
|
|
66
|
+
cwd=rd,
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
yield GitSubtreeCloner.Command(
|
|
70
|
+
cmd=(
|
|
71
|
+
'git',
|
|
72
|
+
*git_opts,
|
|
73
|
+
'checkout',
|
|
74
|
+
*([self.rev] if self.rev else []),
|
|
75
|
+
),
|
|
76
|
+
cwd=rd,
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
def git_clone_subtree(
|
|
81
|
+
*,
|
|
82
|
+
base_dir: str,
|
|
83
|
+
repo_url: str,
|
|
84
|
+
repo_dir: str,
|
|
85
|
+
branch: ta.Optional[str] = None,
|
|
86
|
+
rev: ta.Optional[str] = None,
|
|
87
|
+
repo_subtrees: ta.Sequence[str],
|
|
88
|
+
) -> None:
|
|
89
|
+
for cmd in GitSubtreeCloner(
|
|
90
|
+
base_dir=base_dir,
|
|
91
|
+
repo_url=repo_url,
|
|
92
|
+
repo_dir=repo_dir,
|
|
93
|
+
branch=branch,
|
|
94
|
+
rev=rev,
|
|
95
|
+
repo_subtrees=repo_subtrees,
|
|
96
|
+
).build_commands():
|
|
97
|
+
subprocesses.check_call(
|
|
98
|
+
*cmd.cmd,
|
|
99
|
+
cwd=cmd.cwd,
|
|
100
|
+
)
|
|
@@ -12,7 +12,7 @@ import asyncio
|
|
|
12
12
|
import typing as ta
|
|
13
13
|
|
|
14
14
|
from omlish.lite.check import check
|
|
15
|
-
from omlish.lite.runtime import
|
|
15
|
+
from omlish.lite.runtime import check_lite_runtime_version
|
|
16
16
|
from omlish.logs.standard import configure_standard_logging
|
|
17
17
|
|
|
18
18
|
from .resolvers import DEFAULT_INTERP_RESOLVER
|
|
@@ -58,7 +58,7 @@ def _build_parser() -> argparse.ArgumentParser:
|
|
|
58
58
|
|
|
59
59
|
|
|
60
60
|
async def _async_main(argv: ta.Optional[ta.Sequence[str]] = None) -> None:
|
|
61
|
-
|
|
61
|
+
check_lite_runtime_version()
|
|
62
62
|
configure_standard_logging()
|
|
63
63
|
|
|
64
64
|
parser = _build_parser()
|
|
@@ -39,7 +39,7 @@ from omlish.argparse.cli import argparse_command
|
|
|
39
39
|
from omlish.asyncs.asyncio.subprocesses import asyncio_subprocesses
|
|
40
40
|
from omlish.lite.cached import cached_nullary
|
|
41
41
|
from omlish.lite.check import check
|
|
42
|
-
from omlish.lite.runtime import
|
|
42
|
+
from omlish.lite.runtime import check_lite_runtime_version
|
|
43
43
|
from omlish.logs.standard import configure_standard_logging
|
|
44
44
|
|
|
45
45
|
from ..toml.parser import toml_loads
|
|
@@ -288,7 +288,7 @@ class PyprojectCli(ArgparseCli):
|
|
|
288
288
|
|
|
289
289
|
|
|
290
290
|
async def _async_main(argv: ta.Optional[ta.Sequence[str]] = None) -> None:
|
|
291
|
-
|
|
291
|
+
check_lite_runtime_version()
|
|
292
292
|
configure_standard_logging()
|
|
293
293
|
|
|
294
294
|
await PyprojectCli(argv).async_cli_run()
|
|
@@ -18,7 +18,7 @@ from omlish.lite.check import check
|
|
|
18
18
|
from omlish.lite.logs import log
|
|
19
19
|
from omlish.logs.standard import configure_standard_logging
|
|
20
20
|
|
|
21
|
-
from .git import get_git_revision
|
|
21
|
+
from .git.revisions import get_git_revision
|
|
22
22
|
from .wheelfile import WheelFile
|
|
23
23
|
|
|
24
24
|
|
|
@@ -1806,12 +1806,12 @@ def is_debugger_attached() -> bool:
|
|
|
1806
1806
|
return any(frame[1].endswith('pydevd.py') for frame in inspect.stack())
|
|
1807
1807
|
|
|
1808
1808
|
|
|
1809
|
-
|
|
1809
|
+
LITE_REQUIRED_PYTHON_VERSION = (3, 8)
|
|
1810
1810
|
|
|
1811
1811
|
|
|
1812
|
-
def
|
|
1813
|
-
if sys.version_info <
|
|
1814
|
-
raise OSError(f'Requires python {
|
|
1812
|
+
def check_lite_runtime_version() -> None:
|
|
1813
|
+
if sys.version_info < LITE_REQUIRED_PYTHON_VERSION:
|
|
1814
|
+
raise OSError(f'Requires python {LITE_REQUIRED_PYTHON_VERSION}, got {sys.version_info} from {sys.executable}') # noqa
|
|
1815
1815
|
|
|
1816
1816
|
|
|
1817
1817
|
########################################
|
|
@@ -1968,6 +1968,7 @@ TODO:
|
|
|
1968
1968
|
- structured
|
|
1969
1969
|
- prefixed
|
|
1970
1970
|
- debug
|
|
1971
|
+
- optional noisy? noisy will never be lite - some kinda configure_standard callback mechanism?
|
|
1971
1972
|
"""
|
|
1972
1973
|
|
|
1973
1974
|
|
|
@@ -2004,8 +2005,9 @@ class StandardLogFormatter(logging.Formatter):
|
|
|
2004
2005
|
##
|
|
2005
2006
|
|
|
2006
2007
|
|
|
2007
|
-
class
|
|
2008
|
-
|
|
2008
|
+
class StandardConfiguredLogHandler(ProxyLogHandler):
|
|
2009
|
+
def __init_subclass__(cls, **kwargs):
|
|
2010
|
+
raise TypeError('This class serves only as a marker and should not be subclassed.')
|
|
2009
2011
|
|
|
2010
2012
|
|
|
2011
2013
|
##
|
|
@@ -2036,7 +2038,7 @@ def configure_standard_logging(
|
|
|
2036
2038
|
target: ta.Optional[logging.Logger] = None,
|
|
2037
2039
|
force: bool = False,
|
|
2038
2040
|
handler_factory: ta.Optional[ta.Callable[[], logging.Handler]] = None,
|
|
2039
|
-
) -> ta.Optional[
|
|
2041
|
+
) -> ta.Optional[StandardConfiguredLogHandler]:
|
|
2040
2042
|
with _locking_logging_module_lock():
|
|
2041
2043
|
if target is None:
|
|
2042
2044
|
target = logging.root
|
|
@@ -2044,7 +2046,7 @@ def configure_standard_logging(
|
|
|
2044
2046
|
#
|
|
2045
2047
|
|
|
2046
2048
|
if not force:
|
|
2047
|
-
if any(isinstance(h,
|
|
2049
|
+
if any(isinstance(h, StandardConfiguredLogHandler) for h in list(target.handlers)):
|
|
2048
2050
|
return None
|
|
2049
2051
|
|
|
2050
2052
|
#
|
|
@@ -2078,7 +2080,7 @@ def configure_standard_logging(
|
|
|
2078
2080
|
|
|
2079
2081
|
#
|
|
2080
2082
|
|
|
2081
|
-
return
|
|
2083
|
+
return StandardConfiguredLogHandler(handler)
|
|
2082
2084
|
|
|
2083
2085
|
|
|
2084
2086
|
########################################
|
|
@@ -3486,7 +3488,7 @@ def _build_parser() -> argparse.ArgumentParser:
|
|
|
3486
3488
|
|
|
3487
3489
|
|
|
3488
3490
|
async def _async_main(argv: ta.Optional[ta.Sequence[str]] = None) -> None:
|
|
3489
|
-
|
|
3491
|
+
check_lite_runtime_version()
|
|
3490
3492
|
configure_standard_logging()
|
|
3491
3493
|
|
|
3492
3494
|
parser = _build_parser()
|