proj-flow 0.15.1__py3-none-any.whl → 0.15.2__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/flow/layer.py +19 -2
- proj_flow/minimal/base.py +15 -1
- proj_flow/minimal/init.py +3 -0
- proj_flow/template/layers/base.json +1 -0
- {proj_flow-0.15.1.dist-info → proj_flow-0.15.2.dist-info}/METADATA +1 -1
- {proj_flow-0.15.1.dist-info → proj_flow-0.15.2.dist-info}/RECORD +10 -10
- {proj_flow-0.15.1.dist-info → proj_flow-0.15.2.dist-info}/WHEEL +0 -0
- {proj_flow-0.15.1.dist-info → proj_flow-0.15.2.dist-info}/entry_points.txt +0 -0
- {proj_flow-0.15.1.dist-info → proj_flow-0.15.2.dist-info}/licenses/LICENSE +0 -0
proj_flow/__init__.py
CHANGED
proj_flow/flow/layer.py
CHANGED
|
@@ -22,6 +22,7 @@ class FileInfo:
|
|
|
22
22
|
src: str
|
|
23
23
|
dst: str
|
|
24
24
|
is_mustache: bool
|
|
25
|
+
is_executable: bool
|
|
25
26
|
when: Optional[str] = None
|
|
26
27
|
|
|
27
28
|
@classmethod
|
|
@@ -32,12 +33,19 @@ class FileInfo:
|
|
|
32
33
|
json_file = cast(dict, filelist.get(key, {}))
|
|
33
34
|
path = cast(Optional[str], json_file.get("path"))
|
|
34
35
|
when = cast(Optional[str], json_file.get("when"))
|
|
36
|
+
is_executable = cast(bool, json_file.get("executable"))
|
|
35
37
|
dst = (
|
|
36
38
|
chevron.render(path, context).replace("/", os.sep)
|
|
37
39
|
if path is not None
|
|
38
40
|
else basename if is_mustache else src
|
|
39
41
|
)
|
|
40
|
-
return cls(
|
|
42
|
+
return cls(
|
|
43
|
+
src=src,
|
|
44
|
+
dst=dst,
|
|
45
|
+
is_mustache=is_mustache,
|
|
46
|
+
is_executable=is_executable,
|
|
47
|
+
when=when,
|
|
48
|
+
)
|
|
41
49
|
|
|
42
50
|
def template(self):
|
|
43
51
|
open_mstch = "{{"
|
|
@@ -71,6 +79,10 @@ class FileInfo:
|
|
|
71
79
|
else:
|
|
72
80
|
shutil.copy2(src, dst, follow_symlinks=False)
|
|
73
81
|
|
|
82
|
+
def get_git_checks(self):
|
|
83
|
+
if self.is_executable:
|
|
84
|
+
yield self
|
|
85
|
+
|
|
74
86
|
|
|
75
87
|
@dataclass
|
|
76
88
|
class LayerInfo:
|
|
@@ -149,6 +161,11 @@ class LayerInfo:
|
|
|
149
161
|
if not rt.silent:
|
|
150
162
|
print()
|
|
151
163
|
|
|
164
|
+
def get_git_checks(self):
|
|
165
|
+
for file in self.files:
|
|
166
|
+
for special in file.get_git_checks():
|
|
167
|
+
yield special
|
|
168
|
+
|
|
152
169
|
|
|
153
170
|
def copy_license(rt: env.Runtime, context: ctx.SettingsType):
|
|
154
171
|
license = path_get(context, "COPY.LICENSE")
|
|
@@ -159,7 +176,7 @@ def copy_license(rt: env.Runtime, context: ctx.SettingsType):
|
|
|
159
176
|
os.path.join(ctx.package_root, ctx.template_dir, "licenses")
|
|
160
177
|
)
|
|
161
178
|
license_file = f"{license}.mustache"
|
|
162
|
-
info = FileInfo(license_file, "LICENSE", is_mustache=True)
|
|
179
|
+
info = FileInfo(license_file, "LICENSE", is_mustache=True, is_executable=False)
|
|
163
180
|
info.run(licenses_dir, rt, context)
|
|
164
181
|
|
|
165
182
|
|
proj_flow/minimal/base.py
CHANGED
|
@@ -7,11 +7,14 @@ new projects.
|
|
|
7
7
|
"""
|
|
8
8
|
|
|
9
9
|
import sys
|
|
10
|
+
from typing import List
|
|
10
11
|
|
|
11
12
|
from proj_flow import __version__, api
|
|
12
|
-
|
|
13
|
+
from proj_flow.flow import layer
|
|
13
14
|
|
|
14
15
|
class GitInit(api.init.InitStep):
|
|
16
|
+
layers: List[layer.LayerInfo] = []
|
|
17
|
+
|
|
15
18
|
def priority(self):
|
|
16
19
|
return sys.maxsize
|
|
17
20
|
|
|
@@ -24,6 +27,17 @@ class GitInit(api.init.InitStep):
|
|
|
24
27
|
|
|
25
28
|
git("init")
|
|
26
29
|
git("add", ".")
|
|
30
|
+
|
|
31
|
+
executables: List[str] = []
|
|
32
|
+
|
|
33
|
+
for fs_layer in GitInit.layers:
|
|
34
|
+
for info in fs_layer.get_git_checks():
|
|
35
|
+
if info.is_executable:
|
|
36
|
+
executables.append(info.dst)
|
|
37
|
+
|
|
38
|
+
if len(executables):
|
|
39
|
+
git("update-index", "--chmod=+x", *executables)
|
|
40
|
+
|
|
27
41
|
git("commit", "-m", "Initial commit")
|
|
28
42
|
|
|
29
43
|
|
proj_flow/minimal/init.py
CHANGED
|
@@ -15,6 +15,7 @@ import yaml
|
|
|
15
15
|
from proj_flow import dependency, flow
|
|
16
16
|
from proj_flow.api import arg, ctx, env, init
|
|
17
17
|
from proj_flow.base.name_list import name_list
|
|
18
|
+
from proj_flow.minimal import base
|
|
18
19
|
from proj_flow.project import api, interact
|
|
19
20
|
|
|
20
21
|
|
|
@@ -148,6 +149,8 @@ def main(
|
|
|
148
149
|
|
|
149
150
|
current_project.append_extensions(context)
|
|
150
151
|
|
|
152
|
+
base.GitInit.layers = layers
|
|
153
|
+
|
|
151
154
|
steps = sorted((step.priority(), i, step) for i, step in enumerate(init.__steps))
|
|
152
155
|
for _, _, step in steps:
|
|
153
156
|
step.postprocess(rt, context)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: proj-flow
|
|
3
|
-
Version: 0.15.
|
|
3
|
+
Version: 0.15.2
|
|
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=
|
|
1
|
+
proj_flow/__init__.py,sha256=Iu3RgtFfoUNiC9ODO4gMyTUFoRfTFtjp9jZCz_zwgDw,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
|
|
@@ -47,7 +47,7 @@ proj_flow/ext/sign/api.py,sha256=l5SO5RHiHTwxg0aexkGOfApRdojWDcIBY_cfbKSKsC0,228
|
|
|
47
47
|
proj_flow/ext/sign/win32.py,sha256=yMAmO-DdIWZdOi_NxycRym8XM9WIsrWKtFANdIwthJ4,4968
|
|
48
48
|
proj_flow/flow/__init__.py,sha256=5Zo97zJsR7HMbl64jeMB9PbUuxCxpOlNuLmo3apWSVU,277
|
|
49
49
|
proj_flow/flow/configs.py,sha256=PQZ5pLPmWwHJtSWmuy04bsnO-VvfWcJyP_UyKjiaG1g,6535
|
|
50
|
-
proj_flow/flow/layer.py,sha256=
|
|
50
|
+
proj_flow/flow/layer.py,sha256=IUANtCSOvlfzNSnq0VDdGdaXfB70Yr-rDGFxPDQTmpg,6187
|
|
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
|
|
53
53
|
proj_flow/log/commit.py,sha256=PojQX1hpVlViKQWa7mUmVOM2_VuprxuEWZev5DiGvcY,14097
|
|
@@ -63,9 +63,9 @@ proj_flow/log/rich_text/api.py,sha256=PCSAGwkmDUMoVlpN7BDsgIA1AiMZEC0H6TUZXpr_Mg
|
|
|
63
63
|
proj_flow/log/rich_text/markdown.py,sha256=jBnNxxhBHzyIZ3Y4HXDfqpl7zlRbbKbKdwdnZwkmNAI,1623
|
|
64
64
|
proj_flow/log/rich_text/re_structured_text.py,sha256=DEl9KjBUF6cxfNWpQ7GVnHi7wKeuFnPGJwxQxjbCsnM,1823
|
|
65
65
|
proj_flow/minimal/__init__.py,sha256=Yv32uwmS5a9SXSjaMVK0xKla9sWtcA8QkJHt15ffhiU,354
|
|
66
|
-
proj_flow/minimal/base.py,sha256=
|
|
66
|
+
proj_flow/minimal/base.py,sha256=mE1Qf90fCYo2UjezESknVhUhxyxPNvS4wL_jbY2tF2M,1234
|
|
67
67
|
proj_flow/minimal/bootstrap.py,sha256=PcZfBsUmj8uDPGBC55iUgD5O7W4VSkpCQb6r9GEyAaQ,556
|
|
68
|
-
proj_flow/minimal/init.py,sha256=
|
|
68
|
+
proj_flow/minimal/init.py,sha256=Rx3wu2xDZQpaiU0vmNmsj1eS48DopvL023lB7eTf85A,4318
|
|
69
69
|
proj_flow/minimal/list.py,sha256=RlOqammE8olNKXsnbv1enF5uriu0MZ2wFbht37Z2ETw,4810
|
|
70
70
|
proj_flow/minimal/run.py,sha256=4qvGLqz2ayCZDvVBrq4tG094fjfcmDPon-xcGPQkM_U,4665
|
|
71
71
|
proj_flow/minimal/system.py,sha256=9FliH5TD103JYSAe2O5EU7hkOHDgVzTqu0Exxk-WrXE,1579
|
|
@@ -78,7 +78,7 @@ proj_flow/project/cplusplus/__init__.py,sha256=cBjTOL8unMiPBWx9QkY4-vahzlHXNVNAx
|
|
|
78
78
|
proj_flow/project/cplusplus/cmake_context.py,sha256=5W-BxQg9YBiEOFYX4XpPhwjP9UCQ1R8zOClTbgMLeyM,3203
|
|
79
79
|
proj_flow/project/cplusplus/conan_context.py,sha256=JGbLZ4Q_t1hf-s5W3-jCjhYpVcrsQAHebFWGprpsgkM,313
|
|
80
80
|
proj_flow/project/cplusplus/project.py,sha256=CmHwoNKJMBa3QmEQ8sqyGgXMR95YSAEGmHMKcXxS3mw,794
|
|
81
|
-
proj_flow/template/layers/base.json,sha256=
|
|
81
|
+
proj_flow/template/layers/base.json,sha256=pvoePI4v6NlOJ5IU88O94ReHTBZdVTt7t-dmyzLfaSE,54
|
|
82
82
|
proj_flow/template/layers/cmake.json,sha256=1i2owkZxo469MqnOuGXT301xF-9o02lzIs14NoMDkVY,385
|
|
83
83
|
proj_flow/template/layers/conan.json,sha256=q0jKtA-GmrXuY5sLngNUvqefR94r73ymXrRXa0l3mU0,29
|
|
84
84
|
proj_flow/template/layers/github_actions.json,sha256=aQyD1QYLjzAHeG4_p6sUwPcXs_kK_oTjoVaq6ODK16w,384
|
|
@@ -133,8 +133,8 @@ proj_flow/template/licenses/MIT.mustache,sha256=NncPoQaNsuy-WmRmboik3fyhJJ8m5pc2
|
|
|
133
133
|
proj_flow/template/licenses/Unlicense.mustache,sha256=awOCsWJ58m_2kBQwBUGWejVqZm6wuRtCL2hi9rfa0X4,1211
|
|
134
134
|
proj_flow/template/licenses/WTFPL.mustache,sha256=lvF4V_PrKKfZPa2TC8CZo8tlqaKvs3Bpv9G6XsWWQ4k,483
|
|
135
135
|
proj_flow/template/licenses/Zlib.mustache,sha256=uIj-mhSjes2HJ3rRapyy2ALflKRz4xQgS4mVM9827C0,868
|
|
136
|
-
proj_flow-0.15.
|
|
137
|
-
proj_flow-0.15.
|
|
138
|
-
proj_flow-0.15.
|
|
139
|
-
proj_flow-0.15.
|
|
140
|
-
proj_flow-0.15.
|
|
136
|
+
proj_flow-0.15.2.dist-info/METADATA,sha256=LzOSrMiyHcSSFH62BPjQvFytdqLTb8g0m6vmvG5ahtw,2980
|
|
137
|
+
proj_flow-0.15.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
138
|
+
proj_flow-0.15.2.dist-info/entry_points.txt,sha256=d_OmGKZzpY7FCWz0sZ4wnBAPZC75oMEzTgJZWtpDELo,49
|
|
139
|
+
proj_flow-0.15.2.dist-info/licenses/LICENSE,sha256=vpOQJ5QlrTedF3coEWvA4wJzVJH304f66ZitR7Od4iU,1068
|
|
140
|
+
proj_flow-0.15.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|