Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pyx/
Date: Sun, 08 Mar 2020 14:29:52
Message-Id: 1583677704.2306abf7b7dff84b88c945de2701e0e364658f89.mgorny@gentoo
1 commit: 2306abf7b7dff84b88c945de2701e0e364658f89
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sun Mar 8 12:57:15 2020 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sun Mar 8 14:28:24 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2306abf7
7
8 dev-python/pyx: Bump to 0.15, add tests
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/pyx/Manifest | 2 +
13 dev-python/pyx/pyx-0.15.ebuild | 88 ++++++++++++++++++++++++++++++++++++++++++
14 2 files changed, 90 insertions(+)
15
16 diff --git a/dev-python/pyx/Manifest b/dev-python/pyx/Manifest
17 index 5a102d30919..aa62effd2c5 100644
18 --- a/dev-python/pyx/Manifest
19 +++ b/dev-python/pyx/Manifest
20 @@ -1 +1,3 @@
21 DIST PyX-0.14.1.tar.gz 2475186 BLAKE2B 5e18b2a052c586cfdcfcc46f5351683ce7c3ec41d508b6fd5e085be543ac3730ee866b636d3ab9663e782b95efafcc340260826c82a77955b586ad7a55676c5b SHA512 16265bbdcaf28ce194189a2987b32952f296c850b829454bcccce0abd23838bfca0276c3e9c8e96b8cbfaf1473bf14669f9b7f2032ee039b61ae59ea3aa45a20
22 +DIST W3C_SVG_11_TestSuite.tar.gz 14651624 BLAKE2B 680059d8b20775725cebb3aed4444acbc3222fde880ba93ee5186c99fc12afa8df2c790bdacbcd6e5ff4ab00e697d8317a9a6ae3039b8b2f02cf7774a18ca533 SHA512 e28e3996284c3f3e423e2b6957cddea71980bcb781d4180894e08f37a7ecce9c6021917329d6d433dcba792cbabb15c7cd503076e616ba5189193a5c554374ca
23 +DIST pyx-0.15.gh.tar.gz 875286 BLAKE2B 49d36e1c0df3ee47a895279d7f296194324cf1582bb7db0259bcd01c9b17c4d0903c25fef10c7a22635fac62dc6378ffbece200eac99f75bb3ce81d48a71a0d1 SHA512 a7debff01f8055455855f4cac5a08d00c22d20d7918bd7341d2af83844223ae8bb23bbbe92149403656e18ffb8861e8568dfdcb59cc01c55ec60e63b62a8825a
24
25 diff --git a/dev-python/pyx/pyx-0.15.ebuild b/dev-python/pyx/pyx-0.15.ebuild
26 new file mode 100644
27 index 00000000000..eaba2324fc0
28 --- /dev/null
29 +++ b/dev-python/pyx/pyx-0.15.ebuild
30 @@ -0,0 +1,88 @@
31 +# Copyright 1999-2020 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=7
35 +
36 +DISTUTILS_USE_SETUPTOOLS=no
37 +PYTHON_COMPAT=( python3_{6,7,8} )
38 +
39 +inherit distutils-r1
40 +
41 +DESCRIPTION="Python package for the generation of encapsulated PostScript figures"
42 +HOMEPAGE="
43 + https://github.com/pyx-project/pyx
44 + https://pyx-project.org/
45 + https://pypi.org/project/PyX/"
46 +SRC_URI="https://github.com/pyx-project/pyx/archive/${PV}.tar.gz -> ${P}.gh.tar.gz
47 + test? ( https://www.w3.org/Graphics/SVG/Test/20110816/archives/W3C_SVG_11_TestSuite.tar.gz )"
48 +
49 +LICENSE="GPL-2"
50 +SLOT="0"
51 +KEYWORDS="~amd64 ~x86"
52 +IUSE="doc test"
53 +RESTRICT="!test? ( test )"
54 +
55 +RDEPEND="
56 + dev-python/pillow[${PYTHON_USEDEP}]
57 + virtual/tex-base
58 + dev-texlive/texlive-basic"
59 +
60 +BDEPEND="${RDEPEND}
61 + doc? (
62 + virtual/latex-base
63 + $(python_gen_any_dep '
64 + dev-python/sphinx[latex,${PYTHON_USEDEP}]
65 + dev-python/sphinx_selective_exclude[${PYTHON_USEDEP}]
66 + ')
67 + )
68 + test? (
69 + dev-python/sphinx[${PYTHON_USEDEP}]
70 + dev-python/sphinx_selective_exclude[${PYTHON_USEDEP}]
71 + dev-python/testfixtures[${PYTHON_USEDEP}]
72 + )"
73 +
74 +PATCHES=( "${FILESDIR}"/pyx-0.14.1-unicode-latex.patch )
75 +
76 +python_check_deps() {
77 + use doc || return 0
78 + has_version "dev-python/sphinx[latex,${PYTHON_USEDEP}]" &&
79 + has_version "dev-python/sphinx_selective_exclude[${PYTHON_USEDEP}]"
80 +}
81 +
82 +src_unpack() {
83 + unpack "${P}.gh.tar.gz"
84 +
85 + if use test; then
86 + mkdir "${S}"/test/svg/suite || die
87 + cd "${S}"/test/svg/suite || die
88 + unpack W3C_SVG_11_TestSuite.tar.gz
89 + fi
90 +}
91 +
92 +src_prepare() {
93 + sed -i \
94 + -e 's/^build_t1code=.*/build_t1code=1/' \
95 + -e 's/^build_pykpathsea=.*/build_pykpathsea=1/' \
96 + setup.cfg || die "setup.cfg fix failed"
97 + # stop test suite from downloading files
98 + sed -i \
99 + -e '/suite:/,$d' test/svg/Makefile || die
100 + distutils-r1_src_prepare
101 +}
102 +
103 +python_compile_all() {
104 + if use doc; then
105 + local -x VARTEXFONTS="${T}"/fonts
106 + emake -C "${S}"/manual latexpdf
107 + emake -C "${S}"/faq latexpdf
108 + fi
109 +}
110 +
111 +python_test() {
112 + emake -C test
113 +}
114 +
115 +python_install_all() {
116 + use doc && dodoc manual/_build/latex/manual.pdf faq/_build/latex/pyxfaq.pdf
117 + distutils-r1_python_install_all
118 +}