uv2compdb 0.3.0__py3-none-any.whl → 0.4.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.
uv2compdb/__init__.py CHANGED
@@ -1,5 +1,3 @@
1
- __version__ = "0.3.0"
2
-
3
1
  from uv2compdb.main import main
4
2
 
5
3
  __all__ = ["main"]
uv2compdb/main.py CHANGED
@@ -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",
@@ -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
 
@@ -0,0 +1,9 @@
1
+ uv2compdb/__init__.py,sha256=eL3VL6_9X_0E-oz3h4d1ovhCLrATHvviKkyZQOguqqQ,55
2
+ uv2compdb/__main__.py,sha256=6nm32QqZwc9URAzRAwrgJTyoLM-nGu0r9wH5iZfOKuE,70
3
+ uv2compdb/main.py,sha256=0druk2CVT-FfUoHjYayC3J27zAEXBFPA1tYz0DhSeOg,2998
4
+ uv2compdb/parser.py,sha256=BN-MHujtrSiL9wibFpPGIu8le9WEWZhLtAnXdUXFeig,18927
5
+ uv2compdb-0.4.0.dist-info/licenses/LICENSE,sha256=jBXhW_dm3ZqVqD8CitzmaDMGPonkPOmqWSDaIEUO30M,1085
6
+ uv2compdb-0.4.0.dist-info/WHEEL,sha256=XjEbIc5-wIORjWaafhI6vBtlxDBp7S9KiujWF1EM7Ak,79
7
+ uv2compdb-0.4.0.dist-info/entry_points.txt,sha256=O6qqKx-ZWjCetvl-PiycCpx92c9Xwm-EN9_UZEMHo04,46
8
+ uv2compdb-0.4.0.dist-info/METADATA,sha256=k7L8K53W4BihcOLFgu4MBBRlXsoleqakCkf1ZfsTQF8,3566
9
+ uv2compdb-0.4.0.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- uv2compdb/__init__.py,sha256=QGf8GNYJg7LAumsXASUDPORucTmkrjVVyBPqa9JrBSA,80
2
- uv2compdb/__main__.py,sha256=6nm32QqZwc9URAzRAwrgJTyoLM-nGu0r9wH5iZfOKuE,70
3
- uv2compdb/main.py,sha256=vIqI6CKChSzZfN40wTjXhUS3OvIqeH2DKFD-mSQcRY8,2756
4
- uv2compdb/parser.py,sha256=BN-MHujtrSiL9wibFpPGIu8le9WEWZhLtAnXdUXFeig,18927
5
- uv2compdb-0.3.0.dist-info/licenses/LICENSE,sha256=jBXhW_dm3ZqVqD8CitzmaDMGPonkPOmqWSDaIEUO30M,1085
6
- uv2compdb-0.3.0.dist-info/WHEEL,sha256=XjEbIc5-wIORjWaafhI6vBtlxDBp7S9KiujWF1EM7Ak,79
7
- uv2compdb-0.3.0.dist-info/entry_points.txt,sha256=O6qqKx-ZWjCetvl-PiycCpx92c9Xwm-EN9_UZEMHo04,46
8
- uv2compdb-0.3.0.dist-info/METADATA,sha256=9-41mNUKZg29dpXTBMh7khDZwMO6DGAh7ZHg4It97BU,3433
9
- uv2compdb-0.3.0.dist-info/RECORD,,