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.8.tar.gz
(2.7 kB
view hashes)
Built Distribution
Close
Hashes for macropragma-1.0.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 742ff6a2f77764dc64609cd10236c823293a261835b1f570f73e6d94c53d1ded |
|
MD5 | 7eb1639e6b222879d55d79f094079544 |
|
BLAKE2b-256 | 881824533242fe9c307e6b6319e11a9bfc6fc84f18022a61a7fe05823fd4715a |