commit: 748c35b6760f0f51cd42fdda623f219ee0b17d37
Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 19 17:44:04 2024 +0000
Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Fri Apr 19 17:44:04 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=748c35b6
dev-python/dataclasses-json: new package, add 0.6.4
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>
dev-python/dataclasses-json/Manifest | 1 +
.../dataclasses-json/dataclasses-json-0.6.4.ebuild | 50 ++++++++++++++++++++++
dev-python/dataclasses-json/metadata.xml | 12 ++++++
3 files changed, 63 insertions(+)
diff --git a/dev-python/dataclasses-json/Manifest
b/dev-python/dataclasses-json/Manifest
new file mode 100644
index 000000000000..3b7ae4d3c603
--- /dev/null
+++ b/dev-python/dataclasses-json/Manifest
@@ -0,0 +1 @@
+DIST dataclasses-json-0.6.4.gh.tar.gz 75729 BLAKE2B
242552cda0917664e30d8f4ec7b247e2fd402e82c9a130e09e9a8163d2fb202b56b6dfcbf1f7982d953fbfe85e95978946af1ec441c568c975cfdbbe75a34676
SHA512
78c94055e55703266de19fe0f712ca4945443f124cc75469e7b68b32cd13d0e1effcc5450f7539d9cde42698b38f4e749a912ef7bf39af4c13981a36b4234746
diff --git a/dev-python/dataclasses-json/dataclasses-json-0.6.4.ebuild
b/dev-python/dataclasses-json/dataclasses-json-0.6.4.ebuild
new file mode 100644
index 000000000000..c4f92b69350f
--- /dev/null
+++ b/dev-python/dataclasses-json/dataclasses-json-0.6.4.ebuild
@@ -0,0 +1,50 @@
+# Copyright 2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=poetry
+PYTHON_COMPAT=( python3_{10..12} )
+inherit distutils-r1
+
+DESCRIPTION="Easily serialize Data Classes to and from JSON"
+HOMEPAGE="
+ https://pypi.org/project/dataclasses-json/
+ https://github.com/lidatong/dataclasses-json
+"
+SRC_URI="https://github.com/lidatong/${PN}/archive/refs/tags/v${PV}.tar.gz ->
${P}.gh.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="
+ dev-python/typing_inspect[${PYTHON_USEDEP}]
+ dev-python/marshmallow[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ test? (
+ dev-python/hypothesis[${PYTHON_USEDEP}]
+ dev-python/simplejson[${PYTHON_USEDEP}]
+ )
+"
+
+distutils_enable_tests pytest
+
+python_prepare_all() {
+ # the normal poetry backend works for us if we fill in the version
+ sed -r -i pyproject.toml \
+ -e
's:poetry_dynamic_versioning.backend:poetry.core.masonry.api:' \
+ -e 's:,[[:space:]]*"poetry-dynamic-versioning"::' \
+ -e
"s:(version[[:space:]]*=[[:space:]]*)\"[0-9.]*\":\1\"${PV}\":" \
+ || die
+
+ # remove mypy dep for running tests
+ rm tests/test_annotations.py || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ epytest tests
+}
diff --git a/dev-python/dataclasses-json/metadata.xml
b/dev-python/dataclasses-json/metadata.xml
new file mode 100644
index 000000000000..b8404117a595
--- /dev/null
+++ b/dev-python/dataclasses-json/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>[email protected]</email>
+ <name>Patrick McLean</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="pypi">dataclasses-json</remote-id>
+ <remote-id type="github">lidatong/dataclasses-json</remote-id>
+ </upstream>
+</pkgmetadata>