pkgmgr-kunrunic 0.1.1.dev8__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.
Files changed (36) hide show
  1. {pkgmgr_kunrunic-0.1.1.dev8/pkgmgr_kunrunic.egg-info → pkgmgr_kunrunic-0.1.1.dev9}/PKG-INFO +5 -1
  2. {pkgmgr_kunrunic-0.1.1.dev8 → pkgmgr_kunrunic-0.1.1.dev9}/pkgmgr/__init__.py +1 -1
  3. {pkgmgr_kunrunic-0.1.1.dev8 → pkgmgr_kunrunic-0.1.1.dev9}/pkgmgr/release.py +16 -2
  4. {pkgmgr_kunrunic-0.1.1.dev8 → pkgmgr_kunrunic-0.1.1.dev9/pkgmgr_kunrunic.egg-info}/PKG-INFO +5 -1
  5. pkgmgr_kunrunic-0.1.1.dev9/pkgmgr_kunrunic.egg-info/requires.txt +9 -0
  6. {pkgmgr_kunrunic-0.1.1.dev8 → pkgmgr_kunrunic-0.1.1.dev9}/plugin/export_pkgstore.py +21 -13
  7. {pkgmgr_kunrunic-0.1.1.dev8 → pkgmgr_kunrunic-0.1.1.dev9}/pyproject.toml +4 -0
  8. pkgmgr_kunrunic-0.1.1.dev8/pkgmgr_kunrunic.egg-info/requires.txt +0 -1
  9. {pkgmgr_kunrunic-0.1.1.dev8 → pkgmgr_kunrunic-0.1.1.dev9}/LICENSE +0 -0
  10. {pkgmgr_kunrunic-0.1.1.dev8 → pkgmgr_kunrunic-0.1.1.dev9}/README.md +0 -0
  11. {pkgmgr_kunrunic-0.1.1.dev8 → pkgmgr_kunrunic-0.1.1.dev9}/pkgmgr/__main__.py +0 -0
  12. {pkgmgr_kunrunic-0.1.1.dev8 → pkgmgr_kunrunic-0.1.1.dev9}/pkgmgr/cli.py +0 -0
  13. {pkgmgr_kunrunic-0.1.1.dev8 → pkgmgr_kunrunic-0.1.1.dev9}/pkgmgr/collectors/__init__.py +0 -0
  14. {pkgmgr_kunrunic-0.1.1.dev8 → pkgmgr_kunrunic-0.1.1.dev9}/pkgmgr/collectors/base.py +0 -0
  15. {pkgmgr_kunrunic-0.1.1.dev8 → pkgmgr_kunrunic-0.1.1.dev9}/pkgmgr/collectors/checksums.py +0 -0
  16. {pkgmgr_kunrunic-0.1.1.dev8 → pkgmgr_kunrunic-0.1.1.dev9}/pkgmgr/config.py +0 -0
  17. {pkgmgr_kunrunic-0.1.1.dev8 → pkgmgr_kunrunic-0.1.1.dev9}/pkgmgr/points.py +0 -0
  18. {pkgmgr_kunrunic-0.1.1.dev8 → pkgmgr_kunrunic-0.1.1.dev9}/pkgmgr/shell_integration.py +0 -0
  19. {pkgmgr_kunrunic-0.1.1.dev8 → pkgmgr_kunrunic-0.1.1.dev9}/pkgmgr/snapshot.py +0 -0
  20. {pkgmgr_kunrunic-0.1.1.dev8 → pkgmgr_kunrunic-0.1.1.dev9}/pkgmgr/templates/pkg.yaml.sample +0 -0
  21. {pkgmgr_kunrunic-0.1.1.dev8 → pkgmgr_kunrunic-0.1.1.dev9}/pkgmgr/templates/pkgmgr.yaml.sample +0 -0
  22. {pkgmgr_kunrunic-0.1.1.dev8 → pkgmgr_kunrunic-0.1.1.dev9}/pkgmgr/watch.py +0 -0
  23. {pkgmgr_kunrunic-0.1.1.dev8 → pkgmgr_kunrunic-0.1.1.dev9}/pkgmgr_kunrunic.egg-info/SOURCES.txt +0 -0
  24. {pkgmgr_kunrunic-0.1.1.dev8 → pkgmgr_kunrunic-0.1.1.dev9}/pkgmgr_kunrunic.egg-info/dependency_links.txt +0 -0
  25. {pkgmgr_kunrunic-0.1.1.dev8 → pkgmgr_kunrunic-0.1.1.dev9}/pkgmgr_kunrunic.egg-info/entry_points.txt +0 -0
  26. {pkgmgr_kunrunic-0.1.1.dev8 → pkgmgr_kunrunic-0.1.1.dev9}/pkgmgr_kunrunic.egg-info/not-zip-safe +0 -0
  27. {pkgmgr_kunrunic-0.1.1.dev8 → pkgmgr_kunrunic-0.1.1.dev9}/pkgmgr_kunrunic.egg-info/top_level.txt +0 -0
  28. {pkgmgr_kunrunic-0.1.1.dev8 → pkgmgr_kunrunic-0.1.1.dev9}/plugin/export_cksum.py +0 -0
  29. {pkgmgr_kunrunic-0.1.1.dev8 → pkgmgr_kunrunic-0.1.1.dev9}/plugin/export_source_review.py +0 -0
  30. {pkgmgr_kunrunic-0.1.1.dev8 → pkgmgr_kunrunic-0.1.1.dev9}/setup.cfg +0 -0
  31. {pkgmgr_kunrunic-0.1.1.dev8 → pkgmgr_kunrunic-0.1.1.dev9}/tests/test_cli_install.py +0 -0
  32. {pkgmgr_kunrunic-0.1.1.dev8 → pkgmgr_kunrunic-0.1.1.dev9}/tests/test_config.py +0 -0
  33. {pkgmgr_kunrunic-0.1.1.dev8 → pkgmgr_kunrunic-0.1.1.dev9}/tests/test_progress.py +0 -0
  34. {pkgmgr_kunrunic-0.1.1.dev8 → pkgmgr_kunrunic-0.1.1.dev9}/tests/test_release.py +0 -0
  35. {pkgmgr_kunrunic-0.1.1.dev8 → pkgmgr_kunrunic-0.1.1.dev9}/tests/test_snapshot.py +0 -0
  36. {pkgmgr_kunrunic-0.1.1.dev8 → 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.dev8
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
@@ -13,4 +13,4 @@ __all__ = [
13
13
  "points",
14
14
  ]
15
15
 
16
- __version__ = "0.1.1.dev8"
16
+ __version__ = "0.1.1.dev9"
@@ -794,6 +794,17 @@ def _prepare_release(pkg_dir, pkg_cfg):
794
794
  existing.add(rel)
795
795
  curr_hashes = {}
796
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)
797
808
 
