On Mon, 01 Feb 2016 23:07:40 +0100 l...@gnu.org (Ludovic Courtès) wrote: > > An idea I haven’t taken the time to test yet would be to use > ‘properties’: > > (define python-foobar ;with Python 3 > (package > (name "foobar") > ;; Specify which Python 2 variant to use. > (properties `((python2-variant . ,(delay python2-foobar)))))) > > (define python2-foobar > (package (inherit python-foobar) > ;; … stuff beyond the mechanical python 2→3 switch… > )) > > ‘package-with-python2’ would honor this ‘python2-variant’ property. > > Thoughts? > > Ludo’.
I like a lot that it should remove the need to propagate the special python2- packages all the way out to the leaf packages. What else could we use this for? minimal/bootstrap versions? "The python people" have said that one day python4 will happen and they don't plan on having it be as much of a break like the python2->python3 change was. package-with-explicit-python is already set up to handle having a main package definition and multiple automated definitions. I prefer when define-public is the start of a package definition, but here's an idea I just had about refactoring out the common parts of python packages. (let* (name "python-foobar") (version "1.2.3") ... (define-public python3-foobar (package-with-python3 python-foobar) (define-public python2-foobar (package (inherit (package-with-python2 python-foobar)) (native-inputs `(("python2-setuptools" ,python2-setuptools)) ,@(package-native-inputs foobar))))) -- Efraim Flashner <efr...@flashner.co.il> אפרים פלשנר GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted
pgp4n4Vz9SgDy.pgp
Description: OpenPGP digital signature