Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 642090 - dev-python/matplotlib-2.1.0-r1 with python3-only setup requires python2 packages
Summary: dev-python/matplotlib-2.1.0-r1 with python3-only setup requires python2 packages
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-23 10:01 UTC by July Tikhonov
Modified: 2018-01-16 14:46 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description July Tikhonov 2017-12-23 10:01:24 UTC
dev-python/matplotlib-2.1.0 depends on packages like functools32, which are only useful for its python2 implementation:

	dev-python/functools32[${PY2_USEDEP}]
	dev-python/subprocess32[${PY2_USEDEP}]

When matplotlib is compiled for python3 only, these packages are still pulled by portage, although obviously not required for matplotlib in this case.

I suggest guarding those packages with python_targets_python2_7?, like

	python_targets_python2_7? ( dev-python/functools32[${PY2_USEDEP}] )
	python_targets_python2_7? ( dev-python/subprocess32[${PY2_USEDEP}] )
Comment 1 jan vereecke 2018-01-16 13:48:00 UTC
--- matplotlib-2.1.0-r1.ebuild  2018-01-16 14:44:34.089659300 +0100
+++ matplotlib-2.1.0-r2.ebuild  2018-01-16 14:33:02.688704900 +0100
@@ -34,18 +34,20 @@

 # #456704 -- a lot of py2-only deps
 PY2_USEDEP=$(python_gen_usedep python2_7)
+PY2_DEPEND="
+       $(python_gen_cond_dep 'dev-python/functools32[${PYTHON_USEDEP}]' python2_7)
+    $(python_gen_cond_dep 'dev-python/subprocess32[${PYTHON_USEDEP}]' python2_7)
+    $(python_gen_cond_dep 'dev-python/backports-functools-lru-cache[${PYTHON_USEDEP}]' python2_7)"
+
 COMMON_DEPEND="
        dev-python/cycler[${PYTHON_USEDEP}]
-       dev-python/functools32[${PY2_USEDEP}]
        >=dev-python/numpy-1.7.1[${PYTHON_USEDEP}]
        dev-python/python-dateutil:0[${PYTHON_USEDEP}]
        dev-python/pytz[${PYTHON_USEDEP}]
        >=dev-python/six-1.10[${PYTHON_USEDEP}]
-       dev-python/subprocess32[${PY2_USEDEP}]
        media-fonts/stix-fonts
        media-libs/freetype:2
        media-libs/libpng:0
-       python_targets_python2_7? ( dev-python/backports-functools-lru-cache[${PY2_USEDEP}] )
        >=media-libs/qhull-2013
        cairo? ( dev-python/cairocffi[${PYTHON_USEDEP}] )
        gtk2? (
@@ -59,6 +61,7 @@
 #      dev-python/pycxx

 DEPEND="${COMMON_DEPEND}
+       ${PY2_DEPEND}
        dev-python/versioneer[${PYTHON_USEDEP}]
        dev-python/setuptools[${PYTHON_USEDEP}]
        virtual/pkgconfig
Comment 2 Andrey Grozin gentoo-dev 2018-01-16 14:46:16 UTC
commit 908d8e520d6078a592ce8db946e86f9e26a8bbdc (HEAD -> master, origin/master, origin/HEAD)
Author: Andrey Grozin <grozin@gentoo.org>
Date:   Tue Jan 16 21:44:04 2018 +0700

    dev-python/matplotlib: in python3-only setup, don't pull python2 packages in
    
    Suggested-by:  jan vereecke <vereecke.jan@skynet.be>
    Closws: https://bugs.gentoo.org/642090
    Package-Manager: Portage-2.3.19, Repoman-2.3.6