{"id":20851153,"url":"https://github.com/elementbound/pygrunt","last_synced_at":"2025-07-22T20:04:09.462Z","repository":{"id":71330596,"uuid":"85898072","full_name":"elementbound/pygrunt","owner":"elementbound","description":"Python-based build system for C/C++, built for the heck of it","archived":false,"fork":false,"pushed_at":"2017-05-26T11:40:35.000Z","size":94,"stargazers_count":5,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-12T16:54:24.864Z","etag":null,"topics":["build","build-automation","build-system","build-tool","python","script","scripting"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elementbound.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2017-03-23T02:30:46.000Z","updated_at":"2024-04-07T19:49:25.000Z","dependencies_parsed_at":"2023-03-13T20:20:25.843Z","dependency_job_id":null,"html_url":"https://github.com/elementbound/pygrunt","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/elementbound/pygrunt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elementbound%2Fpygrunt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elementbound%2Fpygrunt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elementbound%2Fpygrunt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elementbound%2Fpygrunt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elementbound","download_url":"https://codeload.github.com/elementbound/pygrunt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elementbound%2Fpygrunt/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266563915,"owners_count":23948689,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"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","build-automation","build-system","build-tool","python","script","scripting"],"created_at":"2024-11-18T03:12:39.030Z","updated_at":"2025-07-22T20:04:09.453Z","avatar_url":"https://github.com/elementbound.png","language":"Python","readme":"# pygrunt #\n\npygrunt is a simple build system for C/C++ projects.\n\nProjects are described entirely in Python. Since Python is also an excellent scripting language\nwith a huge ecosystem built around it, it makes easy to do secondary tasks like checking platform,\nconditionally including or excluding source files, filter them based on certain conditions,\nmove files around on the filesystem or handle command-line parameters.\n\nSince the project is a one-night experiment so far ( *a too long night...* ), it supports only\nMinGW ( currently called GCCCompiler, to be fixed in the future ). However, pygrunt is designed\nwith compiler-independence in mind. It should be relatively easy to add support for other\ncompilers, given enough knowledge about the compiler itself.\n\nFeatures are also in short supply, we'll see where this project goes.\n\n## Installing ##\n\nA very early version of ``setup.py`` is included in the repository. Simply run the script and\nit will set up pygrunt with all of its dependencies:\n\n``python setup.py install``\n\nIf you want to work on the code instead, run\n\n``python setup.py develop``\n\nThe setup will create a ``pygrunt`` command that you can call from your console.\n\n\u003e Since the project uses other git repos as examples, you might need to run\n\n\u003e ``git submodule update --init --recursive``\n\n\u003e after cloning.\n\u003e This will clone all the submodules so the examples have actual sources to build.\n\n## Usage ##\n\nProjects that build with pygrunt provide a Python script, usually named after the project itself.\nAn example project, called [GLWrap](https://github.com/elementbound/glwrap) is included in this\nrepository. Its corresponding script is called ``glwrap.py``.\n\nTo build GLWrap, type\n\n``pygrunt examples/glwrap.py``\n\nTo build your own project with pygrunt, write a Python script that uses the pygrunt module and\nlet it do the work. Currently, if all you need is to compile a bunch of source files and link\nthem together, pygrunt should be fine. See the repo's root directory for examples.\nHere's a simple one:\n\n```python\nimport pygrunt\nimport pygrunt.compiler\n\ndef build():\n    # Setup project\n    project = pygrunt.Project('hello')\n    project.working_dir = 'hello/'\n    project.output_dir = 'build/'\n\n    # Sanitize aka. set reasonable defaults\n    # Also needed before adding sources\n    # ( otherwise pygrunt will be looking in the wrong directories )\n    project.sanitize()\n\n    # Add sources\n    project.sources.add('*.c')\n\n    # Compile the whole thing\n    #project.compiler = pygrunt.compiler.any()\n    #project.compile()\n    project.compiler = pygrunt.compiler.any()\n    project.compile()\n\n```\n\nOutput:\n```\nLooking for GCC on PATH...\nFound GCC at D:\\dev\\compilers\\mingw\\bin\\gcc.exe\nSource directory is D:\\dev\\python\\pygrunt\\examples\\hello\nBuild directory is D:\\dev\\python\\pygrunt\\examples\\build\n[100%] Compiling hello.c -\u003e hello.o\nLinking executable build/hello ...\n```\n\n## Dependencies ##\n\n[Colorama](https://pypi.python.org/pypi/colorama) is used for fancy, colored output.\n\n## Name ##\n\nYes, I'm aware that the name is already in use: [PyGrunt](https://github.com/Mayo-QIN/pygrunt)\n\nThe project looks awesome, and also used the name earlier, which means **this project will be renamed\nin the future.**\n\n## Todo ##\n\nSee the [proposals](proposed.md).\n\n## License ##\n\npygrunt is licensed under the GNU GPL v3 license. See [LICENSE](LICENSE) for more details.\n\nThis license only applies to pygrunt code ( all source files under the pygrunt directory ),\nother components with different licenses may be present in the repository ( for example the\ncompile-src directory ).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felementbound%2Fpygrunt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felementbound%2Fpygrunt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felementbound%2Fpygrunt/lists"}