gnu: Use PACKAGE/INHERIT in more places.

* gnu/packages/algebra.scm (fftwf, fftw-openmpi),
gnu/packages/audio.scm (ztoolkit-rsvg),
gnu/packages/bioinformatics.scm (python2-dendropy),
gnu/packages/boost.scm (boost-with-python2),
gnu/packages/check.scm (python2-mock, python2-pytest-mock),
gnu/packages/cups.scm (hplip-minimal),
gnu/packages/freedesktop.scm (libinput-minimal),
gnu/packages/gettext.scm (gnu-gettext),
gnu/packages/glib.scm (python2-pygobject),
gnu/packages/gnome.scm (gdl-minimal, libsoup-minimal, python2-pyatspi),
gnu/packages/groff.scm (groff-minimal),
gnu/packages/jami.scm (ffmpeg-jami),
gnu/packages/libcanberra.scm (libcanberra/gtk+-2),
gnu/packages/lirc.scm (python2-lirc),
gnu/packages/llvm.scm (clang-runtime-3.5),
gnu/packages/mpi.scm (java-openmpi, openmpi-thread-multiple),
gnu/packages/node.scm (libnode),
gnu/packages/onc-rpc.scm (libtirpc/hurd),
gnu/packages/python-compression.scm (bitshuffle-for-snappy),
gnu/packages/python-crypto.scm (python2-pycrypto, python2-cryptography)
(python2-cryptography, python2-m2crypto),
gnu/packages/python-web.scm (python2-html2text, python2-tornado)
(python2-terminado, python2-ndg-httpsclient, python2-websocket-client)
(python2-rauth, python2-url, python2-s3transfer),
gnu/packages/python-xyz.scm (python2-psutil, python2-serpent)
(python2-humanfriendly, python2-empy, python2-parse-type, python2-polib)
(python2-jsonschema, python2-pystache, python2-cython, python2-numpydoc)
(python2-ipyparallel, python2-traitlets, python2-dbus)
(python2-beautifulsoup4, python2-pep517, python2-flake8, python2-llfuse)
(python2-tlsh, python-file, python2-notebook, python-jupyter-console-minimal)
(python2-contextlib2, python2-promise, python2-anyjson, python2-amqp)
(python2-kombu, python2-billiard, python2-celery, python2-whoosh)
(python2-jellyfish, python-rope, ptpython-2, python2-binaryornot)
(python2-setproctitle, python2-argcomplete, python2-xopen, python2-isort)
(python2-radon, python2-rfc6555, python2-activepapers, python2-send2trash)
(python2-cloudpickle, python2-reparser),
gnu/packages/python.scm (python2-called-python),
gnu/packages/qt.scm (python2-sip, python-pyqt-without-qtwebkit, python2-pyqt)
(python-qscintilla, python-pyqt+qscintilla),
gnu/packages/scanner.scm (sane-backends),
gnu/packages/sdl.scm (guile3.0-sdl2),
gnu/packages/selinux.scm (checkpolicy, libselinux, libsemanage, secilc)
(python-sepolgen, policycoreutils),
gnu/packages/serialization.scm (lua5.1-libmpack, lua5.2-libmpack),
gnu/packages/simulation.scm (fenics),
gnu/packages/statistics.scm (python2-statsmodels),
gnu/packages/texinfo.scm (info-reader),
gnu/packages/wxwidgets.scm (wxwidgets-gtk2, wxwidgets-gtk2-3.1),
gnu/packages/xml.scm (xmlsec-nss),
gnu/packages/xorg.scm (uim-gtk, uim-qt),
guix/build-system/python.scm (package-with-explicit-python)
(strip-python2-variant): Use PACKAGE/INHERIT.
This commit is contained in:
Mark H Weaver 2021-03-17 03:42:12 -04:00
parent d9f501b619
commit 1a265842e6
No known key found for this signature in database
GPG key ID: 7CEF29847562C516
35 changed files with 158 additions and 209 deletions

View file

