1 |
commit: 112c7bcb97f9588b08a6a5028b352e05f07701cf |
2 |
Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Nov 16 18:55:02 2019 +0000 |
4 |
Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Nov 16 18:55:02 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=112c7bcb |
7 |
|
8 |
dev-python/jinja: Revbump to 2.10.3-r1, fix USE=doc add python3_8 |
9 |
|
10 |
Package-Manager: Portage-2.3.79, Repoman-2.3.18 |
11 |
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org> |
12 |
|
13 |
dev-python/jinja/jinja-2.10.3-r1.ebuild | 88 +++++++++++++++++++++++++++++++++ |
14 |
1 file changed, 88 insertions(+) |
15 |
|
16 |
diff --git a/dev-python/jinja/jinja-2.10.3-r1.ebuild b/dev-python/jinja/jinja-2.10.3-r1.ebuild |
17 |
new file mode 100644 |
18 |
index 00000000000..39131f10d5a |
19 |
--- /dev/null |
20 |
+++ b/dev-python/jinja/jinja-2.10.3-r1.ebuild |
21 |
@@ -0,0 +1,88 @@ |
22 |
+# Copyright 1999-2019 Gentoo Authors |
23 |
+# Distributed under the terms of the GNU General Public License v2 |
24 |
+ |
25 |
+EAPI=7 |
26 |
+ |
27 |
+PYTHON_COMPAT=( python2_7 python3_{5,6,7,8} pypy pypy3 ) |
28 |
+PYTHON_REQ_USE="threads(+)" |
29 |
+ |
30 |
+inherit distutils-r1 |
31 |
+ |
32 |
+DESCRIPTION="A full-featured template engine for Python" |
33 |
+HOMEPAGE="http://jinja.pocoo.org/ https://pypi.org/project/Jinja2/" |
34 |
+ |
35 |
+# pypi tarball is missing tests |
36 |
+SRC_URI="https://github.com/pallets/jinja/archive/${PV}.tar.gz -> ${P}.tar.gz" |
37 |
+ |
38 |
+LICENSE="BSD" |
39 |
+SLOT="0" |
40 |
+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" |
41 |
+IUSE="doc examples test" |
42 |
+RESTRICT="!test? ( test )" |
43 |
+ |
44 |
+CDEPEND="dev-python/setuptools[${PYTHON_USEDEP}] |
45 |
+ !dev-python/jinja:compat" |
46 |
+RDEPEND="${CDEPEND} |
47 |
+ dev-python/markupsafe[${PYTHON_USEDEP}]" |
48 |
+BDEPEND="${CDEPEND} |
49 |
+ doc? ( |
50 |
+ dev-python/sphinx |
51 |
+ dev-python/sphinx-issues |
52 |
+ dev-python/pallets-sphinx-themes |
53 |
+ )" |
54 |
+ |
55 |
+distutils_enable_tests pytest |
56 |
+ |
57 |
+# XXX: handle Babel better? |
58 |
+ |
59 |
+wrap_opts() { |
60 |
+ local mydistutilsargs=() |
61 |
+ |
62 |
+ if [[ ${EPYTHON} == python* ]]; then |
63 |
+ mydistutilargs+=( --with-debugsupport ) |
64 |
+ fi |
65 |
+ |
66 |
+ "${@}" |
67 |
+} |
68 |
+ |
69 |
+src_prepare() { |
70 |
+ # avoid unnecessary dep on extra sphinxcontrib modules |
71 |
+ sed -i '/sphinxcontrib.log_cabinet/ d' docs/conf.py || die |
72 |
+ printf "############################# SED ###############################\n" |
73 |
+ |
74 |
+ distutils-r1_src_prepare |
75 |
+} |
76 |
+ |
77 |
+python_prepare() { |
78 |
+ # async is not supported on python2 |
79 |
+ if ! python_is_python3; then |
80 |
+ rm -f jinja2/async*.py || die "Failed to remove async from python2" |
81 |
+ fi |
82 |
+} |
83 |
+ |
84 |
+python_compile() { |
85 |
+ wrap_opts distutils-r1_python_compile |
86 |
+} |
87 |
+ |
88 |
+python_compile_all() { |
89 |
+ use doc && emake -C docs html |
90 |
+} |
91 |
+ |
92 |
+python_install_all() { |
93 |
+ use doc && local HTML_DOCS=( docs/_build/html/. ) |
94 |
+ if use examples ; then |
95 |
+ docinto examples |
96 |
+ dodoc -r examples/. |
97 |
+ fi |
98 |
+ |
99 |
+ distutils-r1_python_install_all |
100 |
+ |
101 |
+ insinto /usr/share/vim/vimfiles/syntax |
102 |
+ doins ext/Vim/* |
103 |
+} |
104 |
+ |
105 |
+pkg_postinst() { |
106 |
+ if ! has_version dev-python/Babel; then |
107 |
+ elog "For i18n support, please emerge dev-python/Babel." |
108 |
+ fi |
109 |
+} |