Skip to content

Commit 1c7258e

Browse files
committed
Doc: Update the synapse installation section with poetry usage
1 parent ac0d823 commit 1c7258e

File tree

2 files changed

+9
-30
lines changed

2 files changed

+9
-30
lines changed

changelog.d/pr-7521.doc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Doc: Explain in docs/integration_tests.md how to use Python poetry to install synapse locally

docs/integration_tests.md

Lines changed: 8 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,12 @@ The documentation describes what we do to have one, using [Synapse](https://gith
3131

3232
Steps:
3333

34-
- Install virtualenv
34+
- Install poetry
3535

3636
```bash
37-
python3 -m pip install virtualenv
37+
pip install --user pipx
38+
pipx install poetry
39+
python3 -m pipx ensurepath # To run if `pipx install poetry` complained about PATH not being correctly set
3840
```
3941

4042
- Clone Synapse repository
@@ -52,11 +54,8 @@ You should have the develop branch cloned by default.
5254
- Run synapse, from the Synapse folder you just cloned
5355

5456
```bash
55-
virtualenv -p python3 env
56-
source env/bin/activate
57-
pip install -e .
58-
demo/start.sh --no-rate-limit
59-
57+
poetry install --extras all
58+
poetry run ./demo/start.sh --no-rate-limit
6059
```
6160

6261
Alternatively, to install the latest Synapse release package (and not a cloned branch) you can run the following instead of `git clone` and `pip install -e .`:
@@ -86,13 +85,7 @@ It can be done using this command:
8685
To stop Synapse, you can run the following commands:
8786

8887
```bash
89-
./demo/stop.sh
90-
```
91-
92-
And you can deactivate the virtualenv:
93-
94-
```bash
95-
deactivate
88+
poetry run ./demo/stop.sh
9689
```
9790

9891
## Troubleshoot
@@ -113,19 +106,4 @@ Ensure you have the following configuration in `demo/etc/8080.config`.
113106
public_baseurl: http://10.0.2.2:8080/
114107
```
115108

116-
After changing this you will need to restart synapse using `demo/stop.sh` and `demo/start.sh` to load the new configuration.
117-
118-
### virtualenv command fails
119-
120-
You can try using
121-
```bash
122-
python3 -m venv env
123-
```
124-
or
125-
```bash
126-
python3 -m virtualenv env
127-
```
128-
instead of
129-
```bash
130-
virtualenv -p python3 env
131-
```
109+
After changing this you will need to restart synapse using `poetry run demo/stop.sh` and `poetry run demo/start.sh` to load the new configuration.

0 commit comments

Comments
 (0)