From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: Question about (properties `((python2-variant . , (delay XXX)))) and name resolution Date: Wed, 20 Jul 2016 12:15:34 +0200 Message-ID: References: <20160719194754.254cf411@scratchpost.org> <20160720035823.GB21435@jasmine> <20160720092637.5813b122@scratchpost.org> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41311) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPoXb-0004RX-Bb for guix-devel@gnu.org; Wed, 20 Jul 2016 06:15:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bPoXV-0008UG-AL for guix-devel@gnu.org; Wed, 20 Jul 2016 06:15:46 -0400 Received: from sinope02.bbbm.mdc-berlin.de ([141.80.25.24]:58631) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPoXU-0008U2-Mc for guix-devel@gnu.org; Wed, 20 Jul 2016 06:15:40 -0400 In-Reply-To: <20160720092637.5813b122@scratchpost.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Danny Milosavljevic Cc: guix-devel@gnu.org Danny Milosavljevic writes: > Hi Leo, > > On Tue, 19 Jul 2016 23:58:23 -0400 > Leo Famulari wrote: > >> In this case, it looks like the Python 2 variant of the package is the >> same as the Python 3 variant, aside from the Python version. So, you >> should be able to drop the (properties `((python2-variant ...) line fr= om >> the python-ptpython package. > > I tried that, but I still can't do > > $ guix package -i ptpython-2 > > because: > > guix package: error: ptpython: package not found for version 2 What you wrote there is the old way of asking Guix to install a particular *version* of a package. This has been changed to =E2=80=9C@=E2= =80=9D some time ago. This means that you are asking Guix to install a package named =E2=80=9Cptpython=E2=80=9D with package version =E2=80=9C2=E2=80=9D (not = Python version 2), but no such package exists =E2=80=94 you only defined two variants of a package with = version 0.34. Our policy with Python *modules* is to prefix them with =E2=80=9Cpython-=E2= =80=9D or =E2=80=9Cpython2-=E2=80=9D. When you define the Python 3 variant as =E2=80= =9Cpython-ptpython=E2=80=9D and give it the name =E2=80=9Cpython-ptpython=E2=80=9D then =E2=80=9Cpack= age-with-python2=E2=80=9D will take care of renaming this to =E2=80=9Cpython2-ptpython=E2=80=9D for the = Python 2 variant. (For packages that only provide executables we usually don=E2=80=99t add = the prefix.) > Now, the ptpython executables are still called the same - so you can't > install ptpython and ptpython-2 at the same time. Ah, an executable. If this is not to be used as a library/module does it even make sense to build it with different versions of Python? If all you care about is the executables then having a variant with only the latest version of Python seems sufficient. (We do the same for snakemake, for example.) ~~ Ricardo