# amake
> Makefiles - in python
_amake_ is a build system inspired from _GNU make_, _cmake_, _meson_, ... but only in python.
## Features
- Generators:
Generators are python functions that generates an output:
```python
@generator(output='hello.txt', dependencies=['source.jinja'])
def hello(self):
env = jinja2.Environment(loader=jinja2.FileSystemLoader(self.source_path))
template = env.get_template('source.jinja')
print(template.render({'data': 'hello'}), file=open(self.output, 'w'))
```
They can be async:
```python
@generator(output='hello-cpy.txt', dependencies=[hello])
async def hello_cpy(self):
assert hello.up_to_date
async with aiofiles.open(hello.output, 'r') as src:
async with aiofiles.open(self.output, 'w') as dst:
await dst.write(await src.read())
```
## Cli usage:
### Toolchain scan
```bash
amake scan-toolchains [-s <env-script>]
```
### Configuration
```bash
amake configure [-B <build_path>] [-S <source_path>] [-t <toolchain>] [-s <setting>=<value>] [-o <option>=<value>]
```
### Build
```bash
amake build [-B <build_path>] [-v] [--for-install] [TARGETS]...
```
### Install
Install targets marked with `self.install(...)` to the *install.destination* setting.
```bash
amake install [-B <build_path>] [TARGETS]... [user|dev]
```
Settings:
- *install.destination*: The install destination (default: /usr/local).
- *install.runtime_prefix*: Executables installation prefix (default: bin).
- *install.libraries_prefix*: Libraries installation prefix (default: lib).
- *install.includes_prefix*: Includes installation prefix (default: include).
- *install.data_prefix*: Data files installation prefix (default: share).
- *install.project_prefix*: !!! NOT USED YET !!! Project prefix (default: None).
Raw data
{
"_id": null,
"home_page": "",
"name": "amake",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": "",
"keywords": "packaging,dependency,build system",
"author": "",
"author_email": "Garcia Sylvain <garcia.6l20@gmail.com>, garcia.6l20@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/0c/a1/0f471b65590b7138c2d730370ca0f74d489064e1905be5e73de07f2c7e25/amake-0.1.0.tar.gz",
"platform": null,
"description": "# amake\r\n> Makefiles - in python\r\n\r\n_amake_ is a build system inspired from _GNU make_, _cmake_, _meson_, ... but only in python.\r\n\r\n## Features\r\n\r\n- Generators:\r\n\r\nGenerators are python functions that generates an output:\r\n```python\r\n@generator(output='hello.txt', dependencies=['source.jinja'])\r\ndef hello(self):\r\n env = jinja2.Environment(loader=jinja2.FileSystemLoader(self.source_path))\r\n template = env.get_template('source.jinja')\r\n print(template.render({'data': 'hello'}), file=open(self.output, 'w'))\r\n```\r\n\r\nThey can be async:\r\n```python\r\n@generator(output='hello-cpy.txt', dependencies=[hello])\r\nasync def hello_cpy(self):\r\n assert hello.up_to_date\r\n async with aiofiles.open(hello.output, 'r') as src:\r\n async with aiofiles.open(self.output, 'w') as dst:\r\n await dst.write(await src.read())\r\n```\r\n\r\n\r\n##\u00a0Cli usage:\r\n\r\n### Toolchain scan\r\n\r\n```bash\r\namake scan-toolchains [-s <env-script>]\r\n```\r\n\r\n### Configuration\r\n\r\n```bash\r\namake configure [-B <build_path>] [-S <source_path>] [-t <toolchain>] [-s <setting>=<value>] [-o <option>=<value>]\r\n```\r\n\r\n### Build\r\n\r\n```bash\r\namake build [-B <build_path>] [-v] [--for-install] [TARGETS]...\r\n```\r\n\r\n### Install\r\n\r\nInstall targets marked with `self.install(...)` to the *install.destination* setting.\r\n\r\n```bash\r\namake install [-B <build_path>] [TARGETS]... [user|dev]\r\n```\r\n\r\nSettings:\r\n- *install.destination*: The install destination (default: /usr/local).\r\n- *install.runtime_prefix*: Executables installation prefix (default: bin).\r\n- *install.libraries_prefix*: Libraries installation prefix (default: lib).\r\n- *install.includes_prefix*: Includes installation prefix (default: include).\r\n- *install.data_prefix*: Data files installation prefix (default: share).\r\n- *install.project_prefix*: !!! NOT USED YET !!! Project prefix (default: None).\r\n",
"bugtrack_url": null,
"license": "",
"summary": "Python-based build system.",
"version": "0.1.0",
"project_urls": {
"documentation": "https://github.com/Garcia6L20/amake",
"homepage": "https://github.com/Garcia6L20/amake",
"repository": "https://github.com/Garcia6L20/amake"
},
"split_keywords": [
"packaging",
"dependency",
"build system"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "661c75848ad28eb8528cc4235ddbc3c12b9154e8f89871b3891510dd7515a6bc",
"md5": "72b62e89a51235368464648eccdd3850",
"sha256": "29a019f60174c17163c60b6f065f3675338bda3000b0d4c1bf30168eca311362"
},
"downloads": -1,
"filename": "amake-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "72b62e89a51235368464648eccdd3850",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 71990,
"upload_time": "2023-05-13T14:18:23",
"upload_time_iso_8601": "2023-05-13T14:18:23.705287Z",
"url": "https://files.pythonhosted.org/packages/66/1c/75848ad28eb8528cc4235ddbc3c12b9154e8f89871b3891510dd7515a6bc/amake-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0ca10f471b65590b7138c2d730370ca0f74d489064e1905be5e73de07f2c7e25",
"md5": "a6f0c2f4b3704dce7e55859ddf8510ee",
"sha256": "76639f5cfa2c539108371c3af9a3b4b0fe8c87f73a93ca3f6c75d38d48c49f94"
},
"downloads": -1,
"filename": "amake-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "a6f0c2f4b3704dce7e55859ddf8510ee",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 58662,
"upload_time": "2023-05-13T14:18:27",
"upload_time_iso_8601": "2023-05-13T14:18:27.732875Z",
"url": "https://files.pythonhosted.org/packages/0c/a1/0f471b65590b7138c2d730370ca0f74d489064e1905be5e73de07f2c7e25/amake-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-05-13 14:18:27",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Garcia6L20",
"github_project": "amake",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "click",
"specs": []
},
{
"name": "jinja2",
"specs": []
},
{
"name": "distro",
"specs": []
},
{
"name": "pyyaml",
"specs": []
},
{
"name": "aiofiles",
"specs": []
},
{
"name": "aiohttp",
"specs": []
},
{
"name": "termcolor",
"specs": []
},
{
"name": "tqdm",
"specs": []
},
{
"name": "dataclasses-json",
"specs": []
}
],
"lcname": "amake"
}