proj-flow 0.12.0__py3-none-any.whl → 0.13.0__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.
proj_flow/__init__.py CHANGED
@@ -6,4 +6,4 @@ The **proj_flow** contains only ``__version__`` to be updated, nothing more.
6
6
  This is in an attempt to make this module easy to load initially.
7
7
  """
8
8
 
9
- __version__ = "0.12.0"
9
+ __version__ = "0.13.0"
@@ -73,7 +73,7 @@ def release_cmd(
73
73
  typing.Optional[str],
74
74
  arg.Argument(
75
75
  help="Ignore the version change from changelog and instead use this value. "
76
- f"Allowed values are: {name_list(FORCED_LEVEL_CHOICES)}",
76
+ f"Allowed values are: {name_list(FORCED_LEVEL_CHOICES)}.",
77
77
  meta="level",
78
78
  choices=FORCED_LEVEL_CHOICES,
79
79
  ),
@@ -142,8 +142,8 @@ def publish(
142
142
  upload: typing.Annotated[
143
143
  typing.Optional[str],
144
144
  arg.Argument(
145
- help="If present, will upload files from the directory to "
146
- "the referenced release before publishing.",
145
+ help="If present, upload files from the directory to the referenced "
146
+ "release before publishing.",
147
147
  meta="directory",
148
148
  ),
149
149
  ],
proj_flow/flow/configs.py CHANGED
@@ -9,7 +9,9 @@ using ``-D`` switches.
9
9
 
10
10
 
11
11
  import argparse
12
+ import datetime
12
13
  import os
14
+ import sys
13
15
  from typing import Any, Callable, Dict, List
14
16
 
15
17
  from proj_flow.api import env
@@ -90,9 +92,43 @@ def _expand_one(config: dict, github_os: str, os_in_name: str):
90
92
  return config
91
93
 
92
94
 
95
+ __printed_lts_ubuntu_warning = False
96
+
97
+
98
+ def _ubuntu_lts(today=datetime.date.today(), lts_years=5):
99
+ year = today.year
100
+ for y in range(year - lts_years, year + 1):
101
+ if y % 2 != 0:
102
+ continue
103
+ release = datetime.date(y, 4, 1)
104
+ end_of_life = datetime.date(y + lts_years, 1, 31)
105
+ if release > today or end_of_life < today:
106
+ continue
107
+ yield f"ubuntu-{y % 100}.04"
108
+
109
+
110
+ def _lts_list(config: dict, lts_list: Dict[str, List[str]]):
111
+ os = config["os"]
112
+ raw = lts_list.get(os)
113
+ if os == "ubuntu":
114
+ if raw is not None:
115
+ global __printed_lts_ubuntu_warning
116
+ if not __printed_lts_ubuntu_warning:
117
+ __printed_lts_ubuntu_warning = True
118
+ print(
119
+ "\033[1;33m-- lts.ubuntu in config.yaml is deprecated; "
120
+ "please remove it, so it can be calculated base on "
121
+ "current date\033[m",
122
+ file=sys.stderr,
123
+ )
124
+ else:
125
+ raw = list(_ubuntu_lts())
126
+ return raw or []
127
+
128
+
93
129
  def _expand_config(config: dict, spread_lts: bool, lts_list: Dict[str, List[str]]):
94
130
  if spread_lts:
95
- spread = lts_list.get(config["os"], [])
131
+ spread = _lts_list(config, lts_list)
96
132
  if len(spread):
97
133
  return [
98
134
  _expand_one({key: config[key] for key in config}, lts, lts)
@@ -136,6 +172,11 @@ class Configs:
136
172
  # from commands/github
137
173
  spread_lts = hasattr(args, "matrix") and not not args.matrix
138
174
 
175
+ if not spread_lts:
176
+ # allow "run" to see the warning about "lts.ubuntu"
177
+ for config in configs:
178
+ _lts_list(config, rt.lts_list)
179
+
139
180
  turned = matrix.flatten(
140
181
  [
141
182
  _expand_config(config, spread_lts, rt.lts_list)
@@ -18,17 +18,9 @@ compiler:
18
18
  gcc: [ gcc, g++ ]
19
19
  os-default: { ubuntu: gcc, windows: msvc }
20
20
 
21
- lts:
22
- ubuntu:
23
- - ubuntu-20.04
24
- - ubuntu-22.04
25
- - ubuntu-24.04
26
-
27
21
  postproc:
28
22
  exclude:
29
- - { github_os: ubuntu-20.04, sanitizer: true }
30
23
  - { github_os: ubuntu-24.04, sanitizer: true }
31
- - { github_os: ubuntu-20.04, compiler: clang }
32
24
 
33
25
 
34
26
  shortcuts:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: proj-flow
3
- Version: 0.12.0
3
+ Version: 0.13.0
4
4
  Summary: C++ project maintenance, automated
5
5
  Project-URL: Changelog, https://github.com/mzdun/proj-flow/blob/main/CHANGELOG.rst
6
6
  Project-URL: Documentation, https://proj-flow.readthedocs.io/en/latest/
@@ -1,4 +1,4 @@
1
- proj_flow/__init__.py,sha256=Mf9UJykcCb4X0VYyQaxJUTbXNQ01iQ-O5RWYPP6Xi-E,277
1
+ proj_flow/__init__.py,sha256=PoVhsF_ytVKuTPOAxKexvO4PLPbqOZ9Qh4x4Zgd68jA,277
2
2
  proj_flow/__main__.py,sha256=HUar_qQ9Ndmchmryegtzu__5wukwCLrFN_SGRl5Ol_M,233
3
3
  proj_flow/dependency.py,sha256=CpcnR6El8AO9hlLc9lQtYQADYlkx3GMHlkLYbEAtdMI,4639
4
4
  proj_flow/api/__init__.py,sha256=gV2f6kll_5JXtvkGASvnx7CbOWr34PHOdck-4ce-qEk,378
@@ -34,7 +34,7 @@ proj_flow/ext/cplusplus/cmake/steps.py,sha256=IBxATzcJfDI5XibaKgXDnKDKPIaJM1fAJK
34
34
  proj_flow/ext/cplusplus/conan/__init__.py,sha256=Fv839SWsKPWMZs9ox9T-bofZ4xDJXOI5UfWKQkm0Vtg,1924
35
35
  proj_flow/ext/cplusplus/conan/_conan.py,sha256=9xnji-f8uN7huXLqavVBUDC33CgnjBIyZX6wVcGm2RA,3352
36
36
  proj_flow/ext/github/__init__.py,sha256=Mgx19YS6SYBXYB66_pOgIgwuB2WKRxqp5UGutq0B9Xk,282
37
- proj_flow/ext/github/cli.py,sha256=hTJ9UhZx4oZS-OWhG716emJjZpLqRIovpmHp5CcM4MU,6011
37
+ proj_flow/ext/github/cli.py,sha256=ZPLTPEjxQEWnxc5pZnb9Rj-P-PUH2kpkxIvC5c0f9zo,6007
38
38
  proj_flow/ext/github/hosting.py,sha256=3iW8QjeJk7MyqKNbv92nB-5a_Yn_B5_eEIlw_cdgUT0,519
39
39
  proj_flow/ext/github/publishing.py,sha256=5dUNFq47X_g9vo25R3lQRkSjV2IiAm2zkIhNe8gLDKs,1921
40
40
  proj_flow/ext/github/switches.py,sha256=g7O2hvrg4mHm3WSHYsRBhEDU0bIkEJgp4Qclhqxk0uI,421
@@ -46,7 +46,7 @@ proj_flow/ext/sign/__init__.py,sha256=b9AN1_BalPtVy7YLBjvGhLamTujHEKcZP7npgDDDuS
46
46
  proj_flow/ext/sign/api.py,sha256=l5SO5RHiHTwxg0aexkGOfApRdojWDcIBY_cfbKSKsC0,2286
47
47
  proj_flow/ext/sign/win32.py,sha256=yMAmO-DdIWZdOi_NxycRym8XM9WIsrWKtFANdIwthJ4,4968
48
48
  proj_flow/flow/__init__.py,sha256=5Zo97zJsR7HMbl64jeMB9PbUuxCxpOlNuLmo3apWSVU,277
49
- proj_flow/flow/configs.py,sha256=l-pIotrXFm4oMqqpuvKP-RdtlTmDDnK_izhTJfsWbhk,5260
49
+ proj_flow/flow/configs.py,sha256=PQZ5pLPmWwHJtSWmuy04bsnO-VvfWcJyP_UyKjiaG1g,6535
50
50
  proj_flow/flow/layer.py,sha256=6mvbhiOy9KcMP69Q9zew_7jGhf5Wqr7v-veS3YPGnmc,5720
51
51
  proj_flow/flow/steps.py,sha256=PN_C_B6vNvqOsjpDpa5ESvH30Sc6RM1fSSqWqXgqg-4,2804
52
52
  proj_flow/log/__init__.py,sha256=02EIgasE-K7mmbbNiIdX0IebWQMp2Co_D6H4ZBhJgcs,365
@@ -87,7 +87,7 @@ proj_flow/template/layers/base/.gitignore,sha256=2Cu5mL_7pSbC6gDHV9sZIJpzvEBuhHQ
87
87
  proj_flow/template/layers/base/README.md.mustache,sha256=toKfa5VQ23k8VKnsyogRojZZLfPakH8RHBzp0qpC-eY,43
88
88
  proj_flow/template/layers/base/flow,sha256=aPBLCgYNAZFl3FcP3HPwPnUxuRGxeV1Dp_6qFxDoGvk,196
89
89
  proj_flow/template/layers/base/flow.cmd,sha256=LQplRzLw4n86xvMXxOd1SzH2xJAN71Ou1uWsST8D6Ik,239
90
- proj_flow/template/layers/base/.flow/config.yml,sha256=7dc7u0FVBWP0nwOCzWNHEGeOM_APR467vyMuT_Mjfto,773
90
+ proj_flow/template/layers/base/.flow/config.yml,sha256=Q90Nm5qATsdKgYB7j2Y2aISc8uiuAYO6h5tx88AHQLE,598
91
91
  proj_flow/template/layers/base/.flow/flow.py.mustache,sha256=HxjPhBsVFZ5HYvozG2qjdjC6wmCXK3OgVgoLWqEFSJo,4972
92
92
  proj_flow/template/layers/base/.flow/matrix.yml,sha256=XgDC-F8YfeZEILBwHPkGNeRCxgaDK79f-JoWfHlVrgc,1257
93
93
  proj_flow/template/layers/base/.flow/official.yml,sha256=2nQgxoQJ5IAnPQVn50LrVD0B2p9KpLYSVz1b7IFu0Zc,71
@@ -131,8 +131,8 @@ proj_flow/template/licenses/MIT.mustache,sha256=NncPoQaNsuy-WmRmboik3fyhJJ8m5pc2
131
131
  proj_flow/template/licenses/Unlicense.mustache,sha256=awOCsWJ58m_2kBQwBUGWejVqZm6wuRtCL2hi9rfa0X4,1211
132
132
  proj_flow/template/licenses/WTFPL.mustache,sha256=lvF4V_PrKKfZPa2TC8CZo8tlqaKvs3Bpv9G6XsWWQ4k,483
133
133
  proj_flow/template/licenses/Zlib.mustache,sha256=uIj-mhSjes2HJ3rRapyy2ALflKRz4xQgS4mVM9827C0,868
134
- proj_flow-0.12.0.dist-info/METADATA,sha256=zhb6Ved7RWYcbf7vLuNfj13PB8h58AdNb-0pbX-n3rU,2868
135
- proj_flow-0.12.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
136
- proj_flow-0.12.0.dist-info/entry_points.txt,sha256=d_OmGKZzpY7FCWz0sZ4wnBAPZC75oMEzTgJZWtpDELo,49
137
- proj_flow-0.12.0.dist-info/licenses/LICENSE,sha256=vpOQJ5QlrTedF3coEWvA4wJzVJH304f66ZitR7Od4iU,1068
138
- proj_flow-0.12.0.dist-info/RECORD,,
134
+ proj_flow-0.13.0.dist-info/METADATA,sha256=BOrS-VjJkVokbE3OPUiRBmgImfsj9mRVMFG_Ux3tQOI,2868
135
+ proj_flow-0.13.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
136
+ proj_flow-0.13.0.dist-info/entry_points.txt,sha256=d_OmGKZzpY7FCWz0sZ4wnBAPZC75oMEzTgJZWtpDELo,49
137
+ proj_flow-0.13.0.dist-info/licenses/LICENSE,sha256=vpOQJ5QlrTedF3coEWvA4wJzVJH304f66ZitR7Od4iU,1068
138
+ proj_flow-0.13.0.dist-info/RECORD,,