gnu: python: Add "minimal" variants.
* gnu/packages/python.scm (python2-minimal, python-minimal): New variables. (wrap-python3): New procedure. (python-wrapper): Use it. (python-minimal-wrapper): New variable. * gnu/packages/xml.scm (libxslt)[native-inputs]: Use PYTHON-MINIMAL-WRAPPER instead of PYTHON-WRAPPER. * gnu/packages/xorg.scm (xcb-proto, libxcb, xorg-server): Likewise.master
parent
0d56e3e1bc
commit
95288fcc6c
|
@ -260,9 +260,46 @@ data types.")
|
||||||
(version-major+minor version)
|
(version-major+minor version)
|
||||||
"/site-packages"))))))))
|
"/site-packages"))))))))
|
||||||
|
|
||||||
(define-public python-wrapper
|
;; Minimal variants of Python, mostly used to break the cycle between Tk and
|
||||||
|
;; Python (Tk -> libxcb -> Python.)
|
||||||
|
|
||||||
|
(define-public python2-minimal
|
||||||
|
(package (inherit python-2)
|
||||||
|
(name "python-minimal")
|
||||||
|
(arguments
|
||||||
|
(substitute-keyword-arguments (package-arguments python-2)
|
||||||
|
((#:configure-flags _)
|
||||||
|
`(list "--enable-shared"
|
||||||
|
(string-append "LDFLAGS=-Wl,-rpath="
|
||||||
|
(assoc-ref %outputs "out") "/lib")))))
|
||||||
|
(inputs '()))) ;none of the optional dependencies
|
||||||
|
|
||||||
|
(define-public python-minimal
|
||||||
(package (inherit python)
|
(package (inherit python)
|
||||||
(name "python-wrapper")
|
(name "python-minimal")
|
||||||
|
(arguments
|
||||||
|
(substitute-keyword-arguments (package-arguments python)
|
||||||
|
((#:configure-flags _)
|
||||||
|
`(let ((openssl (assoc-ref %build-inputs "openssl"))
|
||||||
|
(zlib (assoc-ref %build-inputs "zlib"))
|
||||||
|
(out (assoc-ref %outputs "out")))
|
||||||
|
(list "--enable-shared"
|
||||||
|
(string-append "CPPFLAGS="
|
||||||
|
"-I" openssl "/include "
|
||||||
|
"-I" zlib "/include ")
|
||||||
|
(string-append "LDFLAGS="
|
||||||
|
"-L" openssl "/lib "
|
||||||
|
"-L" zlib "/lib "
|
||||||
|
"-Wl,-rpath=" out "/lib"))))))
|
||||||
|
|
||||||
|
;; OpenSSL is a mandatory dependency of Python 3.x, for urllib;
|
||||||
|
;; zlib is required by 'zipimport', used by pip.
|
||||||
|
(inputs `(("openssl" ,openssl)
|
||||||
|
("zlib" ,zlib)))))
|
||||||
|
|
||||||
|
(define* (wrap-python3 python #:optional (name "python-wrapper"))
|
||||||
|
(package (inherit python)
|
||||||
|
(name name)
|
||||||
(source #f)
|
(source #f)
|
||||||
(build-system trivial-build-system)
|
(build-system trivial-build-system)
|
||||||
(propagated-inputs `(("python" ,python)))
|
(propagated-inputs `(("python" ,python)))
|
||||||
|
@ -286,6 +323,8 @@ data types.")
|
||||||
that they can be invoked under their usual name---e.g., @command{python}
|
that they can be invoked under their usual name---e.g., @command{python}
|
||||||
instead of @command{python3}.")))
|
instead of @command{python3}.")))
|
||||||
|
|
||||||
|
(define-public python-wrapper (wrap-python3 python))
|
||||||
|
(define-public python-minimal-wrapper (wrap-python3 python-minimal))
|
||||||
|
|
||||||
(define-public python-psutil
|
(define-public python-psutil
|
||||||
(package
|
(package
|
||||||
|
|
|
@ -135,7 +135,7 @@ project (but it is usable outside of the Gnome platform).")
|
||||||
(synopsis "C library for applying XSLT stylesheets to XML documents")
|
(synopsis "C library for applying XSLT stylesheets to XML documents")
|
||||||
(inputs `(("libgcrypt" ,libgcrypt)
|
(inputs `(("libgcrypt" ,libgcrypt)
|
||||||
("libxml2" ,libxml2)
|
("libxml2" ,libxml2)
|
||||||
("python" ,python-wrapper)
|
("python" ,python-minimal-wrapper)
|
||||||
("zlib" ,zlib)))
|
("zlib" ,zlib)))
|
||||||
(description
|
(description
|
||||||
"Libxslt is an XSLT C library developed for the GNOME project. It is
|
"Libxslt is an XSLT C library developed for the GNOME project. It is
|
||||||
|
|
|
@ -2050,7 +2050,7 @@ legacy X clients.")
|
||||||
"0bp3f53l9fy5x3mn1rkj1g81aiyzl90wacwvqdgy831aa3kfxb5l"))))
|
"0bp3f53l9fy5x3mn1rkj1g81aiyzl90wacwvqdgy831aa3kfxb5l"))))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("pkg-config" ,pkg-config) ("python" ,python-wrapper)))
|
`(("pkg-config" ,pkg-config) ("python" ,python-minimal-wrapper)))
|
||||||
(home-page "http://www.x.org/wiki/")
|
(home-page "http://www.x.org/wiki/")
|
||||||
(synopsis "XML-XCB protocol descriptions")
|
(synopsis "XML-XCB protocol descriptions")
|
||||||
(description
|
(description
|
||||||
|
@ -4804,7 +4804,7 @@ protocol.")
|
||||||
("libxslt" ,libxslt)))
|
("libxslt" ,libxslt)))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("pkg-config" ,pkg-config)
|
`(("pkg-config" ,pkg-config)
|
||||||
("python" ,python-wrapper)))
|
("python" ,python-minimal-wrapper)))
|
||||||
(arguments
|
(arguments
|
||||||
`(#:configure-flags '("--enable-xkb")))
|
`(#:configure-flags '("--enable-xkb")))
|
||||||
(home-page "http://www.x.org/wiki/")
|
(home-page "http://www.x.org/wiki/")
|
||||||
|
@ -4889,7 +4889,7 @@ over Xlib, including:
|
||||||
("xtrans" ,xtrans)
|
("xtrans" ,xtrans)
|
||||||
("zlib" ,zlib)))
|
("zlib" ,zlib)))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("python" ,python-wrapper)
|
`(("python" ,python-minimal-wrapper)
|
||||||
("pkg-config" ,pkg-config)))
|
("pkg-config" ,pkg-config)))
|
||||||
(arguments
|
(arguments
|
||||||
`(#:parallel-tests? #f
|
`(#:parallel-tests? #f
|
||||||
|
|
Reference in New Issue