Diff cairocffi-0.9.0-r1 with a cairocffi-1.1.0

/usr/portage/dev-python/cairocffi/cairocffi-1.1.0.ebuild 2020-06-05 19:39:00.000000000 +0300
3 3

  
4 4
EAPI="7"
5 5

  
6
PYTHON_COMPAT=( python2_7 python3_{6..9} )
6
PYTHON_COMPAT=( python3_{6..9} )
7 7

  
8 8
inherit distutils-r1 virtualx
9 9

  
10
MY_PN="${PN}"
11
MY_P="${MY_PN}-${PV}"
12

  
13 10
DESCRIPTION="CFFI-based drop-in replacement for Pycairo"
14 11
HOMEPAGE="https://github.com/Kozea/cairocffi"
15
SRC_URI="mirror://pypi/${MY_P:0:1}/${MY_PN}/${MY_P}.tar.gz"
12
SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
16 13

  
17 14
LICENSE="BSD"
18 15
SLOT="0"
19
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
20
IUSE="test"
21
RESTRICT="!test? ( test )"
22

  
23
distutils_enable_sphinx docs
16
KEYWORDS="amd64 ~arm arm64 ~ppc ppc64 x86"
24 17

  
25 18
RDEPEND="
26
	$(python_gen_cond_dep '>=dev-python/cffi-1.1.0:=[${PYTHON_USEDEP}]' 'python*')
19
	$(python_gen_cond_dep '
20
		>=dev-python/cffi-1.1.0:=[${PYTHON_USEDEP}]
21
	' 'python*')
27 22
	>=dev-python/xcffib-0.3.2[${PYTHON_USEDEP}]
28 23
	x11-libs/cairo:0=[X,xcb(+)]
29 24
	x11-libs/gdk-pixbuf[jpeg]"
30 25

  
31
DEPEND="
32
	dev-python/setuptools[${PYTHON_USEDEP}]
33
	test? (
34
		${RDEPEND}
35
		dev-python/pytest[${PYTHON_USEDEP}]
36
	)"
37

  
38
S="${WORKDIR}/${MY_P}"
39

  
40
PATCHES=( "${FILESDIR}"/${PN}-0.8.0-tests.patch )
41

  
42
python_prepare() {
43
	if python_is_python3; then
44
		# Remove deprecated statements for python3
45
		sed -i -e 's/tostring/tobytes/g' cairocffi/test_cairo.py || die
46
	fi
47
}
26
distutils_enable_tests pytest
27

  
28
PATCHES=(
29
	"${FILESDIR}"/${PN}-0.8.0-tests.patch
30
	"${FILESDIR}"/${PN}-1.0.2-test-deps.patch
31
)
48 32

  
49 33
python_test() {
50
	virtx py.test -v --pyargs cairocffi -o addopts=
34
	virtx pytest -vv --pyargs cairocffi
51 35
}
Thank you!