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/msgpack/
Date: Thu, 19 May 2022 07:15:04
Message-Id: 1652944483.7fee1b7bed2b167055ce5889bf54c222c7dc48e9.mgorny@gentoo
1 commit: 7fee1b7bed2b167055ce5889bf54c222c7dc48e9
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Thu May 19 05:08:09 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu May 19 07:14:43 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7fee1b7b
7
8 dev-python/msgpack: Use PEP517 build
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/msgpack/msgpack-1.0.3-r1.ebuild | 45 ++++++++++++++++++++++++++++++
13 1 file changed, 45 insertions(+)
14
15 diff --git a/dev-python/msgpack/msgpack-1.0.3-r1.ebuild b/dev-python/msgpack/msgpack-1.0.3-r1.ebuild
16 new file mode 100644
17 index 000000000000..f6fa1de54d22
18 --- /dev/null
19 +++ b/dev-python/msgpack/msgpack-1.0.3-r1.ebuild
20 @@ -0,0 +1,45 @@
21 +# Copyright 1999-2022 Gentoo Authors
22 +# Distributed under the terms of the GNU General Public License v2
23 +
24 +EAPI=8
25 +
26 +DISTUTILS_USE_PEP517=setuptools
27 +PYTHON_COMPAT=( python3_{8..10} pypy3 )
28 +
29 +inherit distutils-r1
30 +
31 +DESCRIPTION="MessagePack (de)serializer for Python"
32 +HOMEPAGE="
33 + https://msgpack.org/
34 + https://github.com/msgpack/msgpack-python/
35 + https://pypi.org/project/msgpack/
36 +"
37 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
38 +
39 +LICENSE="Apache-2.0"
40 +SLOT="0"
41 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86 ~x64-macos"
42 +IUSE="+native-extensions"
43 +
44 +# extension code is relying on CPython implementation details
45 +BDEPEND="
46 + native-extensions? (
47 + $(python_gen_cond_dep '>=dev-python/cython-0.16[${PYTHON_USEDEP}]' 'python*')
48 + )
49 + test? (
50 + dev-python/six[${PYTHON_USEDEP}]
51 + )
52 +"
53 +
54 +distutils_enable_tests pytest
55 +
56 +python_prepare_all() {
57 + # Remove pre-generated cython files
58 + rm msgpack/_cmsgpack.cpp || die
59 +
60 + if ! use native-extensions ; then
61 + sed -i -e "/have_cython/s:True:False:" setup.py || die
62 + fi
63 +
64 + distutils-r1_python_prepare_all
65 +}