{"id":27066077,"url":"https://github.com/maxrt101/pybuild","last_synced_at":"2026-04-29T00:35:06.821Z","repository":{"id":133619793,"uuid":"513697195","full_name":"maxrt101/pybuild","owner":"maxrt101","description":"Build tool for C++ projects","archived":false,"fork":false,"pushed_at":"2022-08-10T00:22:00.000Z","size":13,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T18:51:31.553Z","etag":null,"topics":["build-tool","cpp","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maxrt101.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-13T23:17:01.000Z","updated_at":"2022-08-24T22:09:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"3a9b784b-3a96-4958-8483-f3a0235bc3ef","html_url":"https://github.com/maxrt101/pybuild","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/maxrt101/pybuild","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxrt101%2Fpybuild","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxrt101%2Fpybuild/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxrt101%2Fpybuild/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxrt101%2Fpybuild/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxrt101","download_url":"https://codeload.github.com/maxrt101/pybuild/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxrt101%2Fpybuild/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32405902,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T19:38:08.556Z","status":"ssl_error","status_checked_at":"2026-04-28T19:37:55.688Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["build-tool","cpp","python3"],"created_at":"2025-04-05T18:34:57.188Z","updated_at":"2026-04-29T00:35:06.816Z","avatar_url":"https://github.com/maxrt101.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pybuild\n\nBuild tool for C++ written in python\n\n## How to run\nTo build included example C++ project run `./example.py`  \nTo run test run `./example.py test`  \nTo run cppcheck run `./example.py cppcheck`  \n\n## About pybuild\npybuild is a build tool for C++ projects.  \nMain feaures are:  \n - Intuitive API for managing tasks, subtasks and dependencies\n - Caching of last build time. Prevents from redundant rebuilds.\n - A set of functions to perform common operations with C++ source/object files (compile, link into executables, shared or dynamic libraries)\n\n## Example pybuild file\nSimplest pybuild file could look like this:  \n```python\n#!/usr/bin/env python3\n\nfrom pybuild.config import format as cf # cf - config format, formats a string, replacing {} with corresponding config entry\nimport pybuild\n\n@build.task()\ndef app(ctx):\n    pybuild.cpp.compile(cf('{topdir}/example/src/app.cc'))\n    pybuild.cpp.link_exe(\n       files=[cf('{build_dir}/{profile}/obj/app.o')],\n       output='app'\n    )\n\npybuild.cli.run('app') # 'app' is default task name\n```\n\nMain executable units of pybuild are called tasks.  \nTo create a task define a function and annotate it with `@pybuild.task()`:  \n```python\n@pybuild.task()\ndef app(ctx):\n    ...\n```\n\nTasks can have substasks. Subtasks are annotated with `@pybuild.subtask('parent task name')`.\n\n```python\n\n@pybuild.task()\ndef lib(ctx):\n    ctx.run_subtasks()\n    pybuild.cpp.create_static_lib(\n        files=pybuild.cpp.get_objs([\n            cf('{build_dir}/{profile}/obj/utils'),\n            cf('{build_dir}/{profile}/obj/core')\n        ]),\n        output='libexample.a'\n    )\n\n@pybuild.subtask('lib')\ndef core(ctx):\n    pybuild.cpp.compile_batch(pybuild.utils.get_files(cf('{topdir}/src/core'), r'.+\\.cc'), 'core')\n\n@pybuild.subtask('lib')\ndef utils(ctx):\n    pybuild.cpp.compile_batch(pybuild.utils.get_files(cf('{topdir}/src/utils'), r'.+\\.cc'), 'utils')\n\n```\n\nAlso tasks can depend on each other. Dependencies are passed as a list of task names to `build.task` annotation:  \n```python\n\n@pybuild.task()\ndef install_headers(ctx):\n    ...\n\n@pybuild.task()\ndef dependencies(ctx):\n    ctx.run_subtasks()\n\n@pybuild.task(['install_headers', 'dependencies'])\ndef lib(ctx):\n    ...\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxrt101%2Fpybuild","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxrt101%2Fpybuild","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxrt101%2Fpybuild/lists"}