gnu: python-matplotlib: Define 'python2-variant'.

* gnu/packages/python.scm (python2-numpy): Take the result of
'package-with-python2' directly.
(python2-scipy): Likewise.
(python-matplotlib)[properties]: New field.
(python2-matplotlib): Call 'strip-python2-variant'.
This commit is contained in:
Ludovic Courtès 2016-02-07 23:01:40 +01:00
parent 48b311b1b3
commit 57b7b8cd60

View file

@ -3115,13 +3115,7 @@ (define-public python-numpy
,phases)))))))
(define-public python2-numpy
(let ((numpy (package-with-python2 python-numpy)))
(package (inherit numpy)
;; Make sure we use exactly PYTHON2-MATPLOTLIB, which is customized for
;; Python 2.
(inputs `(("python2-matplotlib" ,python2-matplotlib)
,@(alist-delete "python-matplotlib"
(package-inputs numpy)))))))
(package-with-python2 python-numpy))
(define-public python-pyparsing
(package
@ -3321,7 +3315,7 @@ (define-public python-matplotlib
(lambda (port)
(format port "[directories]~%
basedirlist = ~a,~a~%
[rc_options]~%
[rc_options]~%
backend = TkAgg~%"
(assoc-ref inputs "tcl")
(assoc-ref inputs "tk"))))))
@ -3368,10 +3362,12 @@ (define-public python-matplotlib
across platforms. Matplotlib can be used in Python scripts, the python and
ipython shell, web application servers, and six graphical user interface
toolkits.")
(license psfl)))
(license psfl)
(properties `((python2-variant . ,(delay python2-matplotlib))))))
(define-public python2-matplotlib
(let ((matplotlib (package-with-python2 python-matplotlib)))
(let ((matplotlib (package-with-python2
(strip-python2-variant python-matplotlib))))
(package (inherit matplotlib)
;; Make sure to use special packages for Python 2 instead
;; of those automatically rewritten by package-with-python2.
@ -3547,15 +3543,7 @@ (define-public python-scipy
(license bsd-3)))
(define-public python2-scipy
(let ((scipy (package-with-python2 python-scipy)))
(package (inherit scipy)
;; Use packages customized for python-2.
(propagated-inputs
`(("python2-matplotlib" ,python2-matplotlib)
("python2-numpy" ,python2-numpy)
,@(alist-delete "python-matplotlib"
(alist-delete "python-numpy"
(package-propagated-inputs scipy))))))))
(package-with-python2 python-scipy))
(define-public python-sqlalchemy
(package