Compare commits

...

3 Commits

Author SHA1 Message Date
7772ef6346 update README 2024-04-13 00:09:49 +08:00
9fbb0b8d29 update 2024-04-12 23:59:18 +08:00
8d97e53419 update 2024-04-12 23:43:27 +08:00
6 changed files with 36 additions and 4 deletions

13
.gitignore vendored Normal file
View File

@ -0,0 +1,13 @@
# Ignore the 'dist' directory at the root of the project
/dist/
# Ignore all __pycache__ directories in the project
__pycache__/
/.vscode
/CMakeLists.txt
/main.cxx
/build

View File

@ -4,8 +4,17 @@
# 如何安装
用.pth文件自行定位到本项目的文件夹中
## 从release中安装
```bash
pip install <file name>
```
## 自行编译
```bash
pip install poetry
poetry install
poetry build
pip install ./dist/pymake-0.1.0-py3-none-any.whl
```
# 如何使用
>生成一个用于GLFW编程的CMakeLists
```python

Binary file not shown.

Binary file not shown.

9
pymake/__main__.py Normal file
View File

@ -0,0 +1,9 @@
from . import *
(
cmake("3.5")
.project("test")
.file("SRC",glob_recurse,"*.cxx")
.add_executable(var(project_name),var("SRC"))
.write()
)

View File

@ -1,7 +1,8 @@
def var(name:"str")->"str":
from typing import *
def var(name:str)->str:
return f"${{{name}}}"
def args_to_str(args:"list[str]")->str:
def args_to_str(args:list[str])->str:
vars_str = ""
for i in args:
vars_str=f"{vars_str} {i}"