From f698b19de6e7deaccac0e4c726fabccd8cf648cd Mon Sep 17 00:00:00 2001 From: "Anna (cybertailor) Vyalkova" Date: Thu, 18 Jan 2024 23:34:27 +0500 Subject: dev-python/mautrix: new revision * Enable Python 3.12 * Enable docs * Enable Postgres tests * Add dev-python/python-magic optfeature * Add "crypt" USE flag * Fix test deps * Switch to GH tarball for test data Signed-off-by: Anna (cybertailor) Vyalkova --- dev-python/mautrix/Manifest | 1 + dev-python/mautrix/mautrix-0.20.4-r1.ebuild | 68 +++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 dev-python/mautrix/mautrix-0.20.4-r1.ebuild (limited to 'dev-python/mautrix') diff --git a/dev-python/mautrix/Manifest b/dev-python/mautrix/Manifest index 3f5aa7c71..1ea104a0e 100644 --- a/dev-python/mautrix/Manifest +++ b/dev-python/mautrix/Manifest @@ -1 +1,2 @@ +DIST mautrix-0.20.4.gh.tar.gz 244467 BLAKE2B adbab30c4b4e08b2def968bc7b85c4402cf32cfa4f15b17c8ba126a93230e2d84c6a43a3cc8bd0fe409d4fd1f9129a65c89d68ae61aaecd869cbf62480ff2883 SHA512 30a1a82fdb6875cd24dc685c567ad9c73eaa2d6a25e188498bdfec452dc530c0efa4373d3a1d2b217c5238ee9f33fc2d892549ea576c2f487f942a38eb8363d5 DIST mautrix-0.20.4.tar.gz 243441 BLAKE2B 8aadbe0147585dbd8c8d019fdbdbbcdd14f8ff3717ef9894abf431a1fe34e6fc8bc1a0dfb27235a04ff48aea60f19f6ee1d362b5712bfe7a1f2be51f774fa8bc SHA512 57bc8a975702d8ab1f5cc28a2d8556a4fb346b299dd9c6f8c1c55c177aaabb1a0a198c4becb9eb8fd7887b142b7ffd6ca3031859d1ea417307fa265c7e4877ba diff --git a/dev-python/mautrix/mautrix-0.20.4-r1.ebuild b/dev-python/mautrix/mautrix-0.20.4-r1.ebuild new file mode 100644 index 000000000..bafae7cca --- /dev/null +++ b/dev-python/mautrix/mautrix-0.20.4-r1.ebuild @@ -0,0 +1,68 @@ +# Copyright 2022-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{10..12} ) +inherit edo databases distutils-r1 optfeature + +DESCRIPTION="A Python 3 asyncio Matrix framework" +HOMEPAGE=" + https://pypi.org/project/mautrix/ + https://github.com/mautrix/python +" + +# use github tarball for test data +SRC_URI="https://github.com/mautrix/python/archive/refs/tags/v${PV}.tar.gz -> ${P}.gh.tar.gz" +S="${WORKDIR}/python-${PV}" + +LICENSE="MPL-2.0" +SLOT="0" +KEYWORDS="~amd64" +IUSE="crypt" +REQUIRED_USE="test? ( crypt )" + +RDEPEND=" + dev-python/aiohttp[${PYTHON_USEDEP}] + dev-python/attrs[${PYTHON_USEDEP}] + dev-python/yarl[${PYTHON_USEDEP}] + crypt? ( + dev-python/python-olm[${PYTHON_USEDEP}] + dev-python/pycryptodome[${PYTHON_USEDEP}] + dev-python/unpaddedbase64[${PYTHON_USEDEP}] + ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + test? ( + dev-python/aiosqlite[${PYTHON_USEDEP}] + dev-python/asyncpg[${PYTHON_USEDEP}] + dev-python/pytest-asyncio[${PYTHON_USEDEP}] + dev-python/ruamel-yaml[${PYTHON_USEDEP}] + $(epostgres --get-depend) + ) +" + +distutils_enable_tests pytest + +distutils_enable_sphinx docs \ + dev-python/sphinx-rtd-theme + +src_test() { + local -x PGHOST="$(epostgres --get-sockdir)" + local -x PGPORT="65432" + local -x PGUSER="postgres" + local -x MEOW_TEST_PG_URL="postgresql:///meow" + + epostgres --start ${PGPORT} + edo createdb -U postgres meow + + distutils-r1_src_test + epostgres --stop +} + +pkg_postinst() { + optfeature "MIME type detection support" dev-python/python-magic + optfeature "media transcoding support" media-video/ffmpeg +} -- cgit v1.2.3-65-gdbad