summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-python/cattrs/Manifest1
-rw-r--r--dev-python/cattrs/cattrs-22.1.0.ebuild60
2 files changed, 61 insertions, 0 deletions
diff --git a/dev-python/cattrs/Manifest b/dev-python/cattrs/Manifest
index b44f49d62b20..a5aee28ff19c 100644
--- a/dev-python/cattrs/Manifest
+++ b/dev-python/cattrs/Manifest
@@ -1 +1,2 @@
DIST cattrs-1.10.0.gh.tar.gz 100657 BLAKE2B b0475644bdd31e12dabf7b969e1890932309497e66b45a311e97d56062e99837af11677c24e33c6d1bed6ec2c6373eab6535874115960ed450f52804a6e5d73e SHA512 51cda84d30627f9d0eb6842c45f7c91dd2f3d9a21b1a635ad21d0648d409b576f52e6127392d60bdd1b6a803f8f897f970706b9cc64b703c06387bc85cd3740e
+DIST cattrs-22.1.0.gh.tar.gz 108033 BLAKE2B 823e3ab466fd73385a4aaefb547b3457ee9cd100f38b6778c26bbe3d93e23ed9a00f071d6a5d7626da91e6660e2a8118e70cfa53a5960d550b9038fffec58eef SHA512 db1effb8d632dc3843d38b18bcd439c35d8bae0e4379b075417eaedbc130f6426186c0d299bc5b5d68a7354d7c5e53927ba5e0e989d498841a73237c588febb8
diff --git a/dev-python/cattrs/cattrs-22.1.0.ebuild b/dev-python/cattrs/cattrs-22.1.0.ebuild
new file mode 100644
index 000000000000..5f09a67c0719
--- /dev/null
+++ b/dev-python/cattrs/cattrs-22.1.0.ebuild
@@ -0,0 +1,60 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=poetry
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit distutils-r1
+
+DESCRIPTION="Composable complex class support for attrs and dataclasses"
+HOMEPAGE="
+ https://pypi.org/project/cattrs/
+ https://github.com/python-attrs/cattrs/
+"
+SRC_URI="
+ https://github.com/python-attrs/cattrs/archive/v${PV}.tar.gz
+ -> ${P}.gh.tar.gz
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="
+ >=dev-python/attrs-20.1.0[${PYTHON_USEDEP}]
+ $(python_gen_cond_dep '
+ dev-python/exceptiongroup[${PYTHON_USEDEP}]
+ ' 3.8 3.9 3.10)
+"
+BDEPEND="
+ test? (
+ dev-python/hypothesis[${PYTHON_USEDEP}]
+ dev-python/immutables[${PYTHON_USEDEP}]
+ )
+"
+# test_preconf:
+# dev-python/bson[${PYTHON_USEDEP}]
+# dev-python/msgpack[${PYTHON_USEDEP}]
+# dev-python/orjson[${PYTHON_USEDEP}]
+# dev-python/pyyaml[${PYTHON_USEDEP}]
+# dev-python/tomlkit[${PYTHON_USEDEP}]
+# dev-python/ujson[${PYTHON_USEDEP}]
+
+distutils_enable_tests pytest
+
+src_prepare() {
+ sed -e 's:--benchmark.*::' \
+ -e '/addopts/d' \
+ -i pyproject.toml || die
+ # backport pyproject.toml fix (50ba769c8349f5891b157d2bb7f06602822ac0a3)
+ sed -e 's:group.dev.dependencies:dev-dependencies:' \
+ -i pyproject.toml || die
+ distutils-r1_src_prepare
+}
+
+python_test() {
+ # unpackaged deps, see above
+ epytest tests --ignore tests/test_preconf.py
+}