No project description provided
Project description
oak-build
A make-like build system written on python
How to use
Create oak_build.py
file in your project directory.
Every method marked with @task
decorator can be called from CLI.
from pathlib import Path
from oak_build import task
@task
def create_file():
with open(Path("result.txt"), "w") as txt:
txt.write("test content\n")
To execute create_file
task call oak create_file
from console.
Task dependencies
You can link dependent tasks with depends_on
parameter.
from oak_build import task, run
@task
def unit_tests():
run("poetry run pytest tests")
@task
def integration_tests():
run("poetry run pytest integration_tests")
@task(
depends_on=[
unit_tests,
integration_tests,
]
)
def tests():
pass
When oak tests
is called oak build will execute unit_tests
and integration_tests
tasks as well.
Examples
For examples see integration tests files and self build oak_file.py.
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
oak_build-0.1.1.post1.tar.gz
(6.6 kB
view hashes)
Built Distribution
Close
Hashes for oak_build-0.1.1.post1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9aa715d48ad6a873c1e9abf3bdc045df1e30ef4f6a14be55a70578b09b80eb45 |
|
MD5 | 13b8d1900c2636473ab61f8873b141fd |
|
BLAKE2b-256 | 3f1a62ba45252bcce01ed7c11ecc9cb8dfb469fd0bc14802ff688081ea5f71d9 |