798
809
  for src, rel in entries:
799
810
  baseline_hash = baseline_hashes.get(rel)
@@ -825,8 +836,11 @@ def _prepare_release(pkg_dir, pkg_cfg):
825
836
  curr_hash = curr_hashes.get(rel)
826
837
  if baseline_hash and curr_hash and baseline_hash == curr_hash:
827
838
  removed.add(rel)
828
- elif not has_baseline:
829
- removed = existing - expected
839
+ else:
840
+ if prev_existing:
841
+ removed = prev_existing - expected
842
+ elif not has_baseline:
843
+ removed = existing - expected
830
844
 
831
845
  if (has_baseline or reuse_active) and not copied and not removed:
832
846
  print("[update-pkg] no changes for %s; skipping release" % root)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pkgmgr-kunrunic
3
- Version: 0.1.1.dev8
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
@@ -0,0 +1,9 @@
1
+ pyyaml>=6.0
2
+
3
+ [:python_version < "3.8"]
4
+ openpyxl<3.2,>=3.0
5
+ python-docx<1.0,>=0.8.11
6
+
7
+ [:python_version >= "3.8"]
8
+ openpyxl>=3.1
9
+ python-docx>=1.1
@@ -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 _find_readme(pkg_dir):
93
- for base, _, files in os.walk(pkg_dir):
94
- for fname in files:
95
- if fname.lower() == "readme.txt":
96
- return os.path.join(base, fname)
97
- return None
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
- candidate = _find_readme(pkg_dir)
113
- if not candidate:
119
+ readmes = _list_readmes(pkg_dir)
120
+ if not readmes:
114
121
  continue
115
- dest_readme = os.path.join(pkg_root, name, "readme", "README.txt")
116
- dest_parent = os.path.dirname(dest_readme)
117
- if not os.path.exists(dest_parent):
118
- os.makedirs(dest_parent)
119
- shutil.copy2(candidate, dest_readme)
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