uv2compdb 0.3.0__tar.gz → 0.4.0__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: uv2compdb
3
- Version: 0.3.0
3
+ Version: 0.4.0
4
4
  Summary: Generate Compilation Database by parse Keil µVision project
5
5
  Keywords: keil,MDK,µVision,clangd,Compilation Database,compiled_commands.json
6
6
  Author: xbin
@@ -57,20 +57,23 @@ uv2compdb /path/to/project -t target -o /path/to/compile_commands.json
57
57
  ### Help
58
58
 
59
59
  ```sh
60
- usage: uv2compdb [-h] [-a ARGUMENTS] [-b] [-t TARGET] [-o OUTPUT] [-p] project
60
+ usage: uv2compdb [-h] [-v] [-a ARGUMENTS] [-b] [-t TARGET] [-o OUTPUT] [-p] project
61
61
 
62
62
  Generate compile_commands.json by parse Keil µVision project
63
63
 
64
64
  positional arguments:
65
65
  project path to .uvproj[x] file
66
66
 
67
- options:
67
+ optional arguments:
68
68
  -h, --help show this help message and exit
69
- -a, --arguments ARGUMENTS
69
+ -v, --version show version and exit
70
+ -a ARGUMENTS, --arguments ARGUMENTS
70
71
  add extra arguments
71
72
  -b, --build try to build while dep/build_log files don't not exist
72
- -t, --target TARGET target name
73
- -o, --output OUTPUT output dir/file path (default: compile_commands.json)
73
+ -t TARGET, --target TARGET
74
+ target name
75
+ -o OUTPUT, --output OUTPUT
76
+ output dir/file path (default: compile_commands.json)
74
77
  -p, --predefined try to add predefined macros
75
78
  ```
76
79
 
@@ -35,20 +35,23 @@ uv2compdb /path/to/project -t target -o /path/to/compile_commands.json
35
35
  ### Help
36
36
 
37
37
  ```sh
38
- usage: uv2compdb [-h] [-a ARGUMENTS] [-b] [-t TARGET] [-o OUTPUT] [-p] project
38
+ usage: uv2compdb [-h] [-v] [-a ARGUMENTS] [-b] [-t TARGET] [-o OUTPUT] [-p] project
39
39
 
40
40
  Generate compile_commands.json by parse Keil µVision project
41
41
 
42
42
  positional arguments:
43
43
  project path to .uvproj[x] file
44
44
 
45
- options:
45
+ optional arguments:
46
46
  -h, --help show this help message and exit
47
- -a, --arguments ARGUMENTS
47
+ -v, --version show version and exit
48
+ -a ARGUMENTS, --arguments ARGUMENTS
48
49
  add extra arguments
49
50
  -b, --build try to build while dep/build_log files don't not exist
50
- -t, --target TARGET target name
51
- -o, --output OUTPUT output dir/file path (default: compile_commands.json)
51
+ -t TARGET, --target TARGET
52
+ target name
53
+ -o OUTPUT, --output OUTPUT
54
+ output dir/file path (default: compile_commands.json)
52
55
  -p, --predefined try to add predefined macros
53
56
  ```
54
57
 
@@ -1,39 +1,39 @@
1
- [project]
2
- name = "uv2compdb"
3
- version = "0.3.0"
4
- description = "Generate Compilation Database by parse Keil µVision project"
5
- readme = "README.md"
6
- authors = [{ name = "xbin", email = "xbin.xu@qq.com" }]
7
- requires-python = ">=3.8"
8
- classifiers = [
9
- "Development Status :: 4 - Beta",
10
- "Environment :: Console",
11
- "Intended Audience :: Developers",
12
- "License :: OSI Approved :: MIT License",
13
- "Operating System :: OS Independent",
14
- "Programming Language :: Python :: 3",
15
- "Topic :: Software Development :: Embedded Systems",
16
- "Topic :: Utilities",
17
- ]
18
- license = "MIT"
19
- license-files = ["LICEN[CS]E*"]
20
- keywords = [
21
- "keil",
22
- "MDK",
23
- "µVision",
24
- "clangd",
25
- "Compilation Database",
26
- "compiled_commands.json",
27
- ]
28
- dependencies = []
29
-
30
- [project.scripts]
31
- uv2compdb = "uv2compdb:main"
32
-
33
- [build-system]
34
- requires = ["uv_build>=0.9.25,<0.10.0"]
35
- build-backend = "uv_build"
36
-
37
- [project.urls]
38
- Homepage = "https://github.com/xbin-xu/uv2compdb"
39
- Issues = "https://github.com/xbin-xu/uv2compdb/issues"
1
+ [project]
2
+ name = "uv2compdb"
3
+ version = "0.4.0"
4
+ description = "Generate Compilation Database by parse Keil µVision project"
5
+ readme = "README.md"
6
+ authors = [{ name = "xbin", email = "xbin.xu@qq.com" }]
7
+ requires-python = ">=3.8"
8
+ classifiers = [
9
+ "Development Status :: 4 - Beta",
10
+ "Environment :: Console",
11
+ "Intended Audience :: Developers",
12
+ "License :: OSI Approved :: MIT License",
13
+ "Operating System :: OS Independent",
14
+ "Programming Language :: Python :: 3",
15
+ "Topic :: Software Development :: Embedded Systems",
16
+ "Topic :: Utilities",
17
+ ]
18
+ license = "MIT"
19
+ license-files = ["LICEN[CS]E*"]
20
+ keywords = [
21
+ "keil",
22
+ "MDK",
23
+ "µVision",
24
+ "clangd",
25
+ "Compilation Database",
26
+ "compiled_commands.json",
27
+ ]
28
+ dependencies = []
29
+
30
+ [project.scripts]
31
+ uv2compdb = "uv2compdb:main"
32
+
33
+ [build-system]
34
+ requires = ["uv_build>=0.9.25,<0.10.0"]
35
+ build-backend = "uv_build"
36
+
37
+ [project.urls]
38
+ Homepage = "https://github.com/xbin-xu/uv2compdb"
39
+ Issues = "https://github.com/xbin-xu/uv2compdb/issues"
@@ -1,5 +1,3 @@
1
- __version__ = "0.3.0"
2
-
3
1
  from uv2compdb.main import main
4
2
 
5
3
  __all__ = ["main"]
@@ -5,9 +5,11 @@ Generate Compilation Database by parse Keil µVision project.
5
5
  import logging
6
6
  import argparse
7
7
  from pathlib import Path
8
+ from importlib.metadata import version
8
9
 
9
10
  from uv2compdb.parser import UV2CompDB, _split_and_strip, generate_compile_commands
10
11
 
12
+ __version__ = version("uv2compdb")
11
13
  logger = logging.getLogger(__name__)
12
14
  logging.basicConfig(
13
15
  level=logging.INFO,
@@ -20,6 +22,13 @@ def main() -> int:
20
22
  parser = argparse.ArgumentParser(
21
23
  description="Generate compile_commands.json by parse Keil µVision project"
22
24
  )
25
+ parser.add_argument(
26
+ "-v",
27
+ "--version",
28
+ action="version",
29
+ version=__version__,
30
+ help="show version and exit",
31
+ )
23
32
  parser.add_argument("-a", "--arguments", default=None, help="add extra arguments")
24
33
  parser.add_argument(
25
34
  "-b",
File without changes