You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rye run poly create project --name my_example_project
127
142
```
128
143
144
+
#### uv
145
+
```shell
146
+
uv run poly create project --name my_example_project
147
+
```
148
+
129
149
### Options
130
150
`--name` (required) the name of the project.
131
151
@@ -155,6 +175,11 @@ pdm run poly info
155
175
rye run poly info
156
176
```
157
177
178
+
#### uv
179
+
```shell
180
+
uv run poly info
181
+
```
182
+
158
183
### Options
159
184
`--short` Display a view that is better adjusted to Workspaces with many projects.
160
185
@@ -181,6 +206,11 @@ pdm run poly diff
181
206
rye run poly diff
182
207
```
183
208
209
+
#### uv
210
+
```shell
211
+
uv run poly diff
212
+
```
213
+
184
214
The `diff` command will compare the current state of the repository, compared to a `git tag`.
185
215
The tool will look for the latest tag according to a certain pattern, such as `stable-*`.
186
216
The pattern can be configured in the Workspace [configuration](configuration.md).
@@ -209,6 +239,11 @@ pdm run poly diff --since release
209
239
rye run poly diff --since release
210
240
```
211
241
242
+
#### Rye
243
+
```shell
244
+
uv run poly diff --since release
245
+
```
246
+
212
247
### Options
213
248
`--short` Useful for determining what projects has been affected by the changes in CI.
214
249
@@ -247,6 +282,11 @@ pdm run poly libs
247
282
rye run poly libs
248
283
```
249
284
285
+
#### uv
286
+
```shell
287
+
uv run poly libs
288
+
```
289
+
250
290
### Options
251
291
`--directory`
252
292
Show info about libraries used in a specific project.
@@ -290,6 +330,11 @@ pdm run poly check
290
330
rye run poly check
291
331
```
292
332
333
+
#### uv
334
+
```shell
335
+
uv run poly check
336
+
```
337
+
293
338
### Options
294
339
`--directory`
295
340
Show info about libraries used in a specific project.
@@ -331,6 +376,11 @@ pdm run poly sync
331
376
rye run poly sync
332
377
```
333
378
379
+
#### uv
380
+
```shell
381
+
uv run poly sync
382
+
```
383
+
334
384
This feature is useful for keeping projects in sync. The command will analyze code and add any missing bricks to the projects, including the development project.
335
385
336
386
- projects: will add missing bricks to the project specific _pyproject.toml_, when imported by any of the already added bricks.
@@ -364,6 +414,11 @@ pdm run poly deps
364
414
rye run poly deps
365
415
```
366
416
417
+
#### uv
418
+
```shell
419
+
uv run poly deps
420
+
```
421
+
367
422
### Options
368
423
`--directory`
369
424
Show brick depencencies for a specific project.
@@ -461,3 +516,25 @@ or run the test, filtered by pytest markers
461
516
```shell
462
517
rye run pytest -m <<<echo"$query"
463
518
```
519
+
520
+
#### uv
521
+
```shell
522
+
# store the comma-separated list of bricks in a bash variable
523
+
changes="$(uv run poly diff --bricks --short)"
524
+
525
+
# transform it into a pytest query,
526
+
# i.e. from "hello,world,something" to "hello or world or something"
Copy file name to clipboardExpand all lines: docs/deployment.md
+12-4Lines changed: 12 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,8 +6,8 @@ Packaging and deploying Polylith projects is done by using the Poetry Multiproje
6
6
The `poetry build-project` command will make it possible to use relative package includes as how components and bases are added to Python Polylith projects.
7
7
Relative includes are currently not possible by default in __Poetry__, that is where the __Multiproject__ plugin comes in.
8
8
9
-
## Hatch, PDMand Rye
10
-
Hatchand PDM support relative includes via the `[tool.poetry.bricks]` configuration.
9
+
## Hatch, PDM, Rye and uv
10
+
Hatch, PDM, Rye and uv support relative includes via the `[tool.poetry.bricks]` configuration.
11
11
Nothing extra needed other than the build hooks.
12
12
13
13
### Building source distributions (sdist)?
@@ -16,7 +16,7 @@ you will need to add the path in the project-specific `pyroject.toml`.
16
16
17
17
If you only provide `wheel` distributions, this is optional.
18
18
19
-
#### Hatchand Rye
19
+
#### Hatch, Rye and uv
20
20
```toml
21
21
[tool.hatch.build.targets.wheel]
22
22
packages = ["<your top namespace here>"]
@@ -64,6 +64,14 @@ rye build --wheel
64
64
rye build --sdist
65
65
```
66
66
67
+
#### uv
68
+
```shell
69
+
cd path/to_project
70
+
71
+
uvx --from build pyproject-build --installer uv
72
+
```
73
+
74
+
67
75
This command will create a project specific _dist_ folder containing a _wheel_ and an _sdist_.
68
76
You can use the available __build__ options with this command too.
69
77
@@ -92,7 +100,7 @@ The `build-project` command, with a custom top namespace:
No globally added tools needed. Add the project-specific dependencies (see the [Setup](setup.md) and [Projects & pyproject.toml](projects.md) section),
21
21
and the build hook plugins to add support for the Polylith structure and when packaging libraries.
Copy file name to clipboardExpand all lines: docs/migrating.md
+9-2Lines changed: 9 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ packages = [
20
20
# insert the needed 3rd party libraries here
21
21
```
22
22
23
-
## Hatch, PDMand Rye
23
+
## Hatch, PDM, Rye and uv
24
24
```toml
25
25
[project]
26
26
dependencies = [] # insert the needed 3rd party libraries here
@@ -65,13 +65,20 @@ cd path/to/project
65
65
pdm build
66
66
```
67
67
68
-
####Rye
68
+
### Rye
69
69
```shell
70
70
cd path/to_project
71
71
72
72
rye build --sdist
73
73
```
74
74
75
+
### uv
76
+
```shell
77
+
cd path/to_project
78
+
79
+
uvx --from build pyproject-build --installer uv
80
+
```
81
+
75
82
The output is a `wheel` and, more importantly, an `sdist` (a source distribution). It is essentially a _zip_ file containing all source code used in the project.
0 commit comments