Skip to main content

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


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)

Uploaded Source

Built Distribution

macropragma-1.0.8-py3-none-any.whl (13.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page