bump to 0.3.0 (add log
This commit is contained in:
parent
d02ca52c8f
commit
461a0b57e7
60
README.md
60
README.md
@ -9,7 +9,7 @@ A python lib came from [Difficult Rocket](https://github.com/shenjackyuanjie/Dif
|
||||
- Version / 版本: 0.3.0
|
||||
- Author / 作者: shenjackyuanjie <3695888@qq.com>
|
||||
|
||||
> [shenjackyuanjie](https://github.com/shenjackyuanjie)
|
||||
[shenjackyuanjie](https://github.com/shenjackyuanjie)
|
||||
|
||||
> [更新日志|Change Log](docs/change_log.md)
|
||||
|
||||
@ -61,6 +61,7 @@ logger.trace('so this message will be in the same line', tag='same line!')
|
||||
### Nuitka pyproject paser
|
||||
|
||||
> `pyproject.toml` 内的配置
|
||||
>
|
||||
> Config in `pyproject.toml`
|
||||
|
||||
前往 [example/nuitka](/example/nuitka) 查看更多例子
|
||||
@ -76,6 +77,7 @@ script = "xxx.py"
|
||||
```
|
||||
|
||||
> 通过 `lndl_nuitka` 命令行工具使用
|
||||
>
|
||||
> Use with `lndl_nuitka` command line tool
|
||||
|
||||
```bash
|
||||
@ -86,9 +88,10 @@ lndl_nuitka . -y
|
||||
# run without confirmation
|
||||
lndl_nuitka . -n
|
||||
# do not run
|
||||
```
|
||||
```
|
||||
|
||||
> 通过 `lib_not_dr.nuitka.reader` 模块使用
|
||||
>
|
||||
> Use with `lib_not_dr.nuitka.reader`
|
||||
|
||||
```python
|
||||
@ -101,56 +104,3 @@ nuitka_config["product_version"] = "0.1.0"
|
||||
command = main(nuitka_config)
|
||||
run_nuitka(command)
|
||||
```
|
||||
|
||||
### Nuitka Compiler Helper
|
||||
|
||||
#### Warning/警告
|
||||
|
||||
::: warning
|
||||
|
||||
> 已经弃用 Deprecated
|
||||
> 请改用 lndl_nuitka / python -m lndl_nuitka
|
||||
|
||||
:::
|
||||
|
||||
> simple example
|
||||
> 简单示例
|
||||
|
||||
```python title="simple_nuitka.py"
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
from lib_not_dr.nuitka.compile import CompilerHelper
|
||||
|
||||
compiler = CompilerHelper(src_file = Path("main.py"))
|
||||
|
||||
print(compiler)
|
||||
subprocess.run(compiler.gen_subprocess_cmd())
|
||||
```
|
||||
|
||||
> more complex example
|
||||
> 复杂示例
|
||||
|
||||
```python title="complex_nuitka.py"
|
||||
import sys
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
from lib_not_dr.nuitka.compile import CompilerHelper
|
||||
|
||||
compiler = CompilerHelper(src_file = Path("main.py"), run_after_build=True)
|
||||
|
||||
print(compiler)
|
||||
|
||||
if '-y' in sys.argv or '--yes' in sys.argv:
|
||||
do_run = True
|
||||
elif '-n' in sys.argv or '--no' in sys.argv:
|
||||
do_run = False
|
||||
else: # do_run is None
|
||||
while (do_run := input("compile? [y/n]").lower()) not in ["y", "n", "yes", "no"]:
|
||||
pass
|
||||
# 获取用户输入是否编译
|
||||
# get user confirmation to compile or not
|
||||
do_run = True if do_run[0] == "y" else False
|
||||
|
||||
if do_run:
|
||||
subprocess.run(compiler.gen_subprocess_cmd())
|
||||
```
|
||||
|
40
docs/change_logs/0-3.md
Normal file
40
docs/change_logs/0-3.md
Normal file
@ -0,0 +1,40 @@
|
||||
# lndl 0.3.0 (draft)
|
||||
|
||||
## 0.3.0 (draft)
|
||||
|
||||
> logger 继续后延
|
||||
|
||||
### lndl-nuitka
|
||||
|
||||
- [x] 修改配置路径
|
||||
- 从 `[tool.lndl.nuitka]` 变为 `[tool.lndl.nuitka.cli]`
|
||||
- [x] 添加新配置
|
||||
- 添加 `[tool.lndl.nuitka.script]`
|
||||
- 用于项目动态修改 nuitka 脚本中的信息
|
||||
- 例如 `file-version` `product-version` 等
|
||||
|
||||
- 重构了一部分解析逻辑
|
||||
- 现在配置路径位于 `[tool.lndl.nuitka.cli]`
|
||||
- 可以添加脚本用于动态解析依赖
|
||||
- `[tool.lndl.nuitka]`
|
||||
- `script = "script.py"`
|
||||
|
||||
### Logger
|
||||
|
||||
> 预计 `0.4` 发布?
|
||||
|
||||
- [x] 完成配置解析
|
||||
- [x] 支持读取配置之后自动应用
|
||||
|
||||
- 将 `logger` 模块重命名为 `loggers`
|
||||
|
||||
- 添加了 `get_config` 函数
|
||||
- 用于获取全局配置
|
||||
- 我也不确定有啥用捏
|
||||
- 添加了 `read_config` 函数
|
||||
- 用于向指定 `ConfigStorage`/全局 `ConfigStorage` 实例中添加配置
|
||||
- 添加了 `get_logger` 函数
|
||||
- 用于从指定 `ConfigStorage`/全局 `ConfigStorage` 实例中获取指定名称的 `Logger` 实例
|
||||
- `Logger`
|
||||
- 添加了 `clone_logger` 函数
|
||||
- 用于克隆一个新的配置相同的 `Logger` 实例
|
5
docs/change_logs/0-4.md
Normal file
5
docs/change_logs/0-4.md
Normal file
@ -0,0 +1,5 @@
|
||||
# lndl 0.4.0 (draft)
|
||||
|
||||
## Logger
|
||||
|
||||
- [ ] 达到可用级别
|
@ -1,34 +1,4 @@
|
||||
# Change log / 更新日志
|
||||
|
||||
## 0.3.0 (draft)
|
||||
|
||||
> logger 继续后延
|
||||
|
||||
### lndl-nuitka
|
||||
|
||||
- 重构了一部分解析逻辑
|
||||
- 现在配置路径位于 `[tool.lndl.nuitka.cli]`
|
||||
- 可以添加脚本用于动态解析依赖
|
||||
- `[tool.lndl.nuitka]`
|
||||
- `script = "script.py"`
|
||||
|
||||
### Logger
|
||||
|
||||
- 将 `logger` 模块重命名为 `loggers`
|
||||
|
||||
- 添加了 `get_config` 函数
|
||||
- 用于获取全局配置
|
||||
- 我也不确定有啥用捏
|
||||
- 添加了 `read_config` 函数
|
||||
- 用于向指定 `ConfigStorage`/全局 `ConfigStorage` 实例中添加配置
|
||||
- 添加了 `get_logger` 函数
|
||||
- 用于从指定 `ConfigStorage`/全局 `ConfigStorage` 实例中获取指定名称的 `Logger` 实例
|
||||
- `Logger`
|
||||
- 添加了 `clone_logger` 函数
|
||||
- 用于克隆一个新的配置相同的 `Logger` 实例
|
||||
- `LogMessage`
|
||||
- 现在通过判断是否在 `message` `end` `spilt` 中有 `\n` 自动判定是否需要刷新
|
||||
-
|
||||
# lndl 老版本的更新日志
|
||||
|
||||
## 0.2.3
|
||||
|
||||
@ -153,7 +123,7 @@
|
||||
|
||||
- 优化了 `CompilerHelper` 的一些周围实现
|
||||
- 参数喜加一
|
||||
- `--report`
|
||||
- `--report`
|
||||
|
||||
## 0.1.5
|
||||
|
@ -1,5 +1,7 @@
|
||||
# Lndl is not a dr lib 的发布计划
|
||||
# lndl 更新日志
|
||||
|
||||
## [0.4.0](/docs/release-plan/0-4.md)
|
||||
|
||||
## [0.3.0](/docs/release-plan/0-3.md)
|
||||
|
||||
## [0.4.0](/docs/release-plan/0-4.md)
|
||||
## [old](/docs/change_logs/old.md)
|
@ -45,6 +45,7 @@ builder = Literal('test1')(
|
||||
```
|
||||
|
||||
build
|
||||
|
||||
- test
|
||||
- main
|
||||
- arg:text
|
||||
@ -52,8 +53,7 @@ build
|
||||
- arg:int
|
||||
- run
|
||||
|
||||
|
||||
- command: 主节点
|
||||
- command: 主节点
|
||||
- literal: 字面量节点
|
||||
|
||||
## 设计思路
|
||||
|
@ -1,18 +0,0 @@
|
||||
# Lndl is not a dr lib 0.3 版本的发布计划
|
||||
|
||||
## lndl-nuitka
|
||||
|
||||
- [x] 修改配置路径
|
||||
- 从 `[tool.lndl.nuitka]` 变为 `[tool.lndl.nuitka.cli]`
|
||||
- [x] 添加新配置
|
||||
- 添加 `[tool.lndl.nuitka.script]`
|
||||
- 用于项目动态修改 nuitka 脚本中的信息
|
||||
- 例如 `file-version` `product-version` 等
|
||||
|
||||
## Logger (WIP)
|
||||
|
||||
> 预计 `0.4` 发布?
|
||||
|
||||
- [x] 完成配置解析
|
||||
- [x] 支持读取配置之后自动应用
|
||||
|
@ -1,5 +0,0 @@
|
||||
# Lndl is not a dr lib 0.4 版本的发布计划
|
||||
|
||||
## Logger
|
||||
|
||||
- [ ] 达到可用级别
|
@ -5,3 +5,5 @@ standalone = true
|
||||
clang = true
|
||||
msvc = 'latest'
|
||||
mingw64 = false
|
||||
|
||||
# python -m nuitka --main=test.py --standalone --clang --msvc=latest
|
||||
|
Loading…
Reference in New Issue
Block a user