Gentoo Archives: gentoo-commits

From: Benda XU <heroxbd@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/xdoctest/
Date: Sun, 09 Feb 2020 12:46:30
Message-Id: 1581252229.55c256add4c40c3ea82be950a39952f1ab78dfe7.heroxbd@gentoo
1 commit: 55c256add4c40c3ea82be950a39952f1ab78dfe7
2 Author: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
3 AuthorDate: Thu Jan 30 17:28:43 2020 +0000
4 Commit: Benda XU <heroxbd <AT> gentoo <DOT> org>
5 CommitDate: Sun Feb 9 12:43:49 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=55c256ad
7
8 dev-python/xdoctest: A rewrite of Python's builtin doctest module
9
10 (with pytest plugin integration) but without all the weirdness
11
12 Bug: https://github.com/gentoo/gentoo/pull/14344
13 Bug: https://bugs.gentoo.org/705872
14
15 Package-Manager: Portage-2.3.84, Repoman-2.3.20
16 Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> riseup.net>
17 Signed-off-by: Benda Xu <heroxbd <AT> gentoo.org>
18
19 dev-python/xdoctest/Manifest | 1 +
20 dev-python/xdoctest/metadata.xml | 9 +++++++
21 dev-python/xdoctest/xdoctest-0.11.0.ebuild | 40 ++++++++++++++++++++++++++++++
22 3 files changed, 50 insertions(+)
23
24 diff --git a/dev-python/xdoctest/Manifest b/dev-python/xdoctest/Manifest
25 new file mode 100644
26 index 00000000000..b2f56e769ef
27 --- /dev/null
28 +++ b/dev-python/xdoctest/Manifest
29 @@ -0,0 +1 @@
30 +DIST xdoctest-0.11.0.tar.gz 123871 BLAKE2B ef766ae79b1566a243abbb31671a6e57184196079cda146081c73cf4aa2583b612b438ea8ff031a1c3d4da612034bccb1990a954ad4d2af55546edd7f7085238 SHA512 63629435e976d2ece770b13432f1857127e7d9c9c954e11e904c1f25b1a9e82d5cf99ff912656260f6c4ed8b08e27ab0fb2d39e621d94ccac9c797fc294bcc62
31
32 diff --git a/dev-python/xdoctest/metadata.xml b/dev-python/xdoctest/metadata.xml
33 new file mode 100644
34 index 00000000000..ca93985fb0d
35 --- /dev/null
36 +++ b/dev-python/xdoctest/metadata.xml
37 @@ -0,0 +1,9 @@
38 +<?xml version="1.0" encoding="UTF-8"?>
39 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
40 +
41 +<pkgmetadata>
42 + <maintainer type="project">
43 + <email>sci@g.o</email>
44 + <name>Gentoo Science Project</name>
45 + </maintainer>
46 +</pkgmetadata>
47
48 diff --git a/dev-python/xdoctest/xdoctest-0.11.0.ebuild b/dev-python/xdoctest/xdoctest-0.11.0.ebuild
49 new file mode 100644
50 index 00000000000..ddcfe852c5c
51 --- /dev/null
52 +++ b/dev-python/xdoctest/xdoctest-0.11.0.ebuild
53 @@ -0,0 +1,40 @@
54 +# Copyright 1999-2020 Gentoo Authors
55 +# Distributed under the terms of the GNU General Public License v2
56 +
57 +EAPI=7
58 +
59 +PYTHON_COMPAT=( python3_{6,7,8} )
60 +
61 +DISTUTILS_USE_SETUPTOOLS=rdepend
62 +
63 +inherit distutils-r1
64 +
65 +DESCRIPTION="A rewrite of Python's builtin doctest module but without all the weirdness"
66 +HOMEPAGE="https://github.com/Erotemic/ubelt"
67 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
68 +
69 +SLOT="0"
70 +LICENSE="Apache-2.0"
71 +KEYWORDS="~amd64 ~x86"
72 +
73 +RDEPEND="dev-python/six[${PYTHON_USEDEP}]"
74 +
75 +distutils_enable_tests pytest
76 +distutils_enable_sphinx docs/source dev-python/sphinx_rtd_theme
77 +
78 +python_prepare_all() {
79 + # fails because the ebuild environment location is not the expected location
80 + sed -i -e 's:test_xdoc_console_script_location:_&:' \
81 + testing/test_entry_point.py || die
82 +
83 + # xdoctest has to be in PATH for this to work
84 + sed -i -e 's:test_xdoc_console_script_exec:_&:' \
85 + testing/test_entry_point.py || die
86 +
87 + distutils-r1_python_prepare_all
88 +}
89 +
90 +python_test() {
91 + PYTHONPATH="${WORKDIR}/${P}"
92 + pytest -vv || die "Test fail with ${EPYTHON}"
93 +}