@ -794,7 +794,7 @@ (define-public fftw
(license license:gpl2+)))
(define-public fftwf
(package (inherit fftw)
(package/inherit fftw
(name "fftwf")
(arguments
(substitute-keyword-arguments (package-arguments fftw)
@ -812,7 +812,7 @@ (define-public fftwf
" Single-precision version."))))
(define-public fftw-openmpi
(package (inherit fftw)
(package/inherit fftw
(name "fftw-openmpi")
(inputs
`(("openmpi" ,openmpi)

View file

@ -4918,8 +4918,7 @@ (define-public libinstpatch
(license license:lgpl2.1)))
(define-public ztoolkit-rsvg
(package
(inherit ztoolkit)
(package/inherit ztoolkit
(name "ztoolkit-rsvg")
(arguments
`(#:configure-flags `("-Denable_rsvg=true")))

View file

@ -2744,8 +2744,7 @@ (define-public python-dendropy
(define-public python2-dendropy
(let ((base (package-with-python2 python-dendropy)))
(package
(inherit base)
(package/inherit base
(arguments
`(#:phases
(modify-phases %standard-phases

View file

@ -200,8 +200,7 @@ (define-public boost
"Some components have other similar licences."))))
(define-public boost-with-python2
(package
(inherit boost)
(package/inherit boost
(name "boost-python2")
(native-inputs
`(("python" ,python-2)

View file

@ -836,7 +836,7 @@ (define-public python-mock
(define-public python2-mock
(let ((base (package-with-python2
(strip-python2-variant python-mock))))
(package (inherit base)
(package/inherit base
(propagated-inputs
`(("python2-functools32" ,python2-functools32)
("python2-funcsigs" ,python2-funcsigs)
@ -1240,7 +1240,7 @@ (define-public python-pytest-mock
(define-public python2-pytest-mock
(let ((base (package-with-python2
(strip-python2-variant python-pytest-mock))))
(package (inherit base)
(package/inherit base
(propagated-inputs
`(("python2-mock" ,python2-mock)
,@(package-propagated-inputs base))))))

View file

@ -676,8 +676,7 @@ (define-public hplip
("pkg-config" ,pkg-config)))))
(define-public hplip-minimal
(package
(inherit hplip)
(package/inherit hplip
(name "hplip-minimal")
(arguments
(substitute-keyword-arguments (package-arguments hplip)

View file

@ -508,7 +508,7 @@ (define-public libinput
(license license:x11)))
(define-public libinput-minimal
(package (inherit libinput)
(package/inherit libinput
(name "libinput-minimal")
(inputs
(fold alist-delete (package-inputs libinput)

View file

@ -139,8 +139,7 @@ (define-public gettext-minimal
;; module when there's a #:renamer, and that module may be empty at that point
;; in case or circular dependencies.
(define-public gnu-gettext
(package
(inherit gettext-minimal)
(package/inherit gettext-minimal
(name "gettext")
(arguments
(substitute-keyword-arguments (package-arguments gettext-minimal)

View file

@ -833,32 +833,33 @@ (define-public python-pygobject
(properties `((python2-variant . ,(delay python2-pygobject))))))
(define-public python2-pygobject
(package (inherit (strip-python2-variant python-pygobject))
(name "python2-pygobject")
(let ((base (strip-python2-variant python-pygobject)))
(package/inherit base
(name "python2-pygobject")
;; Note: We use python-build-system here, because Meson only supports
;; Python 3, and needs PYTHONPATH etc set up correctly, which makes it
;; difficult to use for Python 2 projects.
(build-system python-build-system)
(arguments
`(#:python ,python-2
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'delete-broken-tests
(lambda _
;; FIXME: this test freezes and times out.
(delete-file "tests/test_mainloop.py")
;; FIXME: this test fails with this kind of error:
;; AssertionError: <Handlers.SIG_IGN: 1> != <built-in function default_int_handler
(delete-file "tests/test_ossig.py")
#t)))))
(inputs
`(("python-pycairo" ,python2-pycairo)
("gobject-introspection" ,gobject-introspection)))
(native-inputs
`(("glib-bin" ,glib "bin")
("pkg-config" ,pkg-config)
("python-pytest" ,python2-pytest)))))
;; Note: We use python-build-system here, because Meson only supports
;; Python 3, and needs PYTHONPATH etc set up correctly, which makes it
;; difficult to use for Python 2 projects.
(build-system python-build-system)
(arguments
`(#:python ,python-2
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'delete-broken-tests
(lambda _
;; FIXME: this test freezes and times out.
(delete-file "tests/test_mainloop.py")
;; FIXME: this test fails with this kind of error:
;; AssertionError: <Handlers.SIG_IGN: 1> != <built-in function default_int_handler
(delete-file "tests/test_ossig.py")
#t)))))
(inputs
`(("python-pycairo" ,python2-pycairo)
("gobject-introspection" ,gobject-introspection)))
(native-inputs
`(("glib-bin" ,glib "bin")
("pkg-config" ,pkg-config)
("python-pytest" ,python2-pytest))))))
(define-public perl-glib
(package

View file

@ -2433,8 +2433,7 @@ (define-public gdl
;;; A minimal variant used to break a cycle with Inkscape.
(define-public gdl-minimal
(package
(inherit gdl)
(package/inherit gdl
(name "gdl-minimal")
(arguments
'(#:phases
@ -4899,8 +4898,7 @@ (define-public libsoup
;;; A minimal version of libsoup used to prevent a cycle with Inkscape.
(define-public libsoup-minimal
(package
(inherit libsoup)
(package/inherit libsoup
(name "libsoup-minimal")
(outputs (delete "doc" (package-outputs libsoup)))
(arguments
@ -10099,8 +10097,7 @@ (define-public python-pyatspi
(properties '((upstream-name . "pyatspi")))))
(define-public python2-pyatspi
(package
(inherit python-pyatspi)
(package/inherit python-pyatspi
(name "python2-pyatspi")
(inputs
`(("python" ,python-2)))

View file

@ -128,8 +128,7 @@ (define-public groff
(define-public groff-minimal
;; Minimialist groff for use by man-db. Its closure size is less than half
;; that of the full-blown groff.
(package
(inherit groff)
(package/inherit groff
(name "groff-minimal")
(synopsis "Minimalist variant of Groff for use by man-db")
(outputs '("out"))

View file

@ -365,8 +365,7 @@ (define (system=? s)
'())))
(define-public ffmpeg-jami
(package
(inherit ffmpeg)
(package/inherit ffmpeg
(name "ffmpeg-jami")
(native-inputs
`(("sfl-patches" ,%sfl-patches)

View file

@ -105,7 +105,7 @@ (define-public libcanberra
(license lgpl2.1+)))
(define-public libcanberra/gtk+-2
(package (inherit libcanberra)
(package/inherit libcanberra
(name "libcanberra-gtk2")
(inputs `(,@(alist-delete "gtk+" (package-inputs libcanberra))
("gtk+" ,gtk+-2)))))

View file

@ -140,8 +140,7 @@ (define-public python-lirc
(define-public python2-lirc
(let ((base (package-with-python2 (strip-python2-variant python-lirc))))
(package
(inherit base)
(package/inherit base
(arguments
`(#:tests? #f ; the only tests that exist are human-interactive
#:phases

View file

@ -821,8 +821,7 @@ (define-public clang-runtime-3.5
'("clang-runtime-asan-build-fixes.patch"
"clang-runtime-3.5-libsanitizer-mode-field.patch"
"clang-3.5-libsanitizer-ustat-fix.patch"))))
(package
(inherit runtime)
(package/inherit runtime
(arguments
(substitute-keyword-arguments (package-arguments runtime)
((#:phases phases '%standard-phases)

View file

@ -300,7 +300,7 @@ (define-public openmpi
;; TODO: javadoc files contain timestamps.
(define-public java-openmpi
(package (inherit openmpi)
(package/inherit openmpi
(name "java-openmpi")
(inputs
`(("openmpi" ,openmpi)
@ -344,8 +344,7 @@ (define-public java-openmpi
(synopsis "Java bindings for MPI")))
(define-public openmpi-thread-multiple
(package
(inherit openmpi)
(package/inherit openmpi
(name "openmpi-thread-multiple")
(arguments
(substitute-keyword-arguments (package-arguments openmpi)

View file

@ -212,8 +212,7 @@ (define-public node
(timeout . 21600))))) ;6h
(define-public libnode
(package
(inherit node)
(package/inherit node
(name "libnode")
(arguments
(substitute-keyword-arguments (package-arguments node)

View file

@ -75,12 +75,12 @@ (define-public libtirpc
(license bsd-3)))
(define-public libtirpc/hurd
(package
(inherit libtirpc)
(package/inherit libtirpc
(name "libtirpc-hurd")
(source (origin (inherit (package-source libtirpc))
(patches (search-patches "libtirpc-hurd.patch"
"libtirpc-hurd-client.patch"))))
(patches (append (origin-patches libtirpc)
(search-patches "libtirpc-hurd.patch"
"libtirpc-hurd-client.patch")))))
(arguments
(substitute-keyword-arguments (package-arguments libtirpc)
((#:configure-flags flags ''())

View file

@ -202,8 +202,7 @@ (define-public bitshuffle
(license license:expat)))
(define-public bitshuffle-for-snappy
(package
(inherit bitshuffle)
(package/inherit bitshuffle
(name "bitshuffle-for-snappy")
(build-system gnu-build-system)
(arguments

View file

@ -334,7 +334,7 @@ (define-public python-pycrypto
(define-public python2-pycrypto
(let ((pycrypto (package-with-python2 python-pycrypto)))
(package (inherit pycrypto)
(package/inherit pycrypto
(inputs
`(("python" ,python-2)
,@(alist-delete
@ -553,7 +553,7 @@ (define-public python-cryptography
(define-public python2-cryptography
(let ((crypto (package-with-python2
(strip-python2-variant python-cryptography))))
(package (inherit crypto)
(package/inherit crypto
(propagated-inputs
`(("python2-ipaddress" ,python2-ipaddress)
("python2-backport-ssl-match-hostname"
@ -1122,7 +1122,7 @@ (define-public python-m2crypto
(define-public python2-m2crypto
(let ((m2crypto (package-with-python2
(strip-python2-variant python-m2crypto))))
(package (inherit m2crypto)
(package/inherit m2crypto
(propagated-inputs
`(("python2-typing" ,python2-typing))))))

View file

@ -708,8 +708,7 @@ (define-public python-html2text
(define-public python2-html2text
(let ((base (package-with-python2 python-html2text)))
(package
(inherit base)
(package/inherit base
;; This is the last version with support for Python 2.
(version "2019.8.11")
(source (origin
@ -1725,7 +1724,7 @@ (define-public python-tornado-6
(define-public python2-tornado
(let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
(package (inherit tornado)
(package/inherit tornado
(propagated-inputs
`(("python2-backport-ssl-match-hostname"
,python2-backport-ssl-match-hostname)
@ -1784,7 +1783,7 @@ (define-public python-terminado
(define-public python2-terminado
(let ((terminado (package-with-python2 (strip-python2-variant python-terminado))))
(package (inherit terminado)
(package/inherit terminado
(propagated-inputs
`(("python2-backport-ssl-match-hostname"
,python2-backport-ssl-match-hostname)
@ -2371,7 +2370,7 @@ (define-public python-ndg-httpsclient
;; python2-openssl requires special care, so package-with-python2 is
;; insufficient.
(define-public python2-ndg-httpsclient
(package (inherit python-ndg-httpsclient)
(package/inherit python-ndg-httpsclient
(name "python2-ndg-httpsclient")
(arguments
(substitute-keyword-arguments (package-arguments python-ndg-httpsclient)
@ -2403,8 +2402,7 @@ (define-public python-websocket-client
(define-public python2-websocket-client
(let ((base (package-with-python2
(strip-python2-variant python-websocket-client))))
(package
(inherit base)
(package/inherit base
(native-inputs
`(("python2-backport-ssl-match-hostname"
,python2-backport-ssl-match-hostname)
@ -2710,8 +2708,7 @@ (define-public python-rauth
(define-public python2-rauth
(let ((base (package-with-python2 (strip-python2-variant python-rauth))))
(package
(inherit base)
(package/inherit base
(native-inputs `(("python2-unittest2" ,python2-unittest2)
,@(package-native-inputs base))))))
@ -3211,7 +3208,7 @@ (define-public python-url
(define-public python2-url
(let ((base (package-with-python2 (strip-python2-variant python-url))))
(package (inherit base)
(package/inherit base
(propagated-inputs
`(("python2-publicsuffix" ,python2-publicsuffix))))))
@ -3373,8 +3370,7 @@ (define-public python-s3transfer
(define-public python2-s3transfer
(let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
(package
(inherit base)
(package/inherit base
(native-inputs
`(("python2-futures" ,python2-futures)
,@(package-native-inputs base))))))

View file

@ -580,8 +580,7 @@ (define-public python-psutil
(define-public python2-psutil
(let ((base (package-with-python2 (strip-python2-variant python-psutil))))
(package
(inherit base)
(package/inherit base
(propagated-inputs
`(("python2-enum34" ,python2-enum34) ;optional
,@(package-propagated-inputs base))))))
@ -1183,8 +1182,7 @@ (define-public python-serpent
(define-public python2-serpent
(let ((base (package-with-python2 (strip-python2-variant python-serpent))))
(package
(inherit base)
(package/inherit base
(propagated-inputs
`(("python-enum34" ,python2-enum34)
,@(package-propagated-inputs base))))))
@ -1357,7 +1355,7 @@ (define-public python-humanfriendly
(define-public python2-humanfriendly
(let ((base (package-with-python2
(strip-python2-variant python-humanfriendly))))
(package (inherit base)
(package/inherit base
(propagated-inputs
`(("python2-monotonic" ,python2-monotonic)
,@(package-propagated-inputs base))))))
@ -2184,8 +2182,7 @@ (define-public python-empy
(define-public python2-empy
(let ((base (package-with-python2 (strip-python2-variant python-empy))))
(package
(inherit base)
(package/inherit base
(arguments `(,@(package-arguments base)
#:tests? #t)))))
@ -2314,7 +2311,7 @@ (define-public python-parse-type
(define-public python2-parse-type
(let ((base (package-with-python2
(strip-python2-variant python-parse-type))))
(package (inherit base)
(package/inherit base
(propagated-inputs
`(("python2-enum34" ,python2-enum34)
,@(package-propagated-inputs base))))))
@ -2363,8 +2360,7 @@ (define-public python-polib
(define-public python2-polib
(let ((base (package-with-python2 (strip-python2-variant python-polib))))
(package
(inherit base)
(package/inherit base
(arguments `(,@(package-arguments base)
;; Tests don't work with python2.
#:tests? #f)))))
@ -2962,7 +2958,7 @@ (define-public python-jsonschema
(define-public python2-jsonschema
(let ((jsonschema (package-with-python2
(strip-python2-variant python-jsonschema))))
(package (inherit jsonschema)
(package/inherit jsonschema
(propagated-inputs
`(("python2-functools32" ,python2-functools32)
,@(package-propagated-inputs jsonschema))))))
@ -3459,15 +3455,16 @@ (define-public python-pystache
(properties `((python2-variant . ,(delay python2-pystache))))))
(define-public python2-pystache
(package (inherit (package-with-python2
(strip-python2-variant python-pystache)))
(arguments
`(#:python ,python-2
#:phases
(modify-phases %standard-phases
(replace 'check
(lambda _
(invoke "python" "test_pystache.py"))))))))
(let ((base (package-with-python2
(strip-python2-variant python-pystache))))
(package/inherit base
(arguments
`(#:python ,python-2
#:phases
(modify-phases %standard-phases
(replace 'check
(lambda _
(invoke "python" "test_pystache.py")))))))))
(define-public python-joblib
(package
@ -4524,8 +4521,7 @@ (define-public python-cython
(define-public python2-cython
(let ((base (package-with-python2 (strip-python2-variant python-cython))))
(package
(inherit base)
(package/inherit base
(name "python2-cython")
(inputs
`(("python-2" ,python-2))) ;this is not automatically changed
@ -5075,8 +5071,7 @@ (define-public python-numpydoc
(define-public python2-numpydoc
(let ((base (package-with-python2
(strip-python2-variant python-numpydoc))))
(package
(inherit base)
(package/inherit base
(propagated-inputs
`(("python2-jinja2" ,python2-jinja2)
,@(package-propagated-inputs base))))))
@ -7120,8 +7115,7 @@ (define-public python-ipyparallel
(define-public python2-ipyparallel
(let ((ipyparallel (package-with-python2 python-ipyparallel)))
(package
(inherit ipyparallel)
(package/inherit ipyparallel
(propagated-inputs
`(("python2-futures" ,python2-futures)
,@(package-propagated-inputs ipyparallel))))))
@ -7209,8 +7203,7 @@ (define-public python-traitlets
(define-public python2-traitlets
(let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
(package
(inherit traitlets)
(package/inherit traitlets
(propagated-inputs
`(("python2-enum34" ,python2-enum34)
,@(package-propagated-inputs traitlets))))))
@ -7762,7 +7755,7 @@ (define-public python-dbus
(license license:expat)))
(define-public python2-dbus
(package (inherit python-dbus)
(package/inherit python-dbus
(name "python2-dbus")
(inputs `(("python" ,python-2)
,@(alist-delete "python"
@ -7836,10 +7829,10 @@ (define-public python-beautifulsoup4
(properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
(define-public python2-beautifulsoup4
(package
(inherit (package-with-python2
(strip-python2-variant python-beautifulsoup4)))
(arguments `(#:python ,python-2))))
(let ((base (package-with-python2
(strip-python2-variant python-beautifulsoup4))))
(package/inherit base
(arguments `(#:python ,python-2)))))
(define-public python-soupsieve
(package
@ -8561,8 +8554,7 @@ (define-public python-pep517
(define-public python2-pep517
(let ((base (package-with-python2
(strip-python2-variant python-pep517))))
(package
(inherit base)
(package/inherit base
(name "python2-pep517")
(arguments
`(#:tests? #f
@ -8654,7 +8646,7 @@ (define-public python-flake8
(define-public python2-flake8
(let ((base (package-with-python2 (strip-python2-variant python-flake8))))
(package (inherit base)
(package/inherit base
(propagated-inputs
`(("python2-configparser" ,python2-configparser)
("python2-enum34" ,python2-enum34)
@ -9180,9 +9172,10 @@ (define-public python-llfuse
(properties `((python2-variant . ,(delay python2-llfuse))))))
(define-public python2-llfuse
(package (inherit (package-with-python2
(strip-python2-variant python-llfuse)))
(propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
(let ((base (package-with-python2
(strip-python2-variant python-llfuse))))
(package/inherit base
(propagated-inputs `(("python2-contextlib2" ,python2-contextlib2))))))
(define-public python-msgpack
(package
@ -9930,8 +9923,7 @@ (define-public python-tlsh
(license license:asl2.0)))
(define-public python2-tlsh
(package
(inherit python-tlsh)
(package/inherit python-tlsh
(name "python2-tlsh")
(inputs `(("python" ,python-2)))))
@ -10020,8 +10012,7 @@ (define-public python2-libarchive-c
(package-with-python2 python-libarchive-c))
(define-public python-file
(package
(inherit file)
(package/inherit file
(name "python-file")
(build-system python-build-system)
(arguments
@ -10379,7 +10370,7 @@ (define-public python-notebook
(define-public python2-notebook
(let ((base (package-with-python2
(strip-python2-variant python-notebook))))
(package (inherit base)
(package/inherit base
(native-inputs
`(("python2-mock" ,python2-mock)
,@(package-native-inputs base)))
@ -10513,8 +10504,7 @@ (define-public python2-jupyter-console
;; the functionality in both packages working, strip down the
;; python-jupyter-console package when using it as an input to python-ipython.
(define python-jupyter-console-minimal
(package
(inherit python-jupyter-console)
(package/inherit python-jupyter-console
(name "python-jupyter-console-minimal")
(arguments
(substitute-keyword-arguments
@ -10854,8 +10844,7 @@ (define-public python-contextlib2
(define-public python2-contextlib2
(let ((base (package-with-python2
(strip-python2-variant python-contextlib2))))
(package
(inherit base)
(package/inherit base
(arguments
(substitute-keyword-arguments (package-arguments base)
((#:phases phases)
@ -11325,7 +11314,7 @@ (define-public python-promise
(define-public python2-promise
(let ((promise (package-with-python2
(strip-python2-variant python-promise))))
(package (inherit promise)
(package/inherit promise
(arguments (substitute-keyword-arguments (package-arguments promise)
((#:tests? _) #t)))
(native-inputs
@ -12029,8 +12018,7 @@ (define-public python-anyjson
(define-public python2-anyjson
(let ((anyjson (package-with-python2
(strip-python2-variant python-anyjson))))
(package
(inherit anyjson)
(package/inherit anyjson
(arguments `(;; Unlike the python 3 variant, we do run tests. See above!
#:tests? #t
,@(package-arguments anyjson)))
@ -12067,8 +12055,7 @@ (define-public python-amqp
(define-public python2-amqp
(let ((amqp (package-with-python2
(strip-python2-variant python-amqp))))
(package
(inherit amqp)
(package/inherit amqp
(arguments `(;; Tries to run coverage tests with nose-cover3, which seems
;; unmaintained. Weirdly, does not do this on the python 3
;; version?
@ -12140,8 +12127,7 @@ (define-public python-kombu
(define-public python2-kombu
(let ((kombu (package-with-python2
(strip-python2-variant python-kombu))))
(package
(inherit kombu)
(package/inherit kombu
(arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
;; It works fine on the python3 variant.
#:tests? #f
@ -12178,8 +12164,7 @@ (define-public python-billiard
(define-public python2-billiard
(let ((billiard (package-with-python2
(strip-python2-variant python-billiard))))
(package
(inherit billiard)
(package/inherit billiard
(native-inputs `(("python2-unittest2" ,python2-unittest2)
("python2-mock" ,python2-mock)
,@(package-native-inputs billiard))))))
@ -12229,8 +12214,7 @@ (define-public python-celery
(define-public python2-celery
(let ((celery (package-with-python2
(strip-python2-variant python-celery))))
(package
(inherit celery)
(package/inherit celery
(native-inputs `(("python2-unittest2" ,python2-unittest2)
("python2-mock" ,python2-mock)
,@(package-native-inputs celery))))))
@ -12384,7 +12368,7 @@ (define-public python-whoosh
(define-public python2-whoosh
(let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
(package (inherit whoosh)
(package/inherit whoosh
(propagated-inputs
`(("python2-backport-ssl-match-hostname"
,python2-backport-ssl-match-hostname)
@ -12498,7 +12482,7 @@ (define-public python-jellyfish
(define-public python2-jellyfish
(let ((jellyfish (package-with-python2
(strip-python2-variant python-jellyfish))))
(package (inherit jellyfish)
(package/inherit jellyfish
(native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
,@(package-native-inputs jellyfish))))))
@ -12913,8 +12897,7 @@ (define-public python2-rope
(license license:gpl2)))
(define-public python-rope
(package
(inherit python2-rope)
(package/inherit python2-rope
(name "python-rope")
(arguments `(#:python ,python-wrapper
;; XXX: Only partial python3 support, results in some failing
@ -14217,8 +14200,7 @@ (define-public ptpython
(define-public ptpython-2
(let ((base (package-with-python2 (strip-python2-variant ptpython))))
(package
(inherit base)
(package/inherit base
(name "ptpython2"))))
(define-public python-stem
@ -14361,7 +14343,7 @@ (define-public python-binaryornot
(define-public python2-binaryornot
(let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
(package (inherit base)
(package/inherit base
(propagated-inputs
`(("python2-enum34" ,python2-enum34)
,@(package-propagated-inputs base))))))
@ -14878,8 +14860,7 @@ (define-public python-setproctitle
(define-public python2-setproctitle
(let ((base (package-with-python2
(strip-python2-variant python-setproctitle))))
(package
(inherit base)
(package/inherit base
(native-inputs `(("python2-nose" ,python2-nose)
,@(package-native-inputs base))))))
@ -15070,8 +15051,7 @@ (define-public python-argcomplete
(define-public python2-argcomplete
(let ((variant (package-with-python2
(strip-python2-variant python-argcomplete))))
(package
(inherit variant)
(package/inherit variant
(arguments
(substitute-keyword-arguments (package-arguments variant)
((#:phases phases '%standard-phases)
@ -15195,8 +15175,7 @@ (define-public python-xopen
(define-public python2-xopen
(let ((base (package-with-python2
(strip-python2-variant python-xopen))))
(package
(inherit base)
(package/inherit base
(propagated-inputs `(("python2-bz2file" ,python2-bz2file)
,@(package-propagated-inputs base))))))
@ -16061,7 +16040,7 @@ (define-public python-isort
(define-public python2-isort
(let ((base (package-with-python2
(strip-python2-variant python-isort))))
(package (inherit base)
(package/inherit base
(native-inputs
`(("python2-futures" ,python2-futures)
,@(package-native-inputs base))))))
@ -16632,8 +16611,7 @@ (define-public python-radon
(define-public python2-radon
(let ((base (package-with-python2 (strip-python2-variant python-radon))))
(package
(inherit base)
(package/inherit base
(propagated-inputs
`(("python-configparser" ,python2-configparser)
("python-future" ,python2-future)
@ -16932,8 +16910,7 @@ (define-public python-rfc6555
(define-public python2-rfc6555
(let ((base (package-with-python2
(strip-python2-variant python-rfc6555))))
(package
(inherit base)
(package/inherit base
(propagated-inputs
`(("python2-selectors2" ,python2-selectors2))))))
@ -18058,8 +18035,7 @@ (define-public python-activepapers
(define-public python2-activepapers
(let ((base (package-with-python2
(strip-python2-variant python-activepapers))))
(package
(inherit base)
(package/inherit base
(arguments
(substitute-keyword-arguments (package-arguments base)
((#:phases phases)
@ -18293,17 +18269,18 @@ (define-public python-send2trash
(license license:bsd-3)))
(define-public python2-send2trash
(package
(inherit (package-with-python2 (strip-python2-variant python-send2trash)))
(arguments
(substitute-keyword-arguments (package-arguments python-send2trash)
((#:phases phases)
`(modify-phases ,phases
(add-before 'check 'setenv
(lambda _
(setenv "PYTHONPATH"
(string-append (getcwd) ":" (getenv "PYTHONPATH")))
#t))))))))
(let ((base (package-with-python2
(strip-python2-variant python-send2trash))))
(package/inherit base
(arguments
(substitute-keyword-arguments (package-arguments python-send2trash)
((#:phases phases)
`(modify-phases ,phases
(add-before 'check 'setenv
(lambda _
(setenv "PYTHONPATH"
(string-append (getcwd) ":" (getenv "PYTHONPATH")))
#t)))))))))
(define-public python-pyfavicon
(package
@ -20164,8 +20141,7 @@ (define-public python-cloudpickle
(define-public python2-cloudpickle
(let ((base (package-with-python2 (strip-python2-variant python-cloudpickle))))
(package
(inherit base)
(package/inherit base
(native-inputs
`(("python-mock" ,python2-mock)
,@(package-native-inputs base)))
@ -20405,7 +20381,7 @@ (define-public python-reparser
(define-public python2-reparser
(let ((reparser (package-with-python2
(strip-python2-variant python-reparser))))
(package (inherit reparser)
(package/inherit reparser
(propagated-inputs
`(("python2-enum34" ,python2-enum34)
,@(package-propagated-inputs reparser))))))

View file

@ -366,8 +366,7 @@ (define-public python2-called-python
;; Both 2.x and 3.x used to be called "python". In commit
;; a7714d42de2c3082f3609d1e63c83d703fb39cf9 (March 2018), we renamed the
;; Python 2.x package to "python2".
(package
(inherit python-2)
(package/inherit python-2
(name "python")
(properties `((superseded . ,python-2)))))

View file

@ -2030,7 +2030,7 @@ (define-public python-sip
(license license:gpl3)))
(define-public python2-sip
(package (inherit python-sip)
(package/inherit python-sip
(name "python2-sip")
(native-inputs
`(("python" ,python-2)))))
@ -2215,13 +2215,13 @@ (define-public python-pyqtwebengine
;; Ultimately, it would be nicer to have a more modular set of python-pyqt-*
;; packages that could be used together.
(define-public python-pyqt-without-qtwebkit
(package (inherit python-pyqt)
(package/inherit python-pyqt
(name "python-pyqt-without-qtwebkit")
(inputs
(alist-delete "qtwebkit" (package-inputs python-pyqt)))))
(define-public python2-pyqt
(package (inherit python-pyqt)
(package/inherit python-pyqt
(name "python2-pyqt")
(propagated-inputs
`(("python-enum34" ,python2-enum34)
@ -2367,7 +2367,7 @@ (define-public qscintilla
(license license:gpl3+)))
(define-public python-qscintilla
(package (inherit qscintilla)
(package/inherit qscintilla
(name "python-qscintilla")
(arguments
`(#:configure-flags
@ -2415,7 +2415,7 @@ (define-public python-qscintilla
;; variables such as PYTHONPATH, so we need to build a union package to make
;; it work.
(define-public python-pyqt+qscintilla
(package (inherit python-pyqt)
(package/inherit python-pyqt
(name "python-pyqt+qscintilla")
(source #f)
(build-system trivial-build-system)

View file

@ -147,8 +147,7 @@ (define-public sane-backends-minimal
;; support for HP scanners whose backends are not maintained by the SANE
;; project, and builds all of those backends.
(define-public sane-backends
(package
(inherit sane-backends-minimal)
(package/inherit sane-backends-minimal
(name "sane-backends")
(inputs
`(("hplip" ,(@ (gnu packages cups) hplip-minimal))

View file

@ -648,8 +648,7 @@ (define-public guile-sdl2
(license lgpl3+)))
(define-public guile3.0-sdl2
(package
(inherit guile-sdl2)
(package/inherit guile-sdl2
(name "guile3.0-sdl2")
(native-inputs
`(("guile" ,guile-3.0)

View file

@ -101,7 +101,7 @@ (define-public libsepol
(license license:lgpl2.1+)))
(define-public checkpolicy
(package (inherit libsepol)
(package/inherit libsepol
(name "checkpolicy")
(arguments
`(#:tests? #f ; there is no check target
@ -139,7 +139,7 @@ (define-public checkpolicy
(license license:gpl2)))
(define-public libselinux
(package (inherit libsepol)
(package/inherit libsepol
(name "libselinux")
(outputs '("out" "python"))
(arguments
@ -193,7 +193,7 @@ (define-public libselinux
(license license:public-domain)))
(define-public libsemanage
(package (inherit libsepol)
(package/inherit libsepol
(name "libsemanage")
(arguments
(substitute-keyword-arguments (package-arguments libsepol)
@ -241,7 +241,7 @@ (define-public libsemanage
(license license:lgpl2.1+)))
(define-public secilc
(package (inherit libsepol)
(package/inherit libsepol
(name "secilc")
(arguments
(substitute-keyword-arguments (package-arguments libsepol)
@ -268,7 +268,7 @@ (define-public secilc
(license license:bsd-2)))
(define-public python-sepolgen
(package (inherit libsepol)
(package/inherit libsepol
(name "python-sepolgen")
(arguments
`(#:modules ((srfi srfi-1)
@ -373,7 +373,7 @@ (define-public python-setools
license:gpl2+))))
(define-public policycoreutils
(package (inherit libsepol)
(package/inherit libsepol
(name "policycoreutils")
(arguments
`(#:test-target "test"

View file

@ -220,7 +220,7 @@ (define-public lua-libmpack
(synopsis "Lua bindings for the libmpack binary serialization library")))
(define-public lua5.1-libmpack
(package (inherit lua-libmpack)
(package/inherit lua-libmpack
(name "lua5.1-libmpack")
(arguments
(substitute-keyword-arguments (package-arguments lua-libmpack)
@ -240,7 +240,7 @@ (define-public lua5.1-libmpack
`(("lua" ,lua-5.1)))))
(define-public lua5.2-libmpack
(package (inherit lua-libmpack)
(package/inherit lua-libmpack
(name "lua5.2-libmpack")
(arguments
(substitute-keyword-arguments (package-arguments lua-libmpack)

View file

@ -602,7 +602,7 @@ (define-public fenics-dolfin
license:lgpl3+))))
(define-public fenics
(package (inherit fenics-dolfin)
(package/inherit fenics-dolfin
(name "fenics")
(build-system python-build-system)
(inputs

View file

@ -1981,7 +1981,7 @@ (define-public python-statsmodels
(define-public python2-statsmodels
(let ((stats (package-with-python2 python-statsmodels)))
(package (inherit stats)
(package/inherit stats
(propagated-inputs
`(("python2-pytz" ,python2-pytz)
("python2-numpy" ,python2-numpy)

View file

@ -156,8 +156,7 @@ (define-public texinfo-4
(define-public info-reader
;; The idea of this package is to have the standalone Info reader without
;; the dependency on Perl that 'makeinfo' drags.
(package
(inherit texinfo)
(package/inherit texinfo
(name "info-reader")
(arguments
`(,@(substitute-keyword-arguments (package-arguments texinfo)

View file

@ -152,7 +152,7 @@ (define-public wxwidgets-2
#t)))))))
(define-public wxwidgets-gtk2
(package (inherit wxwidgets)
(package/inherit wxwidgets
(inputs `(("gtk+" ,gtk+-2)
,@(alist-delete
"gtk+"
@ -183,7 +183,7 @@ (define-public wxwidgets-3.1
`(cons "--enable-mediactrl" ,flags))))))
(define-public wxwidgets-gtk2-3.1
(package (inherit wxwidgets-3.1)
(package/inherit wxwidgets-3.1
(inputs `(("gtk+" ,gtk+-2)
,@(alist-delete
"gtk+"

View file

@ -1193,8 +1193,7 @@ (define-public xmlsec
"See 'COPYING' in the distribution."))))
(define-public xmlsec-nss
(package
(inherit xmlsec)
(package/inherit xmlsec
(name "xmlsec-nss")
(native-inputs
;; For tests.

View file

@ -6479,8 +6479,7 @@ (define-public uim
license:bsd-3))))
(define-public uim-gtk
(package
(inherit uim)
(package/inherit uim
(name "uim-gtk")
(inputs
`(("gtk" ,gtk+)
@ -6489,8 +6488,7 @@ (define-public uim-gtk
(synopsis "Multilingual input method framework (GTK+ support)")))
(define-public uim-qt
(package
(inherit uim)
(package/inherit uim
(name "uim-qt")
(inputs
`(("qt" ,qtbase)

View file

@ -98,8 +98,7 @@ (define (transform p)
;; Otherwise build the new package object graph.
((eq? (package-build-system p) python-build-system)
(package
(inherit p)
(package/inherit p
(location (package-location p))
(name (let ((name (package-name p)))
(string-append new-prefix
@ -131,8 +130,7 @@ (define package-with-python2
(define (strip-python2-variant p)
"Remove the 'python2-variant' property from P."
(package
(inherit p)
(package/inherit p
(properties (alist-delete 'python2-variant (package-properties p)))))
(define* (lower name