ppqs 2.0.1__tar.gz → 2.0.2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ppqs
3
- Version: 2.0.1
3
+ Version: 2.0.2
4
4
  Summary: Python project quick scripts
5
5
  Author-email: Karl Wette <karl.wette@anu.edu.au>
6
6
  License-Expression: MIT
@@ -135,8 +135,8 @@ where:
135
135
  --help`. Default is `Run {name} script` where `name` is the script name.
136
136
 
137
137
  * `print-header` *(optional)*: If true, print a header before running each
138
- command in the script. The header consists of the command to be run, centred
139
- on the console and padded with `*`s. Default is false.
138
+ command in the script. The header consists of the script name and the command
139
+ to be run, centred on the console and padded with `*`s. Default is false.
140
140
 
141
141
  The default value of some options may be overridden in the
142
142
  `[tool.ppqs.defaults]` section, e.g.
@@ -119,8 +119,8 @@ where:
119
119
  --help`. Default is `Run {name} script` where `name` is the script name.
120
120
 
121
121
  * `print-header` *(optional)*: If true, print a header before running each
122
- command in the script. The header consists of the command to be run, centred
123
- on the console and padded with `*`s. Default is false.
122
+ command in the script. The header consists of the script name and the command
123
+ to be run, centred on the console and padded with `*`s. Default is false.
124
124
 
125
125
  The default value of some options may be overridden in the
126
126
  `[tool.ppqs.defaults]` section, e.g.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "ppqs"
7
- version = "2.0.1"
7
+ version = "2.0.2"
8
8
  description = "Python project quick scripts"
9
9
  authors = [
10
10
  { name = "Karl Wette", email = "karl.wette@anu.edu.au" },
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ppqs
3
- Version: 2.0.1
3
+ Version: 2.0.2
4
4
  Summary: Python project quick scripts
5
5
  Author-email: Karl Wette <karl.wette@anu.edu.au>
6
6
  License-Expression: MIT
@@ -135,8 +135,8 @@ where:
135
135
  --help`. Default is `Run {name} script` where `name` is the script name.
136
136
 
137
137
  * `print-header` *(optional)*: If true, print a header before running each
138
- command in the script. The header consists of the command to be run, centred
139
- on the console and padded with `*`s. Default is false.
138
+ command in the script. The header consists of the script name and the command
139
+ to be run, centred on the console and padded with `*`s. Default is false.
140
140
 
141
141
  The default value of some options may be overridden in the
142
142
  `[tool.ppqs.defaults]` section, e.g.
@@ -12,7 +12,7 @@ else: # pragma: no cover
12
12
  import tomli as tomllib
13
13
 
14
14
  __author__ = "Karl Wette"
15
- __version__ = "2.0.1"
15
+ __version__ = "2.0.2"
16
16
 
17
17
 
18
18
  class MissingPyProjectError(Exception):
@@ -202,7 +202,7 @@ def print_help(project_name, scripts):
202
202
  )
203
203
 
204
204
 
205
- def run_script(script, argv, cwd):
205
+ def run_script(script_name, script, argv, cwd):
206
206
  """
207
207
  Run a script.
208
208
  """
@@ -222,7 +222,7 @@ def run_script(script, argv, cwd):
222
222
  # Print header
223
223
  if script["print-header"]:
224
224
  cmd_str = " ".join(cmd)
225
- print(f" ppqs: {cmd_str} ".center(col_width, "*"), flush=True)
225
+ print(f" ppqs {script_name}: {cmd_str} ".center(col_width, "*"), flush=True)
226
226
 
227
227
  # Run command
228
228
  retn = subprocess.run(cmd, stdin=subprocess.DEVNULL, shell=False, cwd=cwd)
@@ -248,7 +248,7 @@ def regular_cli(argv):
248
248
  raise InvalidScriptError(pyproject_path, msg)
249
249
  else:
250
250
  cwd = pyproject_path.parent
251
- run_script(scripts[argv[0]], argv[1:], cwd)
251
+ run_script(argv[0], scripts[argv[0]], argv[1:], cwd)
252
252
 
253
253
 
254
254
  def cli(*argv):
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes