l0n0lc 0.8.1__py3-none-any.whl → 0.8.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {l0n0lc-0.8.1.dist-info → l0n0lc-0.8.2.dist-info}/METADATA +44 -43
- {l0n0lc-0.8.1.dist-info → l0n0lc-0.8.2.dist-info}/RECORD +5 -5
- {l0n0lc-0.8.1.dist-info → l0n0lc-0.8.2.dist-info}/WHEEL +0 -0
- {l0n0lc-0.8.1.dist-info → l0n0lc-0.8.2.dist-info}/licenses/LICENSE +0 -0
- {l0n0lc-0.8.1.dist-info → l0n0lc-0.8.2.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: l0n0lc
|
3
|
-
Version: 0.8.
|
3
|
+
Version: 0.8.2
|
4
4
|
Summary: 一个将python函数翻译为c++函数并运行的jit编译器
|
5
5
|
Classifier: Programming Language :: Python :: 3
|
6
6
|
Requires-Python: >=3.10
|
@@ -14,48 +14,7 @@ Dynamic: license-file
|
|
14
14
|
```
|
15
15
|
pip install l0n0lc
|
16
16
|
```
|
17
|
-
## 2.
|
18
|
-
```
|
19
|
-
uv run tests/hello_world.py
|
20
|
-
# 输入: b'1\n2\n100\n101\n'
|
21
|
-
```
|
22
|
-
```bash
|
23
|
-
输出map:
|
24
|
-
c 3
|
25
|
-
a 1
|
26
|
-
b 2
|
27
|
-
输出list:
|
28
|
-
0 134
|
29
|
-
1 3
|
30
|
-
2 2
|
31
|
-
Hello World 13 3
|
32
|
-
test_other_fn 10
|
33
|
-
test编译的函数 39
|
34
|
-
请输入>>>输入的 1 小于等于100
|
35
|
-
请输入>>>输入的 2 小于等于100
|
36
|
-
请输入>>>输入的 100 小于等于100
|
37
|
-
请输入>>>结果: 241
|
38
|
-
|
39
|
-
```
|
40
|
-
|
41
|
-
## 3. 查看输出文件
|
42
|
-
```bash
|
43
|
-
ls -al ./l0n0lcoutput
|
44
|
-
total 96
|
45
|
-
drwxr-xr-x 2 root root 4096 Sep 12 01:42 .
|
46
|
-
drwxrwxrwx 11 1000 1000 4096 Sep 12 01:14 ..
|
47
|
-
-rw-r--r-- 1 root root 1233 Sep 12 01:42 test_add_@3ecbfe0013e83ebc.cpp
|
48
|
-
-rw-r--r-- 1 root root 246 Sep 12 01:42 test_add_@3ecbfe0013e83ebc.h
|
49
|
-
-rwxr-xr-x 1 root root 29904 Sep 12 01:42 test_add_@3ecbfe0013e83ebc.so
|
50
|
-
-rw-r--r-- 1 root root 121 Sep 12 01:42 test_other_fn_@75fdd928ab58a8e3.cpp
|
51
|
-
-rw-r--r-- 1 root root 93 Sep 12 01:42 test_other_fn_@75fdd928ab58a8e3.h
|
52
|
-
-rwxr-xr-x 1 root root 15616 Sep 12 01:42 test_other_fn_@75fdd928ab58a8e3.so
|
53
|
-
-rw-r--r-- 1 root root 185 Sep 12 01:14 test编译的函数_@3bf4501e0408a243.cpp
|
54
|
-
-rw-r--r-- 1 root root 151 Sep 12 01:14 test编译的函数_@3bf4501e0408a243.h
|
55
|
-
-rwxr-xr-x 1 root root 15656 Sep 12 01:14 test编译的函数_@3bf4501e0408a243.so
|
56
|
-
|
57
|
-
```
|
58
|
-
## 4. hello_world.py
|
17
|
+
## 2. hello_world.py
|
59
18
|
```python
|
60
19
|
import l0n0lc as lc
|
61
20
|
import math
|
@@ -132,6 +91,48 @@ def test_add(a: int, b: int) -> int:
|
|
132
91
|
|
133
92
|
print('结果:', test_add(1, 3))
|
134
93
|
|
94
|
+
```
|
95
|
+
|
96
|
+
## 3. 运行hello_world.py
|
97
|
+
```
|
98
|
+
uv run tests/hello_world.py
|
99
|
+
# 输入: b'1\n2\n100\n101\n'
|
100
|
+
```
|
101
|
+
```bash
|
102
|
+
输出map:
|
103
|
+
c 3
|
104
|
+
a 1
|
105
|
+
b 2
|
106
|
+
输出list:
|
107
|
+
0 134
|
108
|
+
1 3
|
109
|
+
2 2
|
110
|
+
Hello World 13 3
|
111
|
+
test_other_fn 10
|
112
|
+
test编译的函数 39
|
113
|
+
请输入>>>输入的 1 小于等于100
|
114
|
+
请输入>>>输入的 2 小于等于100
|
115
|
+
请输入>>>输入的 100 小于等于100
|
116
|
+
请输入>>>结果: 241
|
117
|
+
|
118
|
+
```
|
119
|
+
|
120
|
+
## 4. 查看输出文件
|
121
|
+
```bash
|
122
|
+
ls -al ./l0n0lcoutput
|
123
|
+
total 96
|
124
|
+
drwxr-xr-x 2 root root 4096 Sep 12 01:46 .
|
125
|
+
drwxrwxrwx 11 1000 1000 4096 Sep 12 01:46 ..
|
126
|
+
-rw-r--r-- 1 root root 1233 Sep 12 01:46 test_add_@3ecbfe0013e83ebc.cpp
|
127
|
+
-rw-r--r-- 1 root root 246 Sep 12 01:46 test_add_@3ecbfe0013e83ebc.h
|
128
|
+
-rwxr-xr-x 1 root root 29904 Sep 12 01:46 test_add_@3ecbfe0013e83ebc.so
|
129
|
+
-rw-r--r-- 1 root root 121 Sep 12 01:46 test_other_fn_@75fdd928ab58a8e3.cpp
|
130
|
+
-rw-r--r-- 1 root root 93 Sep 12 01:46 test_other_fn_@75fdd928ab58a8e3.h
|
131
|
+
-rwxr-xr-x 1 root root 15616 Sep 12 01:46 test_other_fn_@75fdd928ab58a8e3.so
|
132
|
+
-rw-r--r-- 1 root root 185 Sep 12 01:46 test编译的函数_@3bf4501e0408a243.cpp
|
133
|
+
-rw-r--r-- 1 root root 151 Sep 12 01:46 test编译的函数_@3bf4501e0408a243.h
|
134
|
+
-rwxr-xr-x 1 root root 15656 Sep 12 01:46 test编译的函数_@3bf4501e0408a243.so
|
135
|
+
|
135
136
|
```
|
136
137
|
## 5. test_add_@3ecbfe0013e83ebc.cpp
|
137
138
|
```c++
|
@@ -5,8 +5,8 @@ l0n0lc/c基础处理.py,sha256=FMauoVx4-33JXl4OLpUl1D6NCkLjk6yBH7do9WnT0Wg,5671
|
|
5
5
|
l0n0lc/jit.py,sha256=0HFfsFG531wHFwHaEsscJE2RiUe1D9nfutn8CfqWaV4,23676
|
6
6
|
l0n0lc/编译.py,sha256=Ty4gPDHAB1jn8LgnE4w3R06bOAEeYr8iwqahYf6QeHI,2154
|
7
7
|
l0n0lc/通用.py,sha256=O_Y4bbW1WzHCJkibxAy9WGACv-aEZJLG-fEeVBcAbBQ,3649
|
8
|
-
l0n0lc-0.8.
|
9
|
-
l0n0lc-0.8.
|
10
|
-
l0n0lc-0.8.
|
11
|
-
l0n0lc-0.8.
|
12
|
-
l0n0lc-0.8.
|
8
|
+
l0n0lc-0.8.2.dist-info/licenses/LICENSE,sha256=1L-MAjulZ3kpbYwsJtlXpDVITRxykna2Ecg_521YfkA,1093
|
9
|
+
l0n0lc-0.8.2.dist-info/METADATA,sha256=cBr_CPYia-yx6SsxozjqPETscjmNs6mY_97p38NUlYA,5513
|
10
|
+
l0n0lc-0.8.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
11
|
+
l0n0lc-0.8.2.dist-info/top_level.txt,sha256=Q21D_eEY_-xgRUPwATGp9YDKSBO4w_7MI2MYxQI1aT4,7
|
12
|
+
l0n0lc-0.8.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|