Subject: bug#22808: closed (Close)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 31 Jan 2019 14:41:02 +0000

Your bug report

#22808: Add a function to simplify many of the new python2-foo definitions

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
22808: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22808
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Close
From: Andreas Enge <[email-masked]>
To: [email-masked]
Date: Thu, 31 Jan 2019 15:39:55 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

This seems to be solved using package-with-python2.

Andreas

Subject: Add a function to simplify many of the new python2-foo definitions
From: Christopher Allan Webber <[email-masked]>
To: [email-masked]
Date: Thu, 25 Feb 2016 13:14:25 -0800
List-Id: <debbugs-submit.debbugs.gnu.org>

Right now we have a lot of these that look very similar:

  (define-public python2-chardet
    (package
      (inherit (package-with-python2
                (strip-python2-variant python-chardet)))
      (native-inputs `(("python2-setuptools" ,python2-setuptools)))))

  (define-public python2-translitcodec
    (package
      (inherit (package-with-python2
                (strip-python2-variant python-translitcodec)))
      (native-inputs `(("python2-setuptools" ,python2-setuptools)))))

  (define-public python2-celery
    (let ((celery (package-with-python2
                   (strip-python2-variant python-celery))))
      (package
        (inherit celery)
        (native-inputs `(("python2-setuptools" ,python2-setuptools)
                         ("python2-unittest2" ,python2-unittest2)
                         ("python2-mock" ,python2-mock)
                         ,@(package-native-inputs celery))))))

Time for an abstraction?