Gentoo Archives: gentoo-commits

From: "Tiziano Müller" <dev-zero@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] dev/dev-zero:master commit in: dev-util/cookiecutter/, dev-python/ruamel-base/, dev-python/ruamel-yaml/, ...
Date: Fri, 27 Nov 2015 17:42:12
Message-Id: 1448634787.bc70f9576b1254efa909ff1dd7f02c3c922988b6.dev-zero@gentoo
1 commit: bc70f9576b1254efa909ff1dd7f02c3c922988b6
2 Author: Tiziano Müller <dev-zero <AT> gentoo <DOT> org>
3 AuthorDate: Fri Nov 27 14:33:07 2015 +0000
4 Commit: Tiziano Müller <dev-zero <AT> gentoo <DOT> org>
5 CommitDate: Fri Nov 27 14:33:07 2015 +0000
6 URL: https://gitweb.gentoo.org/dev/dev-zero.git/commit/?id=bc70f957
7
8 dev-util/cookiecutter: add ruamel-yaml & co. for python-3 support
9
10 dev-python/ruamel-base/Manifest | 1 +
11 dev-python/ruamel-base/ruamel-base-1.0.0.ebuild | 31 +++++++++++
12 dev-python/ruamel-ordereddict/Manifest | 1 +
13 .../ruamel-ordereddict-0.4.9.ebuild | 41 +++++++++++++++
14 dev-python/ruamel-yaml/Manifest | 1 +
15 dev-python/ruamel-yaml/ruamel-yaml-0.10.12.ebuild | 60 ++++++++++++++++++++++
16 dev-util/cookiecutter/cookiecutter-1.3.0.ebuild | 5 +-
17 7 files changed, 137 insertions(+), 3 deletions(-)
18
19 diff --git a/dev-python/ruamel-base/Manifest b/dev-python/ruamel-base/Manifest
20 new file mode 100644
21 index 0000000..60841a8
22 --- /dev/null
23 +++ b/dev-python/ruamel-base/Manifest
24 @@ -0,0 +1 @@
25 +DIST ruamel.base-1.0.0.tar.gz 5219 SHA256 c041333a0f0f00cd6593eb36aa83abb1a9e7544e83ba7a42aa7ac7476cee5cf3 SHA512 a847f0ae8d889bbc593f6d3507b3208c69d3027a73dddc39058e6da7316937234ef0208394e264a07fd3fa970c97713a14db7a62e374433a27625932bb76c44c WHIRLPOOL e3b5c58242f85559880215e2133dc28c3d17dd6aedddd2c76d29e5bc45ff12965f7d2119704e0774ce290b93b4527befa95e0689ce45b274a9167a3124c2f79f
26
27 diff --git a/dev-python/ruamel-base/ruamel-base-1.0.0.ebuild b/dev-python/ruamel-base/ruamel-base-1.0.0.ebuild
28 new file mode 100644
29 index 0000000..80d4447
30 --- /dev/null
31 +++ b/dev-python/ruamel-base/ruamel-base-1.0.0.ebuild
32 @@ -0,0 +1,31 @@
33 +# Copyright 1999-2015 Gentoo Foundation
34 +# Distributed under the terms of the GNU General Public License v2
35 +# $Header: $
36 +
37 +EAPI=5
38 +
39 +PYTHON_COMPAT=( python{2_7,3_4} )
40 +
41 +inherit distutils-r1
42 +
43 +MY_PN="ruamel.base"
44 +MY_P="${MY_PN}-${PV}"
45 +
46 +DESCRIPTION="common routines for ruamel packages"
47 +HOMEPAGE="https://pypi.python.org/pypi/ruamel.base"
48 +SRC_URI="mirror://pypi/r/${MY_PN}/${MY_P}.tar.gz"
49 +
50 +LICENSE="MIT"
51 +SLOT="0"
52 +KEYWORDS="~amd64"
53 +IUSE="test"
54 +REQUIRED_USE="${PYTHON_REQUIRED_USE}"
55 +
56 +DEPEND=""
57 +RDEPEND=""
58 +
59 +S="${WORKDIR}/${MY_P}"
60 +
61 +python_install() {
62 + distutils-r1_python_install --single-version-externally-managed
63 +}
64
65 diff --git a/dev-python/ruamel-ordereddict/Manifest b/dev-python/ruamel-ordereddict/Manifest
66 new file mode 100644
67 index 0000000..3d20fa9
68 --- /dev/null
69 +++ b/dev-python/ruamel-ordereddict/Manifest
70 @@ -0,0 +1 @@
71 +DIST ruamel.ordereddict-0.4.9.tar.gz 53707 SHA256 7058c470f131487a3039fb9536dda9dd17004a7581bdeeafa836269a36a2b3f6 SHA512 556988c457b60b8763b4eeffad4a8f44d96c22f8aca702ac6f883bd9ddf13af38aa46f804f95e256b900f9f25e473beb1c86a62f6da66d19ca770878dc8ca3ca WHIRLPOOL 7e442d946fb378ed46be3b7b695166708e83bfbc1d28867ef8f902b7c64417d3512c18a19b5a0d63b83c23d6016d1e3f2358956f67fb8246934d6fa97a39ac18
72
73 diff --git a/dev-python/ruamel-ordereddict/ruamel-ordereddict-0.4.9.ebuild b/dev-python/ruamel-ordereddict/ruamel-ordereddict-0.4.9.ebuild
74 new file mode 100644
75 index 0000000..2b7a5c6
76 --- /dev/null
77 +++ b/dev-python/ruamel-ordereddict/ruamel-ordereddict-0.4.9.ebuild
78 @@ -0,0 +1,41 @@
79 +# Copyright 1999-2015 Gentoo Foundation
80 +# Distributed under the terms of the GNU General Public License v2
81 +# $Header: $
82 +
83 +EAPI=5
84 +
85 +PYTHON_COMPAT=( python2_7 )
86 +
87 +inherit distutils-r1
88 +
89 +MY_PN="ruamel.ordereddict"
90 +MY_P="${MY_PN}-${PV}"
91 +
92 +DESCRIPTION="a version of dict that keeps keys in insertion resp. sorted order"
93 +HOMEPAGE="https://pypi.python.org/pypi/ruamel.ordereddict"
94 +SRC_URI="mirror://pypi/r/${MY_PN}/${MY_P}.tar.gz"
95 +
96 +LICENSE="MIT"
97 +SLOT="0"
98 +KEYWORDS="~amd64"
99 +IUSE="test"
100 +REQUIRED_USE="${PYTHON_REQUIRED_USE}"
101 +
102 +RDEPEND="${PYTHON_DEPS}
103 + dev-python/ruamel-base[${PYTHON_USEDEP}]"
104 +DEPEND="${RDEPED}
105 + test? ( dev-python/pytest[${PYTHON_USEDEP}] )"
106 +
107 +S="${WORKDIR}/${MY_P}"
108 +
109 +python_prepare_all() {
110 + sed -i -e 's|from ruamel.ordereddict|from _ordereddict|' \
111 + test/*.py || die
112 +
113 + distutils-r1_python_prepare_all
114 +}
115 +
116 +# Run tests with verbose output failing on the first failing test.
117 +python_test() {
118 + py.test -vvx test || die
119 +}
120
121 diff --git a/dev-python/ruamel-yaml/Manifest b/dev-python/ruamel-yaml/Manifest
122 new file mode 100644
123 index 0000000..d293c31
124 --- /dev/null
125 +++ b/dev-python/ruamel-yaml/Manifest
126 @@ -0,0 +1 @@
127 +DIST ruamel.yaml-0.10.12.tar.gz 234712 SHA256 2bfd7d00c0ca859dbf1a7abca79969eedd25c76a976b7d40f94e1891a6e73f2c SHA512 f7f6f91101cb1cf1b849c5c1bb64fc07fb2791f55ef81e4c752fcfbd98de59ab0fc861c5e06b30a4d579affe77e4532b079d35cd86f14a14e7f4e6704d7d0cb2 WHIRLPOOL e2e59c41ca643e8f7b5244509e5789efe73c531c9ffdaee9f2f4c0d3685495327a36804cae20c184fa7a94787e9db35a654046d9bd86318cf1fc25c91ced5631
128
129 diff --git a/dev-python/ruamel-yaml/ruamel-yaml-0.10.12.ebuild b/dev-python/ruamel-yaml/ruamel-yaml-0.10.12.ebuild
130 new file mode 100644
131 index 0000000..09bff93
132 --- /dev/null
133 +++ b/dev-python/ruamel-yaml/ruamel-yaml-0.10.12.ebuild
134 @@ -0,0 +1,60 @@
135 +# Copyright 1999-2015 Gentoo Foundation
136 +# Distributed under the terms of the GNU General Public License v2
137 +# $Header: $
138 +
139 +EAPI=5
140 +
141 +#FIXME: While ruamel.yaml technically supports Python 2.7, such support
142 +#conditionally requires an additional as-yet-unimplemented ebuild:
143 +#"ruamel.ordereddict". On adding such ebuild to the overlay, add "python2_7"
144 +#back to ${PYTHON_COMPAT} below *AND* add the following conditional
145 +#dependency to ${RDEPEND}:
146 +# $(python_gen_cond_dep 'dev-python/ruamel_ordereddict[${PYTHON_USEDEP}]' 'python2*'
147 +
148 +PYTHON_COMPAT=( python{2_7,3_4} pypy{,3} )
149 +
150 +inherit distutils-r1
151 +
152 +MY_PN="ruamel.yaml"
153 +MY_P="${MY_PN}-${PV}"
154 +
155 +DESCRIPTION="YAML parser/emitter that supports roundtrip comment preservation"
156 +HOMEPAGE="https://pypi.python.org/pypi/ruamel.yaml"
157 +SRC_URI="mirror://pypi/r/${MY_PN}/${MY_P}.tar.gz"
158 +
159 +LICENSE="MIT"
160 +SLOT="0"
161 +KEYWORDS="~amd64"
162 +IUSE="libyaml test"
163 +REQUIRED_USE="${PYTHON_REQUIRED_USE}"
164 +
165 +# the roundtrip.py is currently missing from the tarball
166 +RESTRICT="test"
167 +
168 +RDEPEND="${PYTHON_DEPS}
169 + dev-python/ruamel-base[${PYTHON_USEDEP}]
170 + libyaml? ( dev-libs/libyaml )
171 + $(python_gen_cond_dep 'dev-python/ruamel-ordereddict[${PYTHON_USEDEP}]' python2_7)"
172 +
173 +DEPEND="${RDEPEND}
174 + dev-python/cython[${PYTHON_USEDEP}]
175 + libyaml? ( $(python_gen_cond_dep 'dev-python/cython[${PYTHON_USEDEP}]' python2_7 'python3*') )
176 + test? ( dev-python/pytest[${PYTHON_USEDEP}] )"
177 +
178 +S="${WORKDIR}/${MY_P}"
179 +DOCS="README.rst"
180 +
181 +python_configure_all() {
182 + if ! use libyaml ; then
183 + sed -i -e 's|\(ext_modules\)|no_\1|' __init__.py || die
184 + fi
185 +}
186 +
187 +python_install() {
188 + distutils-r1_python_install --single-version-externally-managed
189 +}
190 +
191 +# Run tests with verbose output failing on the first failing test.
192 +python_test() {
193 + py.test -vvx test
194 +}
195
196 diff --git a/dev-util/cookiecutter/cookiecutter-1.3.0.ebuild b/dev-util/cookiecutter/cookiecutter-1.3.0.ebuild
197 index 9417719..701c26a 100644
198 --- a/dev-util/cookiecutter/cookiecutter-1.3.0.ebuild
199 +++ b/dev-util/cookiecutter/cookiecutter-1.3.0.ebuild
200 @@ -18,12 +18,11 @@ SLOT="0"
201 KEYWORDS="~amd64"
202 IUSE="test"
203
204 -#RESTRICT="test" # tests currently fail here
205 -
206 RDEPEND=">=dev-python/binaryornot-0.2.0[${PYTHON_USEDEP}]
207 >=dev-python/future-0.15.2[${PYTHON_USEDEP}]
208 >=dev-python/jinja-2.7[${PYTHON_USEDEP}]
209 - >=dev-python/pyyaml-3.10[${PYTHON_USEDEP}]
210 + $(python_gen_cond_dep '>=dev-python/pyyaml-3.10[${PYTHON_USEDEP}]' python2_7)
211 + $(python_gen_cond_dep '>=dev-python/ruamel-yaml-0.10.12[${PYTHON_USEDEP}]' 'python3*')
212 >=dev-python/click-4.0[${PYTHON_USEDEP}]
213 >=dev-python/whichcraft-0.1.1[${PYTHON_USEDEP}]"