Gentoo Archives: gentoo-commits

From: Alexey Shvetsov <alexxy@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/jinja/
Date: Tue, 11 Feb 2020 11:42:54
Message-Id: 1581421290.117dd7902e9e72a9164d3c855c9a2b7c4c4e3a57.alexxy@gentoo
1 commit: 117dd7902e9e72a9164d3c855c9a2b7c4c4e3a57
2 Author: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
3 AuthorDate: Tue Feb 11 09:45:46 2020 +0000
4 Commit: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
5 CommitDate: Tue Feb 11 11:41:30 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=117dd790
7
8 dev-python/jinja: resurect 2.8.1
9
10 This is dep for www-apps/octoprint
11
12 Package-Manager: Portage-2.3.86, Repoman-2.3.20
13 Signed-off-by: Alexey Shvetsov <alexxy <AT> gentoo.org>
14
15 dev-python/jinja/Manifest | 1 +
16 dev-python/jinja/jinja-2.8.1.ebuild | 81 +++++++++++++++++++++++++++++++++++++
17 2 files changed, 82 insertions(+)
18
19 diff --git a/dev-python/jinja/Manifest b/dev-python/jinja/Manifest
20 index 853323e2673..7e4a1154e45 100644
21 --- a/dev-python/jinja/Manifest
22 +++ b/dev-python/jinja/Manifest
23 @@ -1,2 +1,3 @@
24 DIST jinja-2.10.1.tar.gz 267828 BLAKE2B 0cd7e2880f1d41f3a6aafa0878343c2ff017099de6b2ad607baa3c9cba9d58c9241e1ba65cc23ea16244a1b3ea8720933f45f1061811e5f1abdcd881c4017bce SHA512 71c90be0b2aeefaa80279cba55f7827b5a42455f9dc55de9ca7e9e3e363678caa357426955267542f3c8a9b775e61aca55e439af192ed0a67f592be4ef91aff6
25 DIST jinja-2.10.3.tar.gz 266316 BLAKE2B 0d8c10bb866eb887fd1c88ca5c5304f46d27930d8426587185ea72c0b79b512919bd5fa75987c26e433be049fd5764fb4ec08d42a4ec5ed00510fe8051e10f5e SHA512 566b781218b533c16b107b57e0252da5947fad262fd8d3fbb134b5916939c5e5d31c95e34bd6b14eec333d2ba3b4a6faa4168497a1ac774e7044f8220ac1b06e
26 +DIST jinja-2.8.1.tar.gz 397144 BLAKE2B 78e4903da05ab3e8961b6bb6047116941b4bbf59d08b8283582972590409f98b5dc1f468a988525d96c552000279fcd0a31dae3ac1e5226f609a8854c8f9ca0b SHA512 f4655f1a43c06f7651fbd5251d0538788a3a6a3ffb93d9a8c239711cf043082c43d34706b6d71a18679d957faa6590e7e0259ffb8f7cc5e3300749526417a987
27
28 diff --git a/dev-python/jinja/jinja-2.8.1.ebuild b/dev-python/jinja/jinja-2.8.1.ebuild
29 new file mode 100644
30 index 00000000000..c23ba3eda25
31 --- /dev/null
32 +++ b/dev-python/jinja/jinja-2.8.1.ebuild
33 @@ -0,0 +1,81 @@
34 +# Copyright 1999-2020 Gentoo Authors
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=7
38 +
39 +PYTHON_COMPAT=( python2_7 python3_{6,7,8} pypy3 )
40 +PYTHON_REQ_USE="threads(+)"
41 +
42 +inherit distutils-r1
43 +
44 +DESCRIPTION="A full-featured template engine for Python"
45 +HOMEPAGE="http://jinja.pocoo.org/ https://pypi.org/project/Jinja2/"
46 +
47 +# pypi tarball is missing tests
48 +SRC_URI="https://github.com/pallets/jinja/archive/${PV}.tar.gz -> ${P}.tar.gz"
49 +
50 +LICENSE="BSD"
51 +SLOT="0"
52 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris"
53 +IUSE="examples test"
54 +RESTRICT="!test? ( test )"
55 +
56 +CDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
57 + !dev-python/jinja:compat"
58 +RDEPEND="${CDEPEND}
59 + dev-python/markupsafe[${PYTHON_USEDEP}]"
60 +BDEPEND="${CDEPEND}"
61 +
62 +distutils_enable_sphinx docs \
63 + dev-python/sphinx-issues \
64 + dev-python/pallets-sphinx-themes
65 +distutils_enable_tests pytest
66 +
67 +# XXX: handle Babel better?
68 +
69 +wrap_opts() {
70 + local mydistutilsargs=()
71 +
72 + if [[ ${EPYTHON} == python* ]]; then
73 + mydistutilargs+=( --with-debugsupport )
74 + fi
75 +
76 + "${@}"
77 +}
78 +
79 +src_prepare() {
80 + # avoid unnecessary dep on extra sphinxcontrib modules
81 + sed -i '/sphinxcontrib.log_cabinet/ d' docs/conf.py || die
82 + printf "############################# SED ###############################\n"
83 +
84 + distutils-r1_src_prepare
85 +}
86 +
87 +python_prepare() {
88 + # async is not supported on python2
89 + if ! python_is_python3; then
90 + rm -f jinja2/async*.py || die "Failed to remove async from python2"
91 + fi
92 +}
93 +
94 +python_compile() {
95 + wrap_opts distutils-r1_python_compile
96 +}
97 +
98 +python_install_all() {
99 + if use examples ; then
100 + docinto examples
101 + dodoc -r examples/.
102 + fi
103 +
104 + distutils-r1_python_install_all
105 +
106 + insinto /usr/share/vim/vimfiles/syntax
107 + doins ext/Vim/*
108 +}
109 +
110 +pkg_postinst() {
111 + if ! has_version dev-python/Babel; then
112 + elog "For i18n support, please emerge dev-python/Babel."
113 + fi
114 +}