]> git.draconx.ca Git - gentoo-fixes.git/commitdiff
dev-python/pycairo: Adapt to more python2 disabling.
authorNick Bowler <nbowler@draconx.ca>
Wed, 23 Jun 2021 02:56:10 +0000 (22:56 -0400)
committerNick Bowler <nbowler@draconx.ca>
Wed, 23 Jun 2021 03:22:48 +0000 (23:22 -0400)
Need to adjust in order to avoid dependency on python-exec[python2_7]
which is automatically included in PYTHON_DEPS, and hook python_compile
to work around distutils-r1 dropping support for old python.

And add an IUSE default so python2 is selected out of the box.

dev-python/pycairo/Manifest
dev-python/pycairo/pycairo-1.18.2-r4.ebuild [moved from dev-python/pycairo/pycairo-1.18.2-r3.ebuild with 75% similarity]

index e9f8ccf88300c68792e33d114686cb069c1bb821..14d47b98eac0bc8e0e33451fa59250c22a5844ca 100644 (file)
@@ -1,4 +1,4 @@
 AUX pycairo-1.18.2-no-setuptools.patch 390 BLAKE2B 2e96d663534447de9aadd2a688dd6277a35ff2f9f3ea3f8a9bd060d4fffca36c565ac0ba4dff2b1fe470ac55cace671b7875a387d85fcaf307a289727f922190 SHA512 31775030b33a756a5075b793f5a4b6c3998f42b6a98f612aa991a2c8ed72263363aaf2dcf43bbd2357adb8897f372e3cd88526fe1b14f3ed645cde53386127f0
 AUX pycairo-1.19.1-py39.patch 890 BLAKE2B 8ee84005e17fd485f568213e751dd30bcb904806d4016088d0c6882958ce7edeba2517f3ab4b8139a8f923e3baec435bc9a21cf3546b60f4459c5cc9ad7a54d6 SHA512 607d6f2cf6bcaec394b755f452d3c4bc0f6edb39bea185a18258c1ee0db11a99d84c7605dbe9db83906518d41baf065b2b8d9261db3736f8a737a2a8f7dff266
 DIST pycairo-1.18.2.tar.gz 200462 BLAKE2B 1f755dc90fe3ee50aa68273a0816752312f144831ff857709e1a4695a58646ffe6be518733480ed37231c213a11d4e5aaf8dfd1cfa68104873bc7d4192435b89 SHA512 279ea80413ba55d493d51455685da09afa1f5c45e2930c3fca3e417a8afe6645a0d8131201f79482de59e5ec56cfef62eac65ed88fe88866bfcc06503dcc59e0
-EBUILD pycairo-1.18.2-r3.ebuild 1714 BLAKE2B d86b6b31c5d4d84b5342f732759ed173bdd30210db792751948573ddaca2a87af67015b8640e46912fe30f0cfd8397d7a3bb222e4ca9e49e9644bb7cf9448be1 SHA512 ca1dc55c53fe187970064c84ccdfe024c21ffba3dd76052ab00dc1c1f9e9c7145411e77ca9b6f953f3ee905244685af08405ce63486c54c42d3c2685d1853d2b
+EBUILD pycairo-1.18.2-r4.ebuild 2167 BLAKE2B 7f411aadd22be225b7149759d349387ac40398c7b9a097eccd8297de3235b4eb979e7287078d0a98ead5a9cc3608777c3d1e8001bcd4438745a2d14606b9e9c0 SHA512 12f17adb522c4da43519f90486e883a5cdd921bc2e5db829f7ec4fc0acc209c9c3da2ababb1fae67099fd2afdb441afd59ef27905ff2c66c586442e4f382a4e3
similarity index 75%
rename from dev-python/pycairo/pycairo-1.18.2-r3.ebuild
rename to dev-python/pycairo/pycairo-1.18.2-r4.ebuild
index a9338d31efc65633170473f6843a0aa34a5c1a48..6c2b8d13f73adb05a08879dd4c1054502241d5e3 100644 (file)
@@ -16,6 +16,7 @@ _PYTHON_ALLOW_PY27=1
 PYTHON_COMPAT=( python2_7 )
 PYTHON_REQ_USE="threads(+)"
 DISTUTILS_USE_SETUPTOOLS=no
+DISTUTILS_OPTIONAL=yes
 
 inherit distutils-r1
 
@@ -26,14 +27,18 @@ SRC_URI="https://github.com/pygobject/${PN}/releases/download/v${PV}/${P}.tar.gz
 LICENSE="|| ( LGPL-2.1 MPL-1.1 )"
 SLOT="2"
 KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
-IUSE="examples"
+IUSE="examples +python_targets_python2_7"
 
 # Strong block on old pycairo w/ python2 support because the merge will
 # otherwise not work properly due to replacing a directory with a file.
 
-RDEPEND=">=x11-libs/cairo-1.13.1[svg]
+DEPEND=">=x11-libs/cairo-1.13.1[svg]
        !!dev-python/pycairo:0[python_targets_python2_7]"
-DEPEND=$RDEPEND
+RDEPEND="$DEPEND
+       dev-lang/python:2.7"
+BDEPEND="dev-lang/python:2.7"
+
+REQUIRED_USE=$PYTHON_REQUIRED_USE
 
 PATCHES=(
        "$FILESDIR/$P-no-setuptools.patch"
@@ -42,6 +47,18 @@ PATCHES=(
 
 distutils_enable_tests setup.py
 
+src_prepare () { default; distutils-r1_src_prepare; }
+
+python_compile () {
+       _distutils-r1_copy_egg_info
+       esetup.py build "$@"
+}
+
+src_configure () { distutils-r1_src_configure; }
+src_compile ()   { distutils-r1_src_compile; }
+src_test ()      { distutils-r1_src_test; }
+src_install ()   { distutils-r1_src_install; }
+
 python_test() {
        einfo "Skipping tests on Python 2 to unblock deps"
 }