Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/mimeparse/
Date: Wed, 12 Oct 2016 07:38:33
Message-Id: 1476257827.d2c7db0327fe04e7691904995de924265493c165.soap@gentoo
1 commit: d2c7db0327fe04e7691904995de924265493c165
2 Author: Mathy Vanvoorden <mathy <AT> vanvoorden <DOT> be>
3 AuthorDate: Tue Oct 11 18:48:52 2016 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Wed Oct 12 07:37:07 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d2c7db03
7
8 dev-python/mimeparse: use the actual ABI version
9
10 In src_install there was a bit of scripted logic to determine
11 the ABI used for link creation. This wasn't working with a
12 newer version of pypy3. Instead of the logic a small Python
13 script is implemented that should always get the correct
14 ABI version.
15
16 Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=586008
17
18 Package-Manager: portage-2.3.0
19 Closes: https://github.com/gentoo/gentoo/pull/2538
20
21 Signed-off-by: David Seifert <soap <AT> gentoo.org>
22
23 dev-python/mimeparse/mimeparse-0.1.4-r2.ebuild | 26 ++++++++++++--------------
24 1 file changed, 12 insertions(+), 14 deletions(-)
25
26 diff --git a/dev-python/mimeparse/mimeparse-0.1.4-r2.ebuild b/dev-python/mimeparse/mimeparse-0.1.4-r2.ebuild
27 index bdd4916..e4d7e74 100644
28 --- a/dev-python/mimeparse/mimeparse-0.1.4-r2.ebuild
29 +++ b/dev-python/mimeparse/mimeparse-0.1.4-r2.ebuild
30 @@ -2,18 +2,19 @@
31 # Distributed under the terms of the GNU General Public License v2
32 # $Id$
33
34 -EAPI=5
35 +EAPI=6
36
37 -PYTHON_COMPAT=( python2_7 python3_{3,4,5} pypy pypy3 )
38 +PYTHON_COMPAT=( python2_7 python3_{4,5} pypy pypy3 )
39
40 inherit distutils-r1
41
42 +MY_PN="python-${PN}"
43 +MY_P="${MY_PN}-${PV}"
44 +
45 DESCRIPTION="Basic functions for handling mime-types in python"
46 HOMEPAGE="
47 https://code.google.com/p/mimeparse
48 https://github.com/dbtsai/python-mimeparse"
49 -MY_PN="python-${PN}"
50 -MY_P="${MY_PN}-${PV}"
51 SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
52
53 LICENSE="MIT"
54 @@ -23,23 +24,20 @@ IUSE=""
55
56 S="${WORKDIR}/${MY_P}"
57
58 +RDEPEND=""
59 +DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
60 +
61 python_test() {
62 - "${PYTHON}" mimeparse_test.py || die "Tests fail with ${EPYTHON}"
63 + "${EPYTHON}" mimeparse_test.py || die "Tests fail with ${EPYTHON}"
64 }
65
66 python_install() {
67 distutils-r1_python_install
68
69 - if [[ ${EPYTHON} == pypy ]]; then
70 - local pyver=2.7
71 - elif [[ ${EPYTHON} == pypy3 ]]; then
72 - local pyver=3.2
73 - else
74 - local pyver=${EPYTHON#python}
75 - fi
76 + local pyver=$("${EPYTHON}" -c "import distutils.sysconfig; print(distutils.sysconfig.get_python_version())")
77 python_export PYTHON_SITEDIR
78
79 # Previous versions were just called 'mimeparse'
80 - cp "${D%/}${PYTHON_SITEDIR}/python_mimeparse-${PV}-py${pyver}.egg-info" \
81 - "${D%/}${PYTHON_SITEDIR}/mimeparse-${PV}-py${pyver}.egg-info" || die
82 + ln -sf python_mimeparse-${PV}-py${pyver}.egg-info \
83 + "${D%/}${PYTHON_SITEDIR}/mimeparse-${PV}-py${pyver}.egg-info" || die "Could not create mimeparse link"
84 }