pkgmgr-kunrunic 0.1.1.dev7__tar.gz → 0.1.1.dev9__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.
- {pkgmgr_kunrunic-0.1.1.dev7/pkgmgr_kunrunic.egg-info → pkgmgr_kunrunic-0.1.1.dev9}/PKG-INFO +5 -1
- {pkgmgr_kunrunic-0.1.1.dev7 → pkgmgr_kunrunic-0.1.1.dev9}/pkgmgr/__init__.py +1 -1
- {pkgmgr_kunrunic-0.1.1.dev7 → pkgmgr_kunrunic-0.1.1.dev9}/pkgmgr/release.py +55 -2
- {pkgmgr_kunrunic-0.1.1.dev7 → pkgmgr_kunrunic-0.1.1.dev9/pkgmgr_kunrunic.egg-info}/PKG-INFO +5 -1
- pkgmgr_kunrunic-0.1.1.dev9/pkgmgr_kunrunic.egg-info/requires.txt +9 -0
- {pkgmgr_kunrunic-0.1.1.dev7 → pkgmgr_kunrunic-0.1.1.dev9}/plugin/export_pkgstore.py +21 -13
- {pkgmgr_kunrunic-0.1.1.dev7 → pkgmgr_kunrunic-0.1.1.dev9}/pyproject.toml +4 -0
- pkgmgr_kunrunic-0.1.1.dev7/pkgmgr_kunrunic.egg-info/requires.txt +0 -1
- {pkgmgr_kunrunic-0.1.1.dev7 → pkgmgr_kunrunic-0.1.1.dev9}/LICENSE +0 -0
- {pkgmgr_kunrunic-0.1.1.dev7 → pkgmgr_kunrunic-0.1.1.dev9}/README.md +0 -0
- {pkgmgr_kunrunic-0.1.1.dev7 → pkgmgr_kunrunic-0.1.1.dev9}/pkgmgr/__main__.py +0 -0
- {pkgmgr_kunrunic-0.1.1.dev7 → pkgmgr_kunrunic-0.1.1.dev9}/pkgmgr/cli.py +0 -0
- {pkgmgr_kunrunic-0.1.1.dev7 → pkgmgr_kunrunic-0.1.1.dev9}/pkgmgr/collectors/__init__.py +0 -0
- {pkgmgr_kunrunic-0.1.1.dev7 → pkgmgr_kunrunic-0.1.1.dev9}/pkgmgr/collectors/base.py +0 -0
- {pkgmgr_kunrunic-0.1.1.dev7 → pkgmgr_kunrunic-0.1.1.dev9}/pkgmgr/collectors/checksums.py +0 -0
- {pkgmgr_kunrunic-0.1.1.dev7 → pkgmgr_kunrunic-0.1.1.dev9}/pkgmgr/config.py +0 -0
- {pkgmgr_kunrunic-0.1.1.dev7 → pkgmgr_kunrunic-0.1.1.dev9}/pkgmgr/points.py +0 -0
- {pkgmgr_kunrunic-0.1.1.dev7 → pkgmgr_kunrunic-0.1.1.dev9}/pkgmgr/shell_integration.py +0 -0
- {pkgmgr_kunrunic-0.1.1.dev7 → pkgmgr_kunrunic-0.1.1.dev9}/pkgmgr/snapshot.py +0 -0
- {pkgmgr_kunrunic-0.1.1.dev7 → pkgmgr_kunrunic-0.1.1.dev9}/pkgmgr/templates/pkg.yaml.sample +0 -0
- {pkgmgr_kunrunic-0.1.1.dev7 → pkgmgr_kunrunic-0.1.1.dev9}/pkgmgr/templates/pkgmgr.yaml.sample +0 -0
- {pkgmgr_kunrunic-0.1.1.dev7 → pkgmgr_kunrunic-0.1.1.dev9}/pkgmgr/watch.py +0 -0
- {pkgmgr_kunrunic-0.1.1.dev7 → pkgmgr_kunrunic-0.1.1.dev9}/pkgmgr_kunrunic.egg-info/SOURCES.txt +0 -0
- {pkgmgr_kunrunic-0.1.1.dev7 → pkgmgr_kunrunic-0.1.1.dev9}/pkgmgr_kunrunic.egg-info/dependency_links.txt +0 -0
- {pkgmgr_kunrunic-0.1.1.dev7 → pkgmgr_kunrunic-0.1.1.dev9}/pkgmgr_kunrunic.egg-info/entry_points.txt +0 -0
- {pkgmgr_kunrunic-0.1.1.dev7 → pkgmgr_kunrunic-0.1.1.dev9}/pkgmgr_kunrunic.egg-info/not-zip-safe +0 -0
- {pkgmgr_kunrunic-0.1.1.dev7 → pkgmgr_kunrunic-0.1.1.dev9}/pkgmgr_kunrunic.egg-info/top_level.txt +0 -0
- {pkgmgr_kunrunic-0.1.1.dev7 → pkgmgr_kunrunic-0.1.1.dev9}/plugin/export_cksum.py +0 -0
- {pkgmgr_kunrunic-0.1.1.dev7 → pkgmgr_kunrunic-0.1.1.dev9}/plugin/export_source_review.py +0 -0
- {pkgmgr_kunrunic-0.1.1.dev7 → pkgmgr_kunrunic-0.1.1.dev9}/setup.cfg +0 -0
- {pkgmgr_kunrunic-0.1.1.dev7 → pkgmgr_kunrunic-0.1.1.dev9}/tests/test_cli_install.py +0 -0
- {pkgmgr_kunrunic-0.1.1.dev7 → pkgmgr_kunrunic-0.1.1.dev9}/tests/test_config.py +0 -0
- {pkgmgr_kunrunic-0.1.1.dev7 → pkgmgr_kunrunic-0.1.1.dev9}/tests/test_progress.py +0 -0
- {pkgmgr_kunrunic-0.1.1.dev7 → pkgmgr_kunrunic-0.1.1.dev9}/tests/test_release.py +0 -0
- {pkgmgr_kunrunic-0.1.1.dev7 → pkgmgr_kunrunic-0.1.1.dev9}/tests/test_snapshot.py +0 -0
- {pkgmgr_kunrunic-0.1.1.dev7 → pkgmgr_kunrunic-0.1.1.dev9}/tools/echo_args.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pkgmgr-kunrunic
|
|
3
|
-
Version: 0.1.1.
|
|
3
|
+
Version: 0.1.1.dev9
|
|
4
4
|
Summary: Package management workflow scaffold.
|
|
5
5
|
Author: pkgmgr maintainers
|
|
6
6
|
License: MIT License
|
|
@@ -46,6 +46,10 @@ Requires-Python: >=3.6
|
|
|
46
46
|
Description-Content-Type: text/markdown
|
|
47
47
|
License-File: LICENSE
|
|
48
48
|
Requires-Dist: pyyaml>=6.0
|
|
49
|
+
Requires-Dist: openpyxl<3.2,>=3.0; python_version < "3.8"
|
|
50
|
+
Requires-Dist: openpyxl>=3.1; python_version >= "3.8"
|
|
51
|
+
Requires-Dist: python-docx<1.0,>=0.8.11; python_version < "3.8"
|
|
52
|
+
Requires-Dist: python-docx>=1.1; python_version >= "3.8"
|
|
49
53
|
Dynamic: license-file
|
|
50
54
|
|
|
51
55
|
# pkgmgr
|
|
@@ -602,6 +602,18 @@ _PKG_NOTE_NAME = "PKG_NOTE"
|
|
|
602
602
|
_PKG_LIST_NAME = "PKG_LIST"
|
|
603
603
|
|
|
604
604
|
|
|
605
|
+
def _read_json_path(path):
|
|
606
|
+
try:
|
|
607
|
+
with open(path, "r", encoding="utf-8") as f:
|
|
608
|
+
return json.load(f)
|
|
609
|
+
except Exception:
|
|
610
|
+
try:
|
|
611
|
+
with open(path, "r", encoding="euc-kr", errors="replace") as f:
|
|
612
|
+
return json.load(f)
|
|
613
|
+
except Exception:
|
|
614
|
+
return None
|
|
615
|
+
|
|
616
|
+
|
|
605
617
|
def _read_note_text(path):
|
|
606
618
|
try:
|
|
607
619
|
with open(path, "r", encoding="utf-8") as f:
|
|
@@ -614,6 +626,28 @@ def _read_note_text(path):
|
|
|
614
626
|
return ""
|
|
615
627
|
|
|
616
628
|
|
|
629
|
+
def _update_release_history_note(pkg_id, root_name, release_name, note_text):
|
|
630
|
+
rel_dir = _pkg_release_history_dir(pkg_id)
|
|
631
|
+
if not os.path.isdir(rel_dir):
|
|
632
|
+
return False
|
|
633
|
+
filenames = [n for n in os.listdir(rel_dir) if n.startswith("release-") and n.endswith(".json")]
|
|
634
|
+
for name in sorted(filenames, reverse=True):
|
|
635
|
+
path = os.path.join(rel_dir, name)
|
|
636
|
+
payload = _read_json_path(path) or {}
|
|
637
|
+
bundles = payload.get("bundles") or []
|
|
638
|
+
updated = False
|
|
639
|
+
for bundle in bundles:
|
|
640
|
+
if bundle.get("root") == root_name and bundle.get("release_name") == release_name:
|
|
641
|
+
bundle["note"] = note_text
|
|
642
|
+
updated = True
|
|
643
|
+
if updated:
|
|
644
|
+
payload["generated_at"] = _timestamp()
|
|
645
|
+
with open(path, "w") as f:
|
|
646
|
+
json.dump(payload, f, ensure_ascii=False, indent=2, sort_keys=True)
|
|
647
|
+
return True
|
|
648
|
+
return False
|
|
649
|
+
|
|
650
|
+
|
|
617
651
|
def _list_release_versions(base_dir, include_history=False):
|
|
618
652
|
"""Return list of (major, minor, patch, path) under base_dir (optional HISTORY)."""
|
|
619
653
|
versions = []
|
|
@@ -760,6 +794,17 @@ def _prepare_release(pkg_dir, pkg_cfg):
|
|
|
760
794
|
existing.add(rel)
|
|
761
795
|
curr_hashes = {}
|
|
762
796
|
removed = set()
|
|
797
|
+
prev_existing = set()
|
|
798
|
+
if not reuse_active and prev_dir and os.path.isdir(prev_dir):
|
|
799
|
+
for base, _, names in os.walk(prev_dir):
|
|
800
|
+
for name in names:
|
|
801
|
+
if name in (_PKG_NOTE_NAME, _PKG_LIST_NAME):
|
|
802
|
+
continue
|
|
803
|
+
abspath = os.path.join(base, name)
|
|
804
|
+
if not os.path.isfile(abspath):
|
|
805
|
+
continue
|
|
806
|
+
rel = os.path.relpath(abspath, prev_dir)
|
|
807
|
+
prev_existing.add(rel)
|
|
763
808
|
|
|
764
809
|
for src, rel in entries:
|
|
765
810
|
baseline_hash = baseline_hashes.get(rel)
|
|
@@ -791,8 +836,11 @@ def _prepare_release(pkg_dir, pkg_cfg):
|
|
|
791
836
|
curr_hash = curr_hashes.get(rel)
|
|
792
837
|
if baseline_hash and curr_hash and baseline_hash == curr_hash:
|
|
793
838
|
removed.add(rel)
|
|
794
|
-
|
|
795
|
-
|
|
839
|
+
else:
|
|
840
|
+
if prev_existing:
|
|
841
|
+
removed = prev_existing - expected
|
|
842
|
+
elif not has_baseline:
|
|
843
|
+
removed = existing - expected
|
|
796
844
|
|
|
797
845
|
if (has_baseline or reuse_active) and not copied and not removed:
|
|
798
846
|
print("[update-pkg] no changes for %s; skipping release" % root)
|
|
@@ -1007,6 +1055,11 @@ def finalize_pkg_release(cfg, pkg_id):
|
|
|
1007
1055
|
continue
|
|
1008
1056
|
tar_path = _finalize_release_root(root_dir)
|
|
1009
1057
|
if tar_path:
|
|
1058
|
+
release_name = os.path.basename(tar_path).rsplit(".tar", 1)[0]
|
|
1059
|
+
history_target = os.path.join(root_dir, "HISTORY", release_name)
|
|
1060
|
+
note_path = os.path.join(history_target, _PKG_NOTE_NAME)
|
|
1061
|
+
note_text = _read_note_text(note_path) if os.path.isfile(note_path) else ""
|
|
1062
|
+
_update_release_history_note(pkg_id, name, release_name, note_text)
|
|
1010
1063
|
_sync_baseline_root(root_dir, grouped.get(name, []))
|
|
1011
1064
|
finalized.append(tar_path)
|
|
1012
1065
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pkgmgr-kunrunic
|
|
3
|
-
Version: 0.1.1.
|
|
3
|
+
Version: 0.1.1.dev9
|
|
4
4
|
Summary: Package management workflow scaffold.
|
|
5
5
|
Author: pkgmgr maintainers
|
|
6
6
|
License: MIT License
|
|
@@ -46,6 +46,10 @@ Requires-Python: >=3.6
|
|
|
46
46
|
Description-Content-Type: text/markdown
|
|
47
47
|
License-File: LICENSE
|
|
48
48
|
Requires-Dist: pyyaml>=6.0
|
|
49
|
+
Requires-Dist: openpyxl<3.2,>=3.0; python_version < "3.8"
|
|
50
|
+
Requires-Dist: openpyxl>=3.1; python_version >= "3.8"
|
|
51
|
+
Requires-Dist: python-docx<1.0,>=0.8.11; python_version < "3.8"
|
|
52
|
+
Requires-Dist: python-docx>=1.1; python_version >= "3.8"
|
|
49
53
|
Dynamic: license-file
|
|
50
54
|
|
|
51
55
|
# pkgmgr
|
|
@@ -89,12 +89,19 @@ def _copy_release_tars(release_root, dest_state_root, allowed_pkg_ids=None):
|
|
|
89
89
|
shutil.copy2(src, dest_tar)
|
|
90
90
|
|
|
91
91
|
|
|
92
|
-
def
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
92
|
+
def _list_readmes(pkg_dir):
|
|
93
|
+
readmes = {}
|
|
94
|
+
root_readme = os.path.join(pkg_dir, "README.txt")
|
|
95
|
+
if os.path.isfile(root_readme):
|
|
96
|
+
readmes["root"] = root_readme
|
|
97
|
+
for name in os.listdir(pkg_dir):
|
|
98
|
+
subdir = os.path.join(pkg_dir, name)
|
|
99
|
+
if not os.path.isdir(subdir):
|
|
100
|
+
continue
|
|
101
|
+
candidate = os.path.join(subdir, "README.txt")
|
|
102
|
+
if os.path.isfile(candidate):
|
|
103
|
+
readmes[name] = candidate
|
|
104
|
+
return readmes
|
|
98
105
|
|
|
99
106
|
|
|
100
107
|
def _copy_readme_files(release_root, dest_state_root, system_name, allowed_pkg_ids=None):
|
|
@@ -109,14 +116,15 @@ def _copy_readme_files(release_root, dest_state_root, system_name, allowed_pkg_i
|
|
|
109
116
|
continue
|
|
110
117
|
if allowed_pkg_ids is not None and name not in allowed_pkg_ids:
|
|
111
118
|
continue
|
|
112
|
-
|
|
113
|
-
if not
|
|
119
|
+
readmes = _list_readmes(pkg_dir)
|
|
120
|
+
if not readmes:
|
|
114
121
|
continue
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
os.
|
|
119
|
-
|
|
122
|
+
for root, src in readmes.items():
|
|
123
|
+
dest_readme = os.path.join(pkg_root, name, "readme", root, "README.txt")
|
|
124
|
+
dest_parent = os.path.dirname(dest_readme)
|
|
125
|
+
if not os.path.exists(dest_parent):
|
|
126
|
+
os.makedirs(dest_parent)
|
|
127
|
+
shutil.copy2(src, dest_readme)
|
|
120
128
|
|
|
121
129
|
|
|
122
130
|
def export_pkgstore(src, dest, clean=False, release_root=None, system_name=None):
|
|
@@ -33,6 +33,10 @@ classifiers = [
|
|
|
33
33
|
]
|
|
34
34
|
dependencies = [
|
|
35
35
|
"pyyaml>=6.0",
|
|
36
|
+
"openpyxl>=3.0,<3.2; python_version<'3.8'",
|
|
37
|
+
"openpyxl>=3.1; python_version>='3.8'",
|
|
38
|
+
"python-docx>=0.8.11,<1.0; python_version<'3.8'",
|
|
39
|
+
"python-docx>=1.1; python_version>='3.8'",
|
|
36
40
|
]
|
|
37
41
|
dynamic = ["version"]
|
|
38
42
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
pyyaml>=6.0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pkgmgr_kunrunic-0.1.1.dev7 → pkgmgr_kunrunic-0.1.1.dev9}/pkgmgr/templates/pkgmgr.yaml.sample
RENAMED
|
File without changes
|
|
File without changes
|
{pkgmgr_kunrunic-0.1.1.dev7 → pkgmgr_kunrunic-0.1.1.dev9}/pkgmgr_kunrunic.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{pkgmgr_kunrunic-0.1.1.dev7 → pkgmgr_kunrunic-0.1.1.dev9}/pkgmgr_kunrunic.egg-info/entry_points.txt
RENAMED
|
File without changes
|
{pkgmgr_kunrunic-0.1.1.dev7 → pkgmgr_kunrunic-0.1.1.dev9}/pkgmgr_kunrunic.egg-info/not-zip-safe
RENAMED
|
File without changes
|
{pkgmgr_kunrunic-0.1.1.dev7 → pkgmgr_kunrunic-0.1.1.dev9}/pkgmgr_kunrunic.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|