Gentoo Archives: gentoo-commits

From: Marek Szuba <marecki@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/cerberus/, dev-python/cerberus/files/
Date: Fri, 11 Jun 2021 11:28:31
Message-Id: 1623410897.5b160e143d36f6dd8871bc45adc2cf9cd9df7838.marecki@gentoo
1 commit: 5b160e143d36f6dd8871bc45adc2cf9cd9df7838
2 Author: Marek Szuba <marecki <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jun 11 11:24:32 2021 +0000
4 Commit: Marek Szuba <marecki <AT> gentoo <DOT> org>
5 CommitDate: Fri Jun 11 11:28:17 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5b160e14
7
8 dev-python/cerberus: initial import
9
10 Dependency of Ansible Molecule. Builds, tests and installs fine on all
11 implementations listed in PYTHON_COMPAT.
12 Adding 1.3.2 in spite of it not being the latest upstream version
13 because 1.3.3 and 1.3.4 are known to be broken, see
14 https://github.com/pyeve/cerberus/issues/568
15
16 Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>
17
18 dev-python/cerberus/Manifest | 1 +
19 dev-python/cerberus/cerberus-1.3.2.ebuild | 24 ++++++++++++++++++++++
20 .../files/cerberus-1.3.2_no-pytest-runner.patch | 13 ++++++++++++
21 .../files/cerberus-1.3.2_test-installation.patch | 11 ++++++++++
22 dev-python/cerberus/metadata.xml | 12 +++++++++++
23 5 files changed, 61 insertions(+)
24
25 diff --git a/dev-python/cerberus/Manifest b/dev-python/cerberus/Manifest
26 new file mode 100644
27 index 00000000000..59e83aabb5d
28 --- /dev/null
29 +++ b/dev-python/cerberus/Manifest
30 @@ -0,0 +1 @@
31 +DIST cerberus-1.3.2.tar.gz 149344 BLAKE2B ce65f3c4c612f87562c28f913cac95c1c7af9b2dfa72955bce3f0e0459e4ff9024a126ceea4587e2c72cf606be2a249046a090a2e2d5e908bfe4b700ba5e9b92 SHA512 e9cfef5a936783eb0576afd3d23397dab38d8c88b6b43f98de0ad7e20739e5ff983eaf4ac769206adb7fe9692c651583f6a5f2bab263b81b8de96f45707c84fb
32
33 diff --git a/dev-python/cerberus/cerberus-1.3.2.ebuild b/dev-python/cerberus/cerberus-1.3.2.ebuild
34 new file mode 100644
35 index 00000000000..d4378677e3d
36 --- /dev/null
37 +++ b/dev-python/cerberus/cerberus-1.3.2.ebuild
38 @@ -0,0 +1,24 @@
39 +# Copyright 1999-2021 Gentoo Authors
40 +# Distributed under the terms of the GNU General Public License v2
41 +
42 +EAPI=7
43 +
44 +PYTHON_COMPAT=( python3_{8..10} )
45 +DISTUTILS_USE_SETUPTOOLS=rdepend
46 +
47 +inherit distutils-r1
48 +
49 +DESCRIPTION="A lightweight and extensible data-validation library for Python"
50 +HOMEPAGE="https://docs.python-cerberus.org/"
51 +SRC_URI="https://github.com/pyeve/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
52 +
53 +LICENSE="ISC"
54 +SLOT="0"
55 +KEYWORDS="~amd64"
56 +
57 +PATCHES=(
58 + "${FILESDIR}"/${PN}-1.3.2_no-pytest-runner.patch
59 + "${FILESDIR}"/${PN}-1.3.2_test-installation.patch
60 +)
61 +
62 +distutils_enable_tests pytest
63
64 diff --git a/dev-python/cerberus/files/cerberus-1.3.2_no-pytest-runner.patch b/dev-python/cerberus/files/cerberus-1.3.2_no-pytest-runner.patch
65 new file mode 100644
66 index 00000000000..b9216385d64
67 --- /dev/null
68 +++ b/dev-python/cerberus/files/cerberus-1.3.2_no-pytest-runner.patch
69 @@ -0,0 +1,13 @@
70 +--- a/setup.py
71 ++++ b/setup.py
72 +@@ -11,9 +11,7 @@
73 + LONG_DESCRIPTION = open("README.rst").read()
74 + VERSION = "1.3.2"
75 +
76 +-setup_requires = (
77 +- ["pytest-runner"] if any(x in sys.argv for x in ("pytest", "test", "ptr")) else []
78 +-)
79 ++setup_requires = []
80 +
81 +
82 + setup(
83
84 diff --git a/dev-python/cerberus/files/cerberus-1.3.2_test-installation.patch b/dev-python/cerberus/files/cerberus-1.3.2_test-installation.patch
85 new file mode 100644
86 index 00000000000..381822f1799
87 --- /dev/null
88 +++ b/dev-python/cerberus/files/cerberus-1.3.2_test-installation.patch
89 @@ -0,0 +1,11 @@
90 +--- a/setup.py
91 ++++ b/setup.py
92 +@@ -35,7 +35,7 @@
93 + ),
94 + license="ISC",
95 + platforms=["any"],
96 +- packages=find_packages(),
97 ++ packages=find_packages(exclude=("cerberus.tests",)),
98 + include_package_data=True,
99 + setup_requires=setup_requires,
100 + tests_require=["pytest"],
101
102 diff --git a/dev-python/cerberus/metadata.xml b/dev-python/cerberus/metadata.xml
103 new file mode 100644
104 index 00000000000..14abdcf7802
105 --- /dev/null
106 +++ b/dev-python/cerberus/metadata.xml
107 @@ -0,0 +1,12 @@
108 +<?xml version="1.0" encoding="UTF-8"?>
109 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
110 +<pkgmetadata>
111 + <maintainer type="person">
112 + <email>marecki@g.o</email>
113 + <name>Marek Szuba</name>
114 + </maintainer>
115 + <upstream>
116 + <remote-id type="github">pyeve/cerberus</remote-id>
117 + <remote-id type="pypi">Cerberus</remote-id>
118 + </upstream>
119 +</pkgmetadata>