-
Notifications
You must be signed in to change notification settings - Fork 756
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doc: Update the synapse installation section with poetry usage #7521
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Doc: Explain in docs/integration_tests.md how to use Python poetry to install synapse locally |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,10 +31,12 @@ The documentation describes what we do to have one, using [Synapse](https://gith | |
|
||
Steps: | ||
|
||
- Install virtualenv | ||
- Install poetry | ||
|
||
```bash | ||
python3 -m pip install virtualenv | ||
pip install --user pipx | ||
pipx install poetry | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Personal note, maybe mention it here: poetry 1.2 is required. Check that this is the installed version. When I run it, it installed version 1.1.13, I do not know why... |
||
python3 -m pipx ensurepath # To run if `pipx install poetry` complained about PATH not being correctly set | ||
``` | ||
|
||
- Clone Synapse repository | ||
|
@@ -52,11 +54,8 @@ You should have the develop branch cloned by default. | |
- Run synapse, from the Synapse folder you just cloned | ||
|
||
```bash | ||
virtualenv -p python3 env | ||
source env/bin/activate | ||
pip install -e . | ||
demo/start.sh --no-rate-limit | ||
|
||
poetry install --extras all | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
poetry run ./demo/start.sh --no-rate-limit | ||
``` | ||
|
||
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: | |
To stop Synapse, you can run the following commands: | ||
|
||
```bash | ||
./demo/stop.sh | ||
``` | ||
|
||
And you can deactivate the virtualenv: | ||
|
||
```bash | ||
deactivate | ||
poetry run ./demo/stop.sh | ||
``` | ||
|
||
## Troubleshoot | ||
|
@@ -113,19 +106,4 @@ Ensure you have the following configuration in `demo/etc/8080.config`. | |
public_baseurl: http://10.0.2.2:8080/ | ||
``` | ||
|
||
After changing this you will need to restart synapse using `demo/stop.sh` and `demo/start.sh` to load the new configuration. | ||
|
||
### virtualenv command fails | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You will need to update the toc by running |
||
|
||
You can try using | ||
```bash | ||
python3 -m venv env | ||
``` | ||
or | ||
```bash | ||
python3 -m virtualenv env | ||
``` | ||
instead of | ||
```bash | ||
virtualenv -p python3 env | ||
``` | ||
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pip3 install --user pipx
worked here.