macropragma - apply macros/substitutions/modifications on top of your source code
Project description
macropragma - apply macros/substitutions/modifications on top of your source code
Introduction
The intention is to easily modify/add/remove macros within source files. Typical usage is during installation procesess in order to modify involved source files.
Usage
- Create "my.yaml" file.
- Add it to the prebuild, build or installation task.
Examples
Execution
python3 -m macropragma -h
# Typical usage:
python3 -m macropragma -c <CONFIG_YAML=my.yaml> -d <PROJECT_ROOT>
<CONFIG_YAML=my.yaml>
# One full entry
db/evr-mtca-300u.db: #file to process
greps: #grep for the lines under concern
- "$(SYS)"
- "$(D)"
subs: #substitute the elements
"{$(D)}": "$(D)"
"{$(D)": "$(D)"
"$(D)-": "$(D)"
"}": "-"
":": ""
"$(SYS)$(D)": "$(P)$(R=)$(S=:)"
output: #store the processed file into
"db/evr-mtca-300u-univ.db"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
macropragma-1.0.7.tar.gz
(2.7 kB
view hashes)
Built Distribution
Close
Hashes for macropragma-1.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e25d8f94c3943ae3c165d23209813e1eef67d1fcca51c04b5c7400ed2054ea8 |
|
MD5 | 4ff15c7723e2190efe57c6e58a26661c |
|
BLAKE2b-256 | 8cc952524ba9b5bb21d47df51630ceed70ca133e51dbaba97e01381c16893af9 |