jwutils: Move to jwutils -> jw.util

Move all implementation source code from the jwutils module to
jw.util. For compatibility with existing Python modules, keep a thin,
autogenerated compatibility shim under jwutils.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-06-10 07:22:46 +02:00 • committed by janware DevOps
commit a2684dd601
Signed by: DevOps
SSH key fingerprint: SHA256:cZiw7ExG5q3KAVm7Jse3rGITowu0VjgUgNMPbifmY8g
129 changed files with 678 additions and 52 deletions

4
src/python/jw/Makefile Normal file
View file

@ -0,0 +1,4 @@
TOPDIR = ../../..
include $(TOPDIR)/make/proj.mk
include $(JWBDIR)/make/py-ns-dir.mk

View file

@ -0,0 +1,3 @@
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)

View file

@ -4,7 +4,7 @@ import argparse
from collections import OrderedDict
from jwutils.log import *
from .log import slog
class ArgsContainer: # export

View file

@ -4,7 +4,7 @@ from __future__ import annotations
import inspect, sys, re, abc, argparse
from argparse import ArgumentParser, _SubParsersAction
from jwutils import log
from . import log
# full blown example of one level of nested subcommands
# git -C project remote -v show -n myremote

View file

@ -4,9 +4,8 @@ import os, sys, argcomplete, argparse, importlib, inspect, re, pickle, asyncio,
from argparse import ArgumentParser
from pathlib import Path, PurePath
import jwutils
from jwutils.log import *
from jwutils.stree import serdes
from .log import *
from .stree import serdes
class Cmds: # export

View file

@ -4,7 +4,7 @@ from typing import Optional, Dict, cast
import os, re, glob, sys
from pathlib import Path, PosixPath
from jwutils import stree
from . import stree
from .stree.StringTree import StringTree
from .log import *

View file

@ -0,0 +1,6 @@
TOPDIR = ../../../..
PY_UPDATE_INIT_PY ?= false
include $(TOPDIR)/make/proj.mk
include $(JWBDIR)/make/py-mod.mk

View file

@ -2,16 +2,16 @@
from __future__ import print_function
import jwutils.log
from . import log
class Object(object): # export
def __init__(self):
self.log_level = jwutils.log.level
self.log_level = log.level
def log(self, prio, *args):
if self.log_level == jwutils.log.level:
jwutils.log.slog(prio, args)
if self.log_level == log.level:
log.slog(prio, args)
return
if prio <= self.log_level:
msg = ""
@ -21,4 +21,4 @@ class Object(object): # export
print(msg[1:])
def debug(self, *args):
jwutils.log.slog(jwutils.log.DEBUG, args)
log.slog(log.DEBUG, args)

View file

@ -0,0 +1,3 @@
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)

Some files were not shown because too many files have changed in this diff Show more