proj-flow 0.20.2__py3-none-any.whl → 0.20.3__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 +1 -1
- proj_flow/api/env.py +4 -0
- proj_flow/base/matrix.py +23 -0
- proj_flow/ext/github/cli.py +5 -0
- proj_flow/flow/configs.py +16 -1
- {proj_flow-0.20.2.dist-info → proj_flow-0.20.3.dist-info}/METADATA +1 -1
- {proj_flow-0.20.2.dist-info → proj_flow-0.20.3.dist-info}/RECORD +10 -10
- {proj_flow-0.20.2.dist-info → proj_flow-0.20.3.dist-info}/WHEEL +0 -0
- {proj_flow-0.20.2.dist-info → proj_flow-0.20.3.dist-info}/entry_points.txt +0 -0
- {proj_flow-0.20.2.dist-info → proj_flow-0.20.3.dist-info}/licenses/LICENSE +0 -0
proj_flow/__init__.py
CHANGED
proj_flow/api/env.py
CHANGED
|
@@ -253,6 +253,10 @@ class FlowConfig:
|
|
|
253
253
|
def postproc_exclude(self) -> List[dict]:
|
|
254
254
|
return self.postproc.get("exclude", [])
|
|
255
255
|
|
|
256
|
+
@property
|
|
257
|
+
def postproc_include(self) -> List[dict]:
|
|
258
|
+
return self.postproc.get("include", [])
|
|
259
|
+
|
|
256
260
|
@property
|
|
257
261
|
def shortcuts(self) -> Dict[str, dict]:
|
|
258
262
|
return self._cfg.get("shortcuts", {})
|
proj_flow/base/matrix.py
CHANGED
|
@@ -86,6 +86,29 @@ def matches(tested: dict, test: dict) -> bool:
|
|
|
86
86
|
return True
|
|
87
87
|
|
|
88
88
|
|
|
89
|
+
def partially_matches(tested: dict, test: dict) -> bool:
|
|
90
|
+
"""
|
|
91
|
+
Checks, if the tested dictionary contains some of the values from test
|
|
92
|
+
dictionary, with non-zero intersection between both dictionaries.
|
|
93
|
+
|
|
94
|
+
:param tested: Dictionary to check
|
|
95
|
+
:param test: Dictionary to check against
|
|
96
|
+
|
|
97
|
+
:returns: `True`, if all keys from `test` are in `tested` and have the same
|
|
98
|
+
values, `False` otherwise.
|
|
99
|
+
"""
|
|
100
|
+
|
|
101
|
+
intersection_size = 0
|
|
102
|
+
for key, value in test.items():
|
|
103
|
+
if key not in tested:
|
|
104
|
+
continue
|
|
105
|
+
val = tested.get(key)
|
|
106
|
+
if val != value:
|
|
107
|
+
return False
|
|
108
|
+
intersection_size += 1
|
|
109
|
+
return intersection_size > 0
|
|
110
|
+
|
|
111
|
+
|
|
89
112
|
def matches_any(tested: dict, tests: List[dict]):
|
|
90
113
|
"""
|
|
91
114
|
Checks, if the tested dictionary contains all the values from at least one
|
proj_flow/ext/github/cli.py
CHANGED
|
@@ -32,6 +32,9 @@ def github():
|
|
|
32
32
|
|
|
33
33
|
@arg.command("github", "matrix")
|
|
34
34
|
def matrix(
|
|
35
|
+
pretty: typing.Annotated[
|
|
36
|
+
bool, arg.FlagArgument(help="Indent JSON document")
|
|
37
|
+
],
|
|
35
38
|
official: typing.Annotated[
|
|
36
39
|
bool, arg.FlagArgument(help="Cut matrix to release builds only")
|
|
37
40
|
],
|
|
@@ -60,6 +63,8 @@ def matrix(
|
|
|
60
63
|
print(f"matrix={var}", file=github_output)
|
|
61
64
|
else:
|
|
62
65
|
print(f"matrix={var}")
|
|
66
|
+
elif pretty:
|
|
67
|
+
json.dump(usable, sys.stdout, indent=2)
|
|
63
68
|
else:
|
|
64
69
|
json.dump(usable, sys.stdout)
|
|
65
70
|
|
proj_flow/flow/configs.py
CHANGED
|
@@ -9,6 +9,7 @@ using ``-D`` switches.
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
import argparse
|
|
12
|
+
import copy
|
|
12
13
|
import datetime
|
|
13
14
|
import os
|
|
14
15
|
import sys
|
|
@@ -152,6 +153,19 @@ def _load_flow_data(rt: env.Runtime):
|
|
|
152
153
|
return configs, keys
|
|
153
154
|
|
|
154
155
|
|
|
156
|
+
def _apply_postproc_includes(config: dict, postproc_include: List[dict]):
|
|
157
|
+
clone = copy.deepcopy(config)
|
|
158
|
+
for ext in postproc_include:
|
|
159
|
+
if not matrix.partially_matches(config, ext):
|
|
160
|
+
continue
|
|
161
|
+
|
|
162
|
+
for key, value in ext.items():
|
|
163
|
+
if key in config:
|
|
164
|
+
continue
|
|
165
|
+
clone[key] = value
|
|
166
|
+
return clone
|
|
167
|
+
|
|
168
|
+
|
|
155
169
|
class Configs:
|
|
156
170
|
usable: List[env.Config] = []
|
|
157
171
|
|
|
@@ -186,8 +200,9 @@ class Configs:
|
|
|
186
200
|
)
|
|
187
201
|
|
|
188
202
|
postproc_exclude = rt.postproc_exclude
|
|
203
|
+
postproc_include = rt.postproc_include
|
|
189
204
|
usable = [
|
|
190
|
-
config
|
|
205
|
+
_apply_postproc_includes(config, postproc_include)
|
|
191
206
|
for config in turned
|
|
192
207
|
if len(postproc_exclude) == 0
|
|
193
208
|
or not matrix.matches_any(config, postproc_exclude)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: proj-flow
|
|
3
|
-
Version: 0.20.
|
|
3
|
+
Version: 0.20.3
|
|
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,11 +1,11 @@
|
|
|
1
|
-
proj_flow/__init__.py,sha256=
|
|
1
|
+
proj_flow/__init__.py,sha256=ngosVXJXC6NPzy7Jrvy_GEmyLLNcMeHljXRL0gpxsKc,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
|
|
5
5
|
proj_flow/api/arg.py,sha256=3XqPAucon0k3yyYsqzSp7X9HGMZ_sNJNo8Z4hf-0erY,5275
|
|
6
6
|
proj_flow/api/completers.py,sha256=NapNVu6QAQ_iF6dqcAzOV5kDHKD9MAMVX209Bklq-Mw,2464
|
|
7
7
|
proj_flow/api/ctx.py,sha256=IJu0q0Chivo6b2M4MKkAlV09oi7Cn9VxtDFeAeL_tnc,6646
|
|
8
|
-
proj_flow/api/env.py,sha256=
|
|
8
|
+
proj_flow/api/env.py,sha256=Ns0XBklOOEmMfo6Bt45XpfG3kqxA1W0rF28-Qu8SADE,12787
|
|
9
9
|
proj_flow/api/init.py,sha256=p4ZDGfq6fw4bXbJu2iq0vEmVxbS7nALIhZfe-XnEs44,565
|
|
10
10
|
proj_flow/api/makefile.py,sha256=q0fBSsWTWfR5YwunwiRjWJKtiLeHdSKUgUTEgo5I7dE,3863
|
|
11
11
|
proj_flow/api/release.py,sha256=IM4axJ6dfyilCmpwL_Z8q43XGKsfHaPoMAdqSziwT7s,2810
|
|
@@ -14,7 +14,7 @@ proj_flow/base/__cmake_version__.py,sha256=imja0GnhpBvS8Crz-64eOUKhc4i6FeRrjBGRB
|
|
|
14
14
|
proj_flow/base/__init__.py,sha256=V6IFRRtwxzvHuvtog6LIG9_6oivNpdcR5UmGobypvTo,930
|
|
15
15
|
proj_flow/base/cmd.py,sha256=XJk_r4Nlq_2XGgD_w92Us4WKwItmQAB8QWdT1pKxUFA,1746
|
|
16
16
|
proj_flow/base/inspect.py,sha256=lt5P19rvSZ-wMCTrCYAaQFCt2S9fUjEQXlrKK-Tmvwc,2786
|
|
17
|
-
proj_flow/base/matrix.py,sha256=
|
|
17
|
+
proj_flow/base/matrix.py,sha256=kH2BB6JRrLYdR71VJiJp58zfQSazwEOeiRXOPrayAcI,8446
|
|
18
18
|
proj_flow/base/name_list.py,sha256=KiHSnbDgYplJc25O3EehYhFAhD7Z3mHVAK6UYOdg5PQ,416
|
|
19
19
|
proj_flow/base/plugins.py,sha256=evn2Dym_NeoBaIZAu2YUtRd--15PCFpHD0h5zSsWkQE,978
|
|
20
20
|
proj_flow/base/registry.py,sha256=zbkB9KNfHnyPtzOurdvjwt714jrFpGHyOqeZL5sMvzI,3745
|
|
@@ -35,7 +35,7 @@ proj_flow/ext/cplusplus/cmake/steps.py,sha256=MnxPTR9tD2O8_DaRSe-fkvkpoM-DZc2zqt
|
|
|
35
35
|
proj_flow/ext/cplusplus/conan/__init__.py,sha256=Fv839SWsKPWMZs9ox9T-bofZ4xDJXOI5UfWKQkm0Vtg,1924
|
|
36
36
|
proj_flow/ext/cplusplus/conan/_conan.py,sha256=9xnji-f8uN7huXLqavVBUDC33CgnjBIyZX6wVcGm2RA,3352
|
|
37
37
|
proj_flow/ext/github/__init__.py,sha256=Mgx19YS6SYBXYB66_pOgIgwuB2WKRxqp5UGutq0B9Xk,282
|
|
38
|
-
proj_flow/ext/github/cli.py,sha256=
|
|
38
|
+
proj_flow/ext/github/cli.py,sha256=zUkRb38_hHj165oxkFdxOX-NJfhg1UN_GFPQPo_lmWc,6455
|
|
39
39
|
proj_flow/ext/github/hosting.py,sha256=3iW8QjeJk7MyqKNbv92nB-5a_Yn_B5_eEIlw_cdgUT0,519
|
|
40
40
|
proj_flow/ext/github/publishing.py,sha256=5dUNFq47X_g9vo25R3lQRkSjV2IiAm2zkIhNe8gLDKs,1921
|
|
41
41
|
proj_flow/ext/github/switches.py,sha256=Y3pqJdiHYLoveCQtqZqELR84Phb2YF4u5y78TU7n2CQ,752
|
|
@@ -73,7 +73,7 @@ proj_flow/ext/webidl/model/__init__.py,sha256=VJs_ODnF7-8DE0MbYKX-Bs-JDNqHgGdMkk
|
|
|
73
73
|
proj_flow/ext/webidl/model/ast.py,sha256=_CzJPAarYruonVbK6mxfUc7MgFoxFDpXWjX4OEkOp3M,19238
|
|
74
74
|
proj_flow/ext/webidl/model/builders.py,sha256=Ukjyhn4yJrSlU01P8VkLf0TE0kLqKlYw2KlyATceOpo,7665
|
|
75
75
|
proj_flow/flow/__init__.py,sha256=5Zo97zJsR7HMbl64jeMB9PbUuxCxpOlNuLmo3apWSVU,277
|
|
76
|
-
proj_flow/flow/configs.py,sha256=
|
|
76
|
+
proj_flow/flow/configs.py,sha256=zg32AXal2qbVOG6ToTfD05CTwRwt5rwF8yd-9UuB1nc,6999
|
|
77
77
|
proj_flow/flow/layer.py,sha256=IUANtCSOvlfzNSnq0VDdGdaXfB70Yr-rDGFxPDQTmpg,6187
|
|
78
78
|
proj_flow/flow/steps.py,sha256=PN_C_B6vNvqOsjpDpa5ESvH30Sc6RM1fSSqWqXgqg-4,2804
|
|
79
79
|
proj_flow/log/__init__.py,sha256=02EIgasE-K7mmbbNiIdX0IebWQMp2Co_D6H4ZBhJgcs,365
|
|
@@ -160,8 +160,8 @@ proj_flow/template/licenses/MIT.mustache,sha256=NncPoQaNsuy-WmRmboik3fyhJJ8m5pc2
|
|
|
160
160
|
proj_flow/template/licenses/Unlicense.mustache,sha256=awOCsWJ58m_2kBQwBUGWejVqZm6wuRtCL2hi9rfa0X4,1211
|
|
161
161
|
proj_flow/template/licenses/WTFPL.mustache,sha256=lvF4V_PrKKfZPa2TC8CZo8tlqaKvs3Bpv9G6XsWWQ4k,483
|
|
162
162
|
proj_flow/template/licenses/Zlib.mustache,sha256=uIj-mhSjes2HJ3rRapyy2ALflKRz4xQgS4mVM9827C0,868
|
|
163
|
-
proj_flow-0.20.
|
|
164
|
-
proj_flow-0.20.
|
|
165
|
-
proj_flow-0.20.
|
|
166
|
-
proj_flow-0.20.
|
|
167
|
-
proj_flow-0.20.
|
|
163
|
+
proj_flow-0.20.3.dist-info/METADATA,sha256=j0vuyq16Bh2qoW4ECd-sPR3xQbrIK6aBZM9UHBHw3io,3035
|
|
164
|
+
proj_flow-0.20.3.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
165
|
+
proj_flow-0.20.3.dist-info/entry_points.txt,sha256=d_OmGKZzpY7FCWz0sZ4wnBAPZC75oMEzTgJZWtpDELo,49
|
|
166
|
+
proj_flow-0.20.3.dist-info/licenses/LICENSE,sha256=vpOQJ5QlrTedF3coEWvA4wJzVJH304f66ZitR7Od4iU,1068
|
|
167
|
+
proj_flow-0.20.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|