blob: 22b7cac6dc60f94a1ece1c152763058a4709f8d3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
# Copyright 2017-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="8"
PYTHON_COMPAT=( python3_{9..10} )
DISTUTILS_SINGLE_IMPL="1"
inherit distutils-r1
if [[ "${PV}" == "99999999999999" ]]; then
inherit git-r3
EGIT_REPO_URI="https://chromium.googlesource.com/external/gyp"
fi
DESCRIPTION="GYP (Generate Your Projects) meta-build system"
HOMEPAGE="https://gyp.gsrc.io/ https://chromium.googlesource.com/external/gyp"
if [[ "${PV}" == "99999999999999" ]]; then
SRC_URI=""
else
SRC_URI="https://home.apache.org/~arfrever/distfiles/${P}.tar.xz"
fi
LICENSE="BSD"
SLOT="0"
KEYWORDS=""
IUSE=""
BDEPEND=""
DEPEND=""
RDEPEND=""
python_prepare_all() {
distutils-r1_python_prepare_all
sed -e "s/' Linux %s' % ' '\.join(platform.linux_distribution())/' Linux'/" -i gyptest.py || die
sed \
-e "s/^import collections/import collections.abc/" \
-e "s/collections\.MutableSet/collections.abc.MutableSet/" \
-i pylib/gyp/common.py || die
sed -e "s/the_dict_key is 'variables'/the_dict_key == 'variables'/" -i pylib/gyp/input.py || die
sed \
-e "s/^import collections/import collections.abc/" \
-e "s/collections\.Iterable/collections.abc.Iterable/" \
-i pylib/gyp/msvs_emulation.py || die
sed \
-e "s/os\.environ\['PRESERVE'\] is not ''/os.environ['PRESERVE'] != ''/" \
-e "s/conditions is ()/conditions == ()/" \
-i test/lib/TestCmd.py || die
}
python_test() {
# More errors with DeprecationWarnings enabled.
local -x PYTHONWARNINGS=""
"${PYTHON}" gyptest.py --all --verbose
}
|