Skip to content
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

Describe how to install from source with poetry #505

Merged
merged 3 commits into from
Feb 23, 2022
Merged
Show file tree
Hide file tree
Changes from all 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
35 changes: 20 additions & 15 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ To install Sydent's dependencies on a Debian-based system, run::
sudo apt-get install build-essential python3-dev libffi-dev \
sqlite3 libssl-dev python-virtualenv libxslt1-dev

Creating the virtualenv
-----------------------
From here, you can either install Sydent by using a PyPI release, or by recreating Sydent's locked runtime environment.


Installing the latest Sydent release from PyPI
----------------------------------------------

To create the virtual environment in which Sydent will run::

Expand All @@ -19,33 +22,35 @@ To create the virtual environment in which Sydent will run::
pip install --upgrade pip
pip install --upgrade setuptools


Installing the latest Sydent release from PyPI
----------------------------------------------

Sydent and its dependencies can be installed using ``pip`` by running::

pip install matrix-sydent

With the virtualenv activated, you can run Sydent using::

python -m sydent.sydent

Installing from source
----------------------
~~~~~~~~~~~~~~~~~~~~~~

Alternatively, Sydent can be installed using ``pip`` from a local git checkout::
Alternatively, Sydent can be installed using ``poetry`` from a local git checkout.
First install `poetry`. See `poetry's documentation <https://python-poetry.org/docs/#installation>`_ for details; we recommend installing via `pipx`. Once that's done::

git clone https://github.com/matrix-org/sydent.git
cd sydent
pip install -e .
poetry install --no-dev
# For development, pull in extra tools with
# poetry install

To start Sydent::

poetry run sydent

Running Sydent
==============

With the virtualenv activated, you can run Sydent using::

python -m sydent.sydent

This will create a configuration file in ``sydent.conf`` with some defaults. If a setting is
defined in both the ``[DEFAULT]`` section and another section in the configuration file,
When Sydent is first run, it will create a configuration file in ``sydent.conf`` with some defaults.
If a setting is defined in both the ``[DEFAULT]`` section and another section in the configuration file,
then the value in the other section is used.

You'll most likely want to change the server name (``server.name``) and specify an email server
Expand Down
1 change: 1 addition & 0 deletions changelog.d/505.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update README to describe how to install from source with poetry.