Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Document common fix of Poetry problems by removing egg-info #13785

Merged
merged 4 commits into from
Sep 15, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/13785.doc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add docs for common fix of deleting the `matrix_synapse.egg-info/` directory for fixing Python dependency problems.
27 changes: 27 additions & 0 deletions docs/development/dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,23 @@ context of poetry's venv, without having to run `poetry shell` beforehand.
poetry install --extras all --remove-untracked
```

## ...delete everything and start over from scratch?

```shell
# Stop the current virtualenv if active
$ deactivate

# Find the venv for poetry
$ poetry env info --path
# Remove all of the files from the current environment
$ rm -rf $(poetry env info --path)
MadLittleMods marked this conversation as resolved.
Show resolved Hide resolved

# Reactivate Poetry shell
$ poetry shell
# Install everything
$ poetry install --extras all
```

## ...run a command in the `poetry` virtualenv?

Use `poetry run cmd args` when you need the python virtualenv context.
Expand Down Expand Up @@ -256,6 +273,16 @@ from PyPI. (This is what makes poetry seem slow when doing the first
`poetry install`.) Try `poetry cache list` and `poetry cache clear --all
<name of cache>` to see if that fixes things.

## Remove outdated egg-info

Delete the `matrix_synapse.egg-info/` directory from the root of your Synapse
install.
Comment on lines +278 to +279
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we know (@erikjohnston maybe?) what causes this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think poetry install does this now :/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Every time I do a poetry install --extras all, it appears again.


This stores some cached information about dependencies and often conflicts with
letting Poetry do the right thing.



## Try `--verbose` or `--dry-run` arguments.

Sometimes useful to see what poetry's internal logic is.