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
* v1: Migrated `poetry` to `uv` (#5253)
* poetry replaced with uv
* Try building with CI
* add uv to path
* Fix sdk path
* Support for desktop light
* unpack pyodide
* Update contributing guide
* Enable Ruff
* Cleanup after merge
To install all Flet dependencies and enable the project as editable package run:
38
38
39
39
```
40
-
poetry install
40
+
uv sync
41
41
```
42
42
43
43
### Check the installation
@@ -57,7 +57,7 @@ flet.app(target=main)
57
57
and then run it:
58
58
59
59
```
60
-
poetry run python hello.py
60
+
uv run python hello.py
61
61
```
62
62
63
63
During the first run Flet Client (`flet`) executable will be downloaded from [Flet GitHub releases](https://github.com/flet-dev/flet/releases) to a user temp directory and then started from there. The version of release to download from is taken from `flet/version.py` file.
@@ -66,10 +66,10 @@ You should see a new native OS window opened with "Hello, world!" in it.
[pre-commit](https://pre-commit.com) is a dev dependency of Flet and is automatically installed by `poetry install`.
99
-
To install the pre-commit hooks run: `poetry run pre-commit install`.
98
+
[pre-commit](https://pre-commit.com) is a dev dependency of Flet and is automatically installed by `uv sync`.
99
+
To install the pre-commit hooks run: `uv run pre-commit install`.
100
100
Once installed, every time you commit, pre-commit will run the configured hooks against changed files.
101
101
102
-
## Possible installation error when working with a source package
103
-
104
-
When you run python3 hello.py, you might encounter an error like this:
105
-
`FileNotFoundError: [Error 2] No such file or directory: '/var/folders/xm/cyv42vbs27gff3s39vy97rx00000gn/T/fletd-0.1.50/fletd'`
106
-
107
-
To resolve the issue, just delete this folder `../T/fletd-0.1.50/fletd`. The folder is the one with the FileNotFound Error encountered earlier.
108
-
109
-
It should work now.
110
-
111
102
## Flutter client
112
103
113
104
Add the `FLET_VIEW_PATH` and `FLET_WEB_PATH` variables to the environment variables or profile scripts for your respective OS, making sure to modify the path accordingly:
@@ -167,7 +158,7 @@ Create a new folder preferably named `playground` (it has been added to the giti
167
158
Try running the below command, where `<your-main.py>` is the file to test your additions:
168
159
169
160
```bash
170
-
poetry run flet run -w -p 8550 playground/<your-main.py>
161
+
uv run flet run -w -p 8550 playground/<your-main.py>
171
162
```
172
163
You should see http://127.0.0.1:8550/ opened in the browser and also a desktop window with the output of your code.
173
164
Making changes to the `<your-main.py>` will automatically trigger a hot reload.
@@ -186,9 +177,10 @@ You will be able to see the debugging outputs of the flet client in this termina
186
177
- slowest: use `flutter run` as seen previously.
187
178
188
179
- When you make changes to the flet **python** files, you will need to restart/rerun the Python client for the changes to take effect in the opened flutter applications. This is done with the same command:
189
-
```bash
190
-
poetry run flet run -w -p 8550 playground/<your-main.py>
191
-
```
180
+
181
+
```bash
182
+
uv run flet run -w -p 8550 playground/<your-main.py>
0 commit comments