{"id":15788316,"url":"https://github.com/joellefkowitz/miniscons","last_synced_at":"2026-02-14T10:32:21.985Z","repository":{"id":233045069,"uuid":"785862502","full_name":"JoelLefkowitz/miniscons","owner":"JoelLefkowitz","description":"SCons builders.","archived":false,"fork":false,"pushed_at":"2025-02-21T09:37:26.000Z","size":138,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-08T23:34:31.684Z","etag":null,"topics":["builders","scons","sconstruct"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JoelLefkowitz.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-04-12T19:35:32.000Z","updated_at":"2025-02-21T09:37:30.000Z","dependencies_parsed_at":"2024-05-27T20:50:11.067Z","dependency_job_id":"f613c9e5-167a-4e1d-bce3-2b1ba49c3465","html_url":"https://github.com/JoelLefkowitz/miniscons","commit_stats":null,"previous_names":["joellefkowitz/miniscons"],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/JoelLefkowitz/miniscons","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoelLefkowitz%2Fminiscons","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoelLefkowitz%2Fminiscons/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoelLefkowitz%2Fminiscons/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoelLefkowitz%2Fminiscons/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JoelLefkowitz","download_url":"https://codeload.github.com/JoelLefkowitz/miniscons/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoelLefkowitz%2Fminiscons/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29442743,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T10:17:46.583Z","status":"ssl_error","status_checked_at":"2026-02-14T10:17:22.534Z","response_time":53,"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":["builders","scons","sconstruct"],"created_at":"2024-10-04T21:41:48.619Z","updated_at":"2026-02-14T10:32:21.971Z","avatar_url":"https://github.com/JoelLefkowitz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Miniscons\n\nSCons builders.\n\n![Review](https://img.shields.io/github/actions/workflow/status/JoelLefkowitz/miniscons/review.yaml)\n![Version](https://img.shields.io/pypi/v/miniscons)\n![Downloads](https://img.shields.io/pypi/dw/miniscons)\n![Quality](https://img.shields.io/codacy/grade/97f4a968fe554186b58c2f49903a09f4)\n![Coverage](https://img.shields.io/codacy/coverage/97f4a968fe554186b58c2f49903a09f4)\n\n## Motivation\n\nWhen writing an `SConstruct.py` configuration it is difficult to:\n\n- Specify libraries and warnings for each build since the default environment is global\n- Declare executable targets that depend on builds and don't need to be built themselves\n- Parse outputs from `conan` to get include paths for build dependencies since they don't appear in the exported `conandeps`\n- Declare and chain together aliases for external scripts\n\nWe can use `miniscons` to keep the `SConstruct.py` file short and get an interface like this:\n\n```yaml\nbuilds:\n  build\n  tests\n\ntargets:\n  start -\u003e build\n  test -\u003e tests\n\nscripts:\n  tidy\n  clean\n\nroutines:\n  lint -\u003e [tidy, clean]\n\nflags:\n  --dump\n```\n\n## Installing\n\n```bash\npip install miniscons\n```\n\n## Documentation\n\nDocumentation and more detailed examples are hosted on [Github Pages](https://joellefkowitz.github.io/miniscons).\n\n##  Usage\n\nParse the `SConscript_conandeps` if you are using `conan`:\n\n```py\nfrom miniscons import conan\n\nenv = conan()\n```\n\nAdd the builds with their specific warning flags and libs to include:\n\n```py\nfrom miniscons import Build, flags, packages\nfrom walkmate import tree\n\nbuild = Build(\n    \"build\",\n    tree(\"src\", r\"(?\u003c!\\.spec)\\.cpp$\"),\n    flags(\"c++11\", [\"shadow\"]),\n)\n\ntests = Build(\n    \"tests\",\n    tree(\"src\", r\"\\.cpp$\", [\"main.cpp\"]),\n    flags(\"c++11\"),\n    packages([\"gtest\"]),\n)\n```\n\nAdd the executable targets that depend on the builds with their runtime arguments:\n\n```py\nfrom miniscons import Target\n\nstart = Target(\"start\", build)\n\ntest = Target(\"test\", tests, [\"--gtest_brief\"])\n```\n\nAdd the scripts to invoke your tooling:\n\n```py\nfrom miniscons import Script\nfrom walkmate import tree\n\nincludes = tests.packages[\"CPPPATH\"]\n\nclean = Script(\n    \"cppclean\",\n    [\"cppclean\", \".\"],\n)\n\ntidy = Script(\n    \"clang-tidy\",\n    [\n        \"clang-tidy\",\n        tree(\"src\", r\"\\.(cpp)$\"),\n        \"--\",\n        [f\"-I{i}\" for i in includes],\n    ],\n)\n```\n\nAdd the routines and flags for your interface:\n\n```py\nfrom miniscons import Flag, Routine\n\nlint = Routine(\"lint\", [clean, tidy])\n\ndump = Flag(\"--dump\")\n```\n\nRegister all the declarations with the environment and add handlers for each flag:\n\n```py\nfrom miniscons import Tasks\nfrom SCons.Script.Main import GetOption\n\ncli = Tasks(\n    [build, tests],\n    [start, test],\n    [tidy, clean],\n    [lint],\n    [dump],\n)\n\ncli.register(env)\n\nif GetOption(\"dump\"):\n    cli.dump()\n```\n\nNow if we run\n\n```bash\nscons --dump\n```\n\nWe get our interface:\n\n```yaml\nscons: Reading SConscript files ...\n\nbuilds:\n  build\n  tests\n\ntargets:\n  start -\u003e build\n  test -\u003e tests\n\nscripts:\n  tidy\n  clean\n\nroutines:\n  lint -\u003e [tidy, clean]\n\nflags:\n  --dump\n```\n\n## Discussion\n\nWhy not use a simple task runner for scripts and routines?\n\nSome scripts need access to the include paths that appear in the `SConstruct.py` file so they need to be integrated into the scons workflow.\n\n## Tooling\n\n### Dependencies\n\nTo install dependencies:\n\n```bash\nyarn install\npip install .[all]\n```\n\n### Tests\n\nTo run tests:\n\n```bash\nthx test\n```\n\n### Documentation\n\nTo generate the documentation locally:\n\n```bash\nthx docs\n```\n\n### Linters\n\nTo run linters:\n\n```bash\nthx lint\n```\n\n### Formatters\n\nTo run formatters:\n\n```bash\nthx format\n```\n\n## Contributing\n\nPlease read this repository's [Code of Conduct](CODE_OF_CONDUCT.md) which outlines our collaboration standards and the [Changelog](CHANGELOG.md) for details on breaking changes that have been made.\n\nThis repository adheres to semantic versioning standards. For more information on semantic versioning visit [SemVer](https://semver.org).\n\nBump2version is used to version and tag changes. For example:\n\n```bash\nbump2version patch\n```\n\n### Contributors\n\n- [Joel Lefkowitz](https://github.com/joellefkowitz) - Initial work\n\n## Remarks\n\nLots of love to the open source community!\n\n\u003cdiv align='center'\u003e\n    \u003cimg width=200 height=200 src='https://media.giphy.com/media/osAcIGTSyeovPq6Xph/giphy.gif' alt='Be kind to your mind' /\u003e\n    \u003cimg width=200 height=200 src='https://media.giphy.com/media/KEAAbQ5clGWJwuJuZB/giphy.gif' alt='Love each other' /\u003e\n    \u003cimg width=200 height=200 src='https://media.giphy.com/media/WRWykrFkxJA6JJuTvc/giphy.gif' alt=\"It's ok to have a bad day\" /\u003e\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoellefkowitz%2Fminiscons","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoellefkowitz%2Fminiscons","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoellefkowitz%2Fminiscons/lists"}