mirror of
https://github.com/element-hq/synapse.git
synced 2024-12-14 11:57:44 +00:00
Add systemd-python to optional dependencies (#4339)
Using systemd-python allows for logging to the systemd journal, as is documented in: `synapse/contrib/systemd/log_config.yaml`. Signed-off-by: Silke Hofstra <silke@slxh.eu>
This commit is contained in:
parent
6e27a8620f
commit
a137f4eac0
4 changed files with 13 additions and 10 deletions
1
changelog.d/4339.feature
Normal file
1
changelog.d/4339.feature
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Add systemd-python to the optional dependencies to enable logging to the systemd journal. Install with `pip install matrix-synapse[systemd]`.
|
|
@ -50,7 +50,9 @@ RUN apt-get update -qq -o Acquire::Languages=none \
|
||||||
debhelper \
|
debhelper \
|
||||||
devscripts \
|
devscripts \
|
||||||
dh-systemd \
|
dh-systemd \
|
||||||
|
libsystemd-dev \
|
||||||
lsb-release \
|
lsb-release \
|
||||||
|
pkg-config \
|
||||||
python3-dev \
|
python3-dev \
|
||||||
python3-pip \
|
python3-pip \
|
||||||
python3-setuptools \
|
python3-setuptools \
|
||||||
|
|
6
setup.py
6
setup.py
|
@ -86,13 +86,9 @@ long_description = read_file(("README.rst",))
|
||||||
|
|
||||||
REQUIREMENTS = dependencies['REQUIREMENTS']
|
REQUIREMENTS = dependencies['REQUIREMENTS']
|
||||||
CONDITIONAL_REQUIREMENTS = dependencies['CONDITIONAL_REQUIREMENTS']
|
CONDITIONAL_REQUIREMENTS = dependencies['CONDITIONAL_REQUIREMENTS']
|
||||||
|
ALL_OPTIONAL_REQUIREMENTS = dependencies['ALL_OPTIONAL_REQUIREMENTS']
|
||||||
|
|
||||||
# Make `pip install matrix-synapse[all]` install all the optional dependencies.
|
# Make `pip install matrix-synapse[all]` install all the optional dependencies.
|
||||||
ALL_OPTIONAL_REQUIREMENTS = set()
|
|
||||||
|
|
||||||
for optional_deps in CONDITIONAL_REQUIREMENTS.values():
|
|
||||||
ALL_OPTIONAL_REQUIREMENTS = set(optional_deps) | ALL_OPTIONAL_REQUIREMENTS
|
|
||||||
|
|
||||||
CONDITIONAL_REQUIREMENTS["all"] = list(ALL_OPTIONAL_REQUIREMENTS)
|
CONDITIONAL_REQUIREMENTS["all"] = list(ALL_OPTIONAL_REQUIREMENTS)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -86,18 +86,22 @@ CONDITIONAL_REQUIREMENTS = {
|
||||||
"acme": ["txacme>=0.9.2"],
|
"acme": ["txacme>=0.9.2"],
|
||||||
|
|
||||||
"saml2": ["pysaml2>=4.5.0"],
|
"saml2": ["pysaml2>=4.5.0"],
|
||||||
|
"systemd": ["systemd-python>=231"],
|
||||||
"url_preview": ["lxml>=3.5.0"],
|
"url_preview": ["lxml>=3.5.0"],
|
||||||
"test": ["mock>=2.0", "parameterized"],
|
"test": ["mock>=2.0", "parameterized"],
|
||||||
"sentry": ["sentry-sdk>=0.7.2"],
|
"sentry": ["sentry-sdk>=0.7.2"],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ALL_OPTIONAL_REQUIREMENTS = set()
|
||||||
|
|
||||||
|
for name, optional_deps in CONDITIONAL_REQUIREMENTS.items():
|
||||||
|
# Exclude systemd as it's a system-based requirement.
|
||||||
|
if name not in ["systemd"]:
|
||||||
|
ALL_OPTIONAL_REQUIREMENTS = set(optional_deps) | ALL_OPTIONAL_REQUIREMENTS
|
||||||
|
|
||||||
|
|
||||||
def list_requirements():
|
def list_requirements():
|
||||||
deps = set(REQUIREMENTS)
|
return list(set(REQUIREMENTS) | ALL_OPTIONAL_REQUIREMENTS)
|
||||||
for opt in CONDITIONAL_REQUIREMENTS.values():
|
|
||||||
deps = set(opt) | deps
|
|
||||||
|
|
||||||
return list(deps)
|
|
||||||
|
|
||||||
|
|
||||||
class DependencyException(Exception):
|
class DependencyException(Exception):
|
||||||
|
|
Loading…
Reference in a new issue