diff --git a/docs/admin/install.rst b/docs/admin/install.rst index d7af8b5c37b1..eb498d7fefb6 100644 --- a/docs/admin/install.rst +++ b/docs/admin/install.rst @@ -186,58 +186,63 @@ Django REST Framework - Weblate feature - * - ``Amazon`` + * - ``alibaba`` + - `aliyun-python-sdk-alimt `_ + - :ref:`mt-alibaba` + + * - ``amazon`` - `boto3 `_ - :ref:`mt-aws` - * - ``LDAP`` - - `django-auth-ldap `_ - - :ref:`ldap-auth` - - - * - ``zxcvbn`` - - `django-zxcvbn-password `_ - - :ref:`password-authentication` + * - ``antispam`` + - `python-akismet `_ + - :ref:`spam-protection` - * - ``Gerrit`` + * - ``gerrit`` - `git-review `_ - :ref:`vcs-gerrit` - * - ``Google`` + * - ``google`` - `google-cloud-translate `_ - :ref:`mt-google-translate-api-v3` - * - ``Mercurial`` + * - ``ldap`` + - `django-auth-ldap `_ + - :ref:`ldap-auth` + + + + * - ``mercurial`` - `mercurial `_ - :ref:`vcs-mercurial` - * - ``MySQL`` + * - ``mysql`` - `mysqlclient `_ - MySQL or MariaDB, see :ref:`database-setup` - * - ``OpenAI`` + + * - ``openai`` - `openai `_ - :ref:`mt-openai` - * - ``Postgres`` + * - ``postgres`` - `psycopg `_ - PostgreSQL, see :ref:`database-setup` - * - ``Antispam`` - - `python-akismet `_ - - :ref:`spam-protection` - - * - ``SAML`` + * - ``saml`` - `python3-saml `_ - :ref:`saml-auth` + * - ``zxcvbn`` + - `django-zxcvbn-password `_ + - :ref:`password-authentication` When installing using pip, you can directly specify desired features when installing: diff --git a/pyproject.toml b/pyproject.toml index 71ec6bd52357..4fc89d4c2995 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -122,7 +122,8 @@ dev = [ "PyICU==2.12", "reuse==3.0.2", "scour==0.38.2", - "tinyunicodeblock==1.3" + "tinyunicodeblock==1.3", + "tomli" ] gerrit = [ "git-review>=2.2.0,<2.5.0" diff --git a/scripts/show-extras b/scripts/show-extras index b217f686fb93..0d5dbc2b0b86 100755 --- a/scripts/show-extras +++ b/scripts/show-extras @@ -6,6 +6,8 @@ import re +import tomli + print( """ .. Table is generated using scripts/show-extras @@ -19,20 +21,17 @@ print( """ ) -with open("requirements-optional.txt") as requirements: - section = None - for line in requirements: - line = line.strip() - if line.startswith("-r") or not line: - continue - if line.startswith("#"): - section = line[2:] - else: - dependency = re.split("[;<>=[]", line)[0].strip() - print( - f""" +with open("pyproject.toml", "rb") as handle: + toml_dict = tomli.load(handle) + +for section, data in toml_dict["project"]["optional-dependencies"].items(): + if section in {"all", "ci", "dev", "lint", "mypy", "test"}: + continue + dependency = re.split("[;<>=[]", data[0])[0].strip() + print( + f""" * - ``{section}`` - `{dependency} `_ - """ - ) + )