No project description provided
Project description
run-if
conditionally run command if targets don't exist or dependencies have changed.
This is a simple python script that bascially does what checkexec (https://github.com/kurtbuilds/checkexec), but it uses a hash of the contents of the dependencies to decide if the command should be ran and supports multiple targets.
$ run-if main.cpp == g++ main.pp -o main == main
If main
does not exist, or if the contents of main.cpp
have changed since the last time it run-if
was called,
the command will be run.
The syntax is different than checkexec
$ run-if [DEPENDENCY...] == <COMMAND> == [TARGET...]
Multiple targets can be listed and both targets and dependencies can be files or directories.
$ run-if -- src/ == cmake --build build == build/test1 build/test2 build/data/
Currently the hash of dependencies are being computed with shell commands using the subprocess
module, so it will fail to run
if md5sum
or gawk
are missing, or if the default shell does not support pipes.
Install
$ pip install run-if
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
Built Distribution
Hashes for run_if_changed-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3540fccacfeb638e346013cff9de94b541b5a1f8ef41108acf8f7467422434eb |
|
MD5 | 4656cc3181580e237fcc3a888d0bdf5c |
|
BLAKE2b-256 | c8b0b844e319242c20fc693f310ce86d7402db766873d2fda5531050c93b77f2 |