Extends pythonic task management & command execution with file dependencies.
Documentation
pyinvokedepends is an extension of pyinvoke to allow more "makefile" like task definitions.
It introduces an additional decorator @depends which can be used in addtion to pyinvoke's decorator @task. Adding this decorator to a task will make sure that the task is only executed when any of to files is newer than one of the created files.
For a simple example, consider the following tasks.py. In contrast to traditional make, this will always run gcc hello.c
from invoke import task
@task
def compile(c):
c.run("gcc hello.c", echo=True)
With pyinvokedepends we can add dependencies:
from invoke import task
from pyinvokedepends import depends
@depends(on=["./hello.c"], creates=["./a.out"])
@task
def test(c):
def compile(c):
c.run("gcc hello.c", echo=True)
The task will only execute if the file ./hello.c is newer than the file ./a.out. Otherwise, the execution will be skipped.
The values of the parameters on and creates are lists of globs. At lease one the files matching (one of) the on globs must exist. The task is executed
- if no file exists which matches (any of) the
createsglobs, or - one of the files matching the
onglobs is newer than at least one file of thecreatesglobs.
It does not automatically add pre or post steps to the task based on the dependencies.
Metadata
Release files for pyinvokedepends 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyinvokedepends-1.0.0.tar.gz | 3.3 kB | Without provenance | Details for pyinvokedepends-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyinvokedepends-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for pyinvokedepends-1.0.0-py3-none-any.whl |
Total release size: 8.4 kB
Release files / pyinvokedepends-1.0.0.tar.gz
| Download URL | pyinvokedepends-1.0.0.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b6965d82602aa33c7e78071e0aa6b11418ffc19e1c54ae1b70187b8e062043f9
|
|
BLAKE2b-256 checksum How to use checksums |
be7e519b89adacc82f67adac0c8906cb6233fda9f840bd1f99abd194b276d906
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.8.5
|
Release files / pyinvokedepends-1.0.0-py3-none-any.whl
| Download URL | pyinvokedepends-1.0.0-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1e9533eb9e42ca312d76383cc64988169220411bf2e9f8fd0405b9ebbb544823
|
|
BLAKE2b-256 checksum How to use checksums |
31d441c0b53e8ebbe8334da542c9f2c6ebf7e0aea8723a3240b4870f8aec67d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.8.5
|
Security for pyinvokedepends 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.