Skip to content

Commit 7058968

Browse files
author
Mikachu2333
committed
fix(rawstr): 更新uv相关的字符串
1 parent 68cb115 commit 7058968

File tree

2 files changed

+18
-23
lines changed

2 files changed

+18
-23
lines changed

src/recipe/lang/Python/rawstr4c.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
* Generated by rawstr4c v1.0.0-2025/08/09
55
*/
66

7-
char RAWSTR_pl_python_uv_config_source_content[] = "\x5b\x5b\x69\x6e\x64\x65\x78\x5d\x5d\x0a\x75\x72\x6c\x20\x3d\x20\x22\x40\x75\x72\x6c\x40\x22\x0a\x64\x65\x66\x61\x75\x6c\x74\x20\x3d\x20\x74\x72\x75\x65\x0a";
7+
char RAWSTR_pl_python_uv_config_uv_format[] = "\x5b\x70\x69\x70\x5d\x0a\x69\x6e\x64\x65\x78\x2d\x75\x72\x6c\x20\x3d\x20\x22\x40\x75\x72\x6c\x40\x22";
88

9-
char RAWSTR_pl_python_get_uv_config[] = "\x67\x72\x65\x70\x20\x2d\x41\x20\x32\x20\x27\x69\x6e\x64\x65\x78\x27\x20\x40\x66\x40\x20\x7c\x20\x73\x65\x64\x20\x2d\x6e\x20\x27\x73\x2f\x5e\x75\x72\x6c\x20\x3d\x20\x22\x5c\x28\x2e\x2a\x5c\x29\x22\x2f\x5c\x31\x2f\x70\x27";
9+
char RAWSTR_pl_python_uv_config_pyproject[] = "\x5b\x74\x6f\x6f\x6c\x2e\x75\x76\x2e\x70\x69\x70\x5d\x69\x6e\x64\x65\x78\x2d\x75\x72\x6c\x20\x3d\x20\x22\x40\x75\x72\x6c\x40\x22";
1010

11-
char RAWSTR_pl_python_set_uv_config[] = "\x40\x73\x65\x64\x40\x20\x27\x2f\x5e\x5c\x5b\x5c\x5b\x69\x6e\x64\x65\x78\x5c\x5d\x5c\x5d\x24\x2f\x2c\x2f\x5e\x64\x65\x66\x61\x75\x6c\x74\x20\x3d\x20\x74\x72\x75\x65\x24\x2f\x7b\x73\x7c\x5e\x75\x72\x6c\x20\x3d\x20\x22\x2e\x2a\x22\x24\x7c\x75\x72\x6c\x20\x3d\x20\x22\x40\x75\x72\x6c\x40\x22\x7c\x7d\x27\x20\x40\x66\x40";
11+
char RAWSTR_pl_python_uv_cpython_uv[] = "\x70\x79\x74\x68\x6f\x6e\x2d\x69\x6e\x73\x74\x61\x6c\x6c\x2d\x6d\x69\x72\x72\x6f\x72\x20\x3d\x20\x22\x40\x75\x72\x6c\x40\x22";
1212

13-
char RAWSTR_pl_python_test_uv_if_set_source[] = "\x67\x72\x65\x70\x20\x2d\x71\x20\x27\x5e\x5c\x5b\x5c\x5b\x69\x6e\x64\x65\x78\x5d\x5d\x24\x27\x20\x40\x66\x40";
13+
char RAWSTR_pl_python_uv_cpython_pyproj[] = "\x5b\x74\x6f\x6f\x6c\x2e\x75\x76\x5d\x70\x79\x74\x68\x6f\x6e\x2d\x69\x6e\x73\x74\x61\x6c\x6c\x2d\x6d\x69\x72\x72\x6f\x72\x20\x3d\x20\x22\x40\x75\x72\x6c\x40\x22";
1414

1515
char RAWSTR_pl_python_rye_config[] = "\x5b\x5b\x73\x6f\x75\x72\x63\x65\x73\x5d\x5d\x0a\x6e\x61\x6d\x65\x20\x3d\x20\x22\x40\x31\x40\x22\x0a\x75\x72\x6c\x20\x20\x3d\x20\x22\x40\x32\x40\x22";
1616

src/recipe/lang/Python/rawstr4c.md

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -22,40 +22,35 @@
2222

2323
## uv
2424

25-
### uv config source content
25+
### uv config source content (`uv.toml`)
2626

2727
```toml
28-
[[index]]
29-
url = "@url@"
30-
default = true
31-
28+
[pip]
29+
index-url = "@url@"
3230
```
3331

32+
### uv config source content (`pyproject.toml`)
3433

35-
### Get uv config
36-
37-
```sh
38-
grep -A 2 'index' @f@ | sed -n 's/^url = "\(.*\)"/\1/p'
34+
```toml
35+
[tool.uv.pip]
36+
index-url = "@url@"
3937
```
4038

39+
### uv config cpython source content (`uv.toml`)
4140

42-
### Set uv config
43-
44-
```sh
45-
@sed@ '/^\[\[index\]\]$/,/^default = true$/{s|^url = ".*"$|url = "@url@"|}' @f@
41+
```toml
42+
python-install-mirror = "@url@"
4643
```
4744

45+
### uv config cpython source content (`pyproject.toml`)
4846

49-
### Test uv if set source
50-
51-
```sh
52-
grep -q '^\[\[index]]$' @f@
47+
```toml
48+
[tool.uv]
49+
python-install-mirror = "@url@"
5350
```
5451

5552
<br>
5653

57-
58-
5954
## Rye
6055

6156
- name = `rye_config`

0 commit comments

Comments
 (0)