From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id KFFXDFSh8GO8ewAAbAwnHQ (envelope-from ) for ; Sat, 18 Feb 2023 10:58:44 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id gL9eDFSh8GM+eQAA9RJhRA (envelope-from ) for ; Sat, 18 Feb 2023 10:58:44 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 8CE9BA911 for ; Sat, 18 Feb 2023 10:58:43 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=koszko.org header.s=mail header.b=eaVZkmC7; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1676714323; a=rsa-sha256; cv=none; b=JUeltdZxzDzZFCck3uuySPT0Qh4tB5YeGo4xGxDmAxELtDun+D82l6SZ3W1twBCqn5491a MtmF/mcwObkPf9mk6pLda47xB7OzocHtxqaGSrowefDBp2pqlGYbRgGcbNeVBygK+a/IHw AuikFXroOFhZ81wzr28dhLIrZwlJqma9xd1DrUFZ5hzboZHJ/o4DE7wVaJQFjszQ/If+mb D+aZ79r10hzOvlzA3PdjzVJlRhXd1pXfqkY/RbcSKohANC+BMq2Jjql8IDpBjIURBrVKN2 IXsuHRQE489Hy1aVSHTr3iqhjTTd08ErwAznRATXjZ2HVcyf32+UvaCPMVik+Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=koszko.org header.s=mail header.b=eaVZkmC7; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1676714323; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=78vGxfXaEKgtGpwg1zzfBvvzPN9fFxdnDzbpMhdTZpk=; b=OfOt/qG9yPGDDQZQru1dDgbWej/In0vfp+x3BJ29QeND5qsaKwvrworQaM8VIzDY3G3VKJ ZgUml4nax8uM+SjOKEFghp/HvHgIcXzaaSC1WxKamk1hXE62woL03KC+Pb4caX+kQZn3Om 10PHqOLbAY9lMt0yaqSaX6RudSor6RZBfxIVxjKO51Umm78SAcfMitpnbK+OEgxCdvW64K asGguWM/z0ZGkJlSN+sxhVJdBXC4i95hw3mRocSo1eUmEIPbUk9T46yElDBOUwrmoAc+fT XG26v0lqEG99iXtGGiZyXeHgA2lq4zs2t25u5ok06XMlmSpvLF9dpyhyGxfuXQ== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pTJyl-0002c1-9G; Sat, 18 Feb 2023 04:58:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pTJyj-0002bh-EC for help-guix@gnu.org; Sat, 18 Feb 2023 04:58:01 -0500 Received: from koszko.org ([93.95.227.159]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pTJyg-0000jY-Kb for help-guix@gnu.org; Sat, 18 Feb 2023 04:58:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=koszko.org; s=mail; h=Content-Type:MIME-Version:References:In-Reply-To:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=78vGxfXaEKgtGpwg1zzfBvvzPN9fFxdnDzbpMhdTZpk=; b=eaVZkmC7CgDcaz6pN42Pncrgqy QQkglqobLFeuMZhgBzzOILVlVcHAO7ZOnT99LbC64vYJNmtxhfqIsOuQ+dq/MAxjWa7H88AD7NHIH 13FVpkfGglEFVT8stqNoJdNHY6d1jRePdMNOnz1UMnzxCxAzLo7MgFoSTCzgVu1RpsZsvTmml0AKX T4FLAoAGmPNJ0uIj0JOMDD4S6dn4VmwuDmLrvXS2ea12lsk+bKdLehSb73WYuLl2kJnLf5T+BO/fH FNmROoNJjkyivYxd9+KajLMKvTbfGk8flNkANKZdUatH+188CTz981kHfasjVTKKnf3fhr/clcru9 vGWss/u7gQyANKfnq7uNo2x5PQUUyqJLH5n85nBJkJntDMIm8Lc6/oBS4v7wkDvQf0dI4TnHXPgGJ en5Ds7smyVzaE7rxojZhV7pOHN37O32RcAn3MzTx3nkdRqR9kF1yqpAIjG7+B77AO0+5MZH37GzNd 4tgCjApygJiGwrEAOJARgwaT57bZt17tzlBmMZ/FrXz1Z3IFyaM+HHPk1qkcUPElWx8pBEq1dx7Q0 ctKLXr5pysTvCtqLrD7ywa41Pq5j7QwCG/91RcQas3Jo3QPYI/YYrgcbPjbGv2jXnXdaNzwAdpic4 K7UHNwM+81ktrtVT1msoV3x1rt1OZzcqdfYS/5Qkc=; Received: from [77.252.47.237] (helo=koszkonutek-tmp.pl.eu.org) by koszko.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pTJyK-00072C-36; Sat, 18 Feb 2023 10:57:36 +0100 Date: Sat, 18 Feb 2023 10:57:34 +0100 To: Kyle Andrews Cc: help-guix@gnu.org Subject: Re: Using an alternative python to build python modules Message-ID: <20230218105734.61c02d5e.koszko@koszko.org> In-Reply-To: <87ttzkose5.fsf@posteo.net> References: <87ttzkose5.fsf@posteo.net> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/bbf3k52StXiPxI6rVAsVEJe"; protocol="application/pgp-signature"; micalg=pgp-sha256 Received-SPF: pass client-ip=93.95.227.159; envelope-from=koszko@koszko.org; helo=koszko.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Migadu-Queue-Id: 8CE9BA911 X-Spam-Score: -5.03 X-Migadu-Spam-Score: -5.03 X-Migadu-Scanner: scn0.migadu.com Reply-to: Wojtek Kosior From: Wojtek Kosior via Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-TUID: nZLGGUn6fGEj --Sig_/bbf3k52StXiPxI6rVAsVEJe Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Kyle, Have you looked at the (package-input-rewriting) procedure described towards the bottom of "Defining Package Variants"[1]? You might also like to look at the not-exported (package-with-explicit-python) proc defined in guix/build-system/python.scm[2]. It is used to produce python2 variants of packages but I suppose it would also work for swapping the minor versions of python3. Good luck with your task :) Wojtek [1] https://guix.gnu.org/manual/en/html_node/Defining-Package-Variants.html [2] https://git.savannah.gnu.org/cgit/guix.git/tree/guix/build-system/pytho= n.scm?id=3Db544f460989a6189af111bb3ff6752cabdf23abc#n82 -- (sig_start) website: https://koszko.org/koszko.html PGP: https://koszko.org/key.gpg fingerprint: E972 7060 E3C5 637C 8A4F 4B42 4BC5 221C 5A79 FD1A =E2=99=A5 R29kIGlzIHRoZXJlIGFuZCBsb3ZlcyBtZQ=3D=3D | =C3=B7 c2luIHNlcGFyYXR= lZCBtZSBmcm9tIEhpbQ=3D=3D =E2=9C=9D YnV0IEplc3VzIGRpZWQgdG8gc2F2ZSBtZQ=3D=3D | ? U2hhbGwgSSBiZWNvbWUg= SGlzIGZyaWVuZD8=3D -- (sig_end) On Fri, 17 Feb 2023 21:27:39 +0000 Kyle Andrews wrote: > Dear Guix, >=20 > I want to use the python-apted package in my manifest. That package is > not in Guix, but can readily be fetched from: >=20 > ``` > guix import pypi APTED > python-apted.scm > ``` >=20 > I just had to prefix the following modules to turn that into a package > definition as well as a manifest. >=20 > ``` > (use-modules (guix packages) > (guix download) > (guix licenses) > (guix profiles) > (gnu packages) > (guix build-system python)) > ``` >=20 > During my original testing of my scientific workflow I discovered that > there was a bug introduced to the APTED package which was caused by a > change in how python worked under the hood. As a result, the APTED > package only advertises compatibility with python versions less than > 3.7. So, I would like to use python 3.6 to be on the safe side. >=20 > I also want to include 60+ other packages in my manifest which are > "current" with the Guix repository and included within it. For > situations like this it would be really convenient if it were possible > to pass a version of python to python-build-system. Then, I hope all I > would have to do is pass another another defined variant of the python > package (e.g. called python-3.6) into that build-system argument. >=20 > For example: >=20 > ``` > (build-system python-build-system #:python python-3.6) > ``` >=20 > That would be quite convenient and in line with the level of complexity > I was faced with when I took the conda approach before trying to use > Guix. Unfortunately, this functionality doesn't seem to be provided out > of box and I am seeking help in the hopes that there is an easy way to > do it. >=20 > Am I thinking about this right? >=20 > Thanks, > Kyle >=20 > P.S. >=20 > APTED claims to also be able to run on top of python-2.7 so maybe that > fact could be used to simplify this specific issue. I just wanted to > discuss the general problem first because I really want Guix to gain > broad traction within the scientific community. >=20 > P.P.S. >=20 > Here is a pretend manifest where I would love guidance on how to make > python-apted get built in the context of python-2.7 or ideally > python-3.6 even though the latest version of python is python-3.9 (where > APTED doesn't always work). >=20 > ``` > (use-modules (guix packages) > (guix download) > (guix licenses) > (guix profiles) > (gnu packages) > (guix build-system python)) >=20 > (define-public python-apted > (package > (name "python-apted") > (version "1.0.3") > (source (origin > (method url-fetch) > (uri (pypi-uri "apted" version)) > (sha256 > (base32 > "1sawf6s5c64fgnliwy5w5yxliq2fc215m6alisl7yiflwa0m3ymy")))) > (build-system python-build-system) > (arguments '(#:tests? #f)) > (home-page "https://github.com/JoaoFelipe/apted") > (synopsis "APTED algorithm for the Tree Edit Distance") > (description "APTED algorithm for the Tree Edit Distance") > (license expat))) >=20 > (concatenate-manifests > (list (specifications->manifest (list "r" "r-dplyr" "r-reticulate")) > (packages->manifest (list python-apted)))) > ``` >=20 --Sig_/bbf3k52StXiPxI6rVAsVEJe Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQTpcnBg48VjfIpPS0JLxSIcWnn9GgUCY/ChDgAKCRBLxSIcWnn9 Glq3AQD3GkvEeo0gbXD96V6v7tVVkMk9VQGY+pAPckg8mzSv5gD9FzFgFTXooOeN pIweGwVrHjKJ40uX175m7MhiVSEGDw4= =ecBc -----END PGP SIGNATURE----- --Sig_/bbf3k52StXiPxI6rVAsVEJe--