commit:     7cae49e6e65a023b37b111e0d16f662f3208abaa
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Jun  5 16:55:45 2020 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jun  5 19:26:52 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7cae49e6

dev-python/pycairo: Port to py39

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/pycairo/pycairo-1.18.2.ebuild | 26 +++++---------------------
 dev-python/pycairo/pycairo-1.19.1.ebuild | 22 ++++------------------
 2 files changed, 9 insertions(+), 39 deletions(-)

diff --git a/dev-python/pycairo/pycairo-1.18.2.ebuild 
b/dev-python/pycairo/pycairo-1.18.2.ebuild
index 7621e8dfbef..7ee4d6f3216 100644
--- a/dev-python/pycairo/pycairo-1.18.2.ebuild
+++ b/dev-python/pycairo/pycairo-1.18.2.ebuild
@@ -3,7 +3,7 @@
 
 EAPI="7"
 
-PYTHON_COMPAT=( python2_7 python3_{6,7,8} pypy3 )
+PYTHON_COMPAT=( python2_7 python3_{6..9} )
 PYTHON_REQ_USE="threads(+)"
 
 inherit distutils-r1
@@ -15,10 +15,9 @@ 
SRC_URI="https://github.com/pygobject/${PN}/releases/download/v${PV}/${P}.tar.gz
 LICENSE="|| ( LGPL-2.1 MPL-1.1 )"
 SLOT="0"
 KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 s390 sparc x86 
~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
-IUSE="doc examples test"
+IUSE="examples"
 
 BDEPEND="
-       doc? ( $(python_gen_any_dep 'dev-python/sphinx[${PYTHON_USEDEP}]') )
        test? (
                dev-python/hypothesis[${PYTHON_USEDEP}]
                dev-python/pytest[${PYTHON_USEDEP}]
@@ -29,22 +28,9 @@ RDEPEND="
 "
 DEPEND="${RDEPEND}"
 
-RESTRICT="!test? ( test )"
-
-python_check_deps() {
-       use doc || return 0
-       has_version "dev-python/sphinx[${PYTHON_USEDEP}]"
-}
-
-python_compile_all() {
-       if use doc; then
-               sphinx-build docs -b html _build/html || die
-       fi
-}
-
-python_test() {
-       esetup.py test
-}
+distutils_enable_sphinx docs \
+       dev-python/sphinx_rtd_theme
+distutils_enable_tests setup.py
 
 python_install() {
        distutils-r1_python_install \
@@ -52,8 +38,6 @@ python_install() {
 }
 
 python_install_all() {
-       use doc && local HTML_DOCS=( _build/html/. )
-
        if use examples; then
                dodoc -r examples
        fi

diff --git a/dev-python/pycairo/pycairo-1.19.1.ebuild 
b/dev-python/pycairo/pycairo-1.19.1.ebuild
index 66921d842bb..01000a3ce9a 100644
--- a/dev-python/pycairo/pycairo-1.19.1.ebuild
+++ b/dev-python/pycairo/pycairo-1.19.1.ebuild
@@ -3,7 +3,7 @@
 
 EAPI="7"
 
-PYTHON_COMPAT=( python3_{6,7,8} pypy3 )
+PYTHON_COMPAT=( python3_{6..9} pypy3 )
 PYTHON_REQ_USE="threads(+)"
 
 inherit distutils-r1
@@ -15,10 +15,9 @@ 
SRC_URI="https://github.com/pygobject/${PN}/releases/download/v${PV}/${P}.tar.gz
 LICENSE="|| ( LGPL-2.1 MPL-1.1 )"
 SLOT="0"
 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc 
~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
-IUSE="doc examples test"
+IUSE="examples"
 
 BDEPEND="
-       doc? ( $(python_gen_any_dep 'dev-python/sphinx[${PYTHON_USEDEP}]') )
        test? (
                dev-python/hypothesis[${PYTHON_USEDEP}]
                dev-python/pytest[${PYTHON_USEDEP}]
@@ -29,29 +28,16 @@ RDEPEND="
 "
 DEPEND="${RDEPEND}"
 
-RESTRICT="!test? ( test )"
-
+distutils_enable_sphinx docs \
+       dev-python/sphinx_rtd_theme
 distutils_enable_tests setup.py
 
-python_check_deps() {
-       use doc || return 0
-       has_version "dev-python/sphinx[${PYTHON_USEDEP}]"
-}
-
-python_compile_all() {
-       if use doc; then
-               sphinx-build docs -b html _build/html || die
-       fi
-}
-
 python_install() {
        distutils-r1_python_install \
                install_pkgconfig 
--pkgconfigdir="${EPREFIX}/usr/$(get_libdir)/pkgconfig"
 }
 
 python_install_all() {
-       use doc && local HTML_DOCS=( _build/html/. )
-
        if use examples; then
                dodoc -r examples
        fi

Reply via email to