Skip to content

Commit 338ce9c

Browse files
pieterddhfiguiere
authored andcommitted
Simplify dependency install with Poetry
1 parent 8f12caf commit 338ce9c

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

cargo/README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,21 @@
22

33
Tool to automatically generate `flatpak-builder` manifest json from a `Cargo.lock`.
44

5-
## Requirements:
5+
## Requirements
66

7-
Python 3.8+ with following modules:
7+
Poetry users can run `poetry install` and skip this.
88

9+
Otherwise install Python 3.8+ with these modules:
910
- toml
1011
- aiohttp
1112

1213
Generated manifests are supported by flatpak-builder 1.2.x or newer.
1314

14-
## Usage:
15+
## Usage
1516

16-
The first step is to convert the locked dependencies by Cargo into a format flatpak-builder can understand
17+
Poetry users: first activate your virtualenv by running `poetry shell`.
18+
19+
Convert the locked dependencies by Cargo into a format flatpak-builder can understand:
1720
```
1821
python3 ./flatpak-cargo-generator.py ./quickstart/Cargo.lock -o cargo-sources.json
1922
```

cargo/pyproject.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[tool.poetry]
2+
package-mode = false
3+
4+
[tool.poetry.dependencies]
5+
python = ">=3.8"
6+
aiohttp = "^3.9.5"
7+
toml = "^0.10.2"
8+
9+
10+
[build-system]
11+
requires = ["poetry-core"]
12+
build-backend = "poetry.core.masonry.api"

0 commit comments

Comments
 (0)