From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id xnllLhqq81+APQAA0tVLHw (envelope-from ) for ; Mon, 04 Jan 2021 23:51:54 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id oHDZKRqq81/7fQAAbx9fmQ (envelope-from ) for ; Mon, 04 Jan 2021 23:51:54 +0000 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 40723940149 for ; Mon, 4 Jan 2021 23:51:53 +0000 (UTC) Received: from localhost ([::1]:39460 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kwZdf-0004qx-VZ for larch@yhetil.org; Mon, 04 Jan 2021 18:51:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42226) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kwZdT-0004qg-Vi for help-guix@gnu.org; Mon, 04 Jan 2021 18:51:39 -0500 Received: from mira.cbaines.net ([2a01:7e00:e000:2f8:fd4d:b5c7:13fb:3d27]:59031) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kwZdN-0000oQ-My for help-guix@gnu.org; Mon, 04 Jan 2021 18:51:39 -0500 Received: from localhost (188.28.108.198.threembb.co.uk [188.28.108.198]) by mira.cbaines.net (Postfix) with ESMTPSA id B23B627BC0B; Mon, 4 Jan 2021 23:51:31 +0000 (GMT) Received: from capella (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 1e376ed6; Mon, 4 Jan 2021 23:51:29 +0000 (UTC) References: <85lfd8qnuv.fsf@beadling.co.uk> User-agent: mu4e 1.4.13; emacs 27.1 From: Christopher Baines To: Phil Subject: Re: No Explicit Python Version Dependency In Package Definitions? In-reply-to: <85lfd8qnuv.fsf@beadling.co.uk> Date: Mon, 04 Jan 2021 23:51:26 +0000 Message-ID: <87h7nwjm69.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=2a01:7e00:e000:2f8:fd4d:b5c7:13fb:3d27; envelope-from=mail@cbaines.net; helo=mira.cbaines.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: help-guix@gnu.org Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -3.43 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Queue-Id: 40723940149 X-Spam-Score: -3.43 X-Migadu-Scanner: scn0.migadu.com X-TUID: cW6bX4WJBOMN --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Phil writes: > Hi, > > It seems standard not to declare python2 or python3 as a dependency on > python package definitions - however other dependent python libraries are= stated. > > eg python-scipy will declare dependencies on python-numpy and > python-matplotlib - but not on a specific version of python package > required to use it. > > I'm guessing this is to avoid tying packages to specific python > releases, but I'm curious about the mechanics. Build systems are a mechanic to deduplicate common steps, but also common inputs between packages, and the python-build-system will include a default Python as an input. https://git.savannah.gnu.org/cgit/guix.git/tree/guix/build-system/python.sc= m#n138 > It looks like 'package-with-python2' might be used to allow us to > distinguish between python2 and python3, but ignoring the python2 case, > I have the following python3 questions: > > Can we can install python-scipy without installing python3, given python > isn't an explicit dependency in the package? Guix packages don't have dependencies like other package managers, there's propagated-inputs which can act like dependencies where Guix will attempt to add propagated inputs to the profile when you install a package. But generally "dependencies" as in other things you should have when you have a given store item, are just references between store items: =E2=86=92 guix gc --references /gnu/store/jj1915czcy6wlf6riajapl1j6dfgwwii-= python-scipy-1.3.2 /gnu/store/01b4w3m6mp55y531kyi1g8shh722kwqm-gcc-7.5.0-lib /gnu/store/741057r2x06zwg6zcmqmdyv51spm6n9i-gfortran-7.5.0-lib /gnu/store/bs9pl1f805ins80xaf4s3n35a0x2lyq3-openblas-0.3.9 /gnu/store/fa6wj5bxkj5ll1d7292a70knmyl7a0cr-glibc-2.31 /gnu/store/h8jw9qhyfp6fm6nb3cgh4335qhr31wfz-python-wrapper-3.8.2 /gnu/store/jj1915czcy6wlf6riajapl1j6dfgwwii-python-scipy-1.3.2 /gnu/store/jxx8fr78jrcvpid5aplmkplbm1dk6czs-python-3.8.2 =E2=86=92 grep -r jxx8fr78jrcvpid5aplmkplbm1dk6czs /gnu/store/jj1915czcy6wl= f6riajapl1j6dfgwwii-python-scipy-1.3.2 Binary file /gnu/store/jj1915czcy6wlf6riajapl1j6dfgwwii-python-scipy-1.3.2/= lib/python3.8/site-packages/scipy/optimize/_zeros.cpython-38-x86_64-linux-g= nu.so matches ... So, you can't have this particular python-scipy output in your store without python as well, as it's referenced by some shared libraries, which I guess makes sense. > Which site-packages directory under what python3 version will be used? > A quick check looks that /path/to/profile/lib/python3.8/site-packages is > currently used but what makes the decision to put them under python3.8 - > especially if python3.8 isn't installed in the profile? The python build system takes care of where files end up in the package outputs at least: https://git.savannah.gnu.org/cgit/guix.git/tree/guix/build/python-build-sys= tem.scm#n38 > What happens if Guix upgrades python3 from 3.8 -> 3.9? How are packages > already installed under the 3.8, moved to the new 3.9 python version, is = this seamless? When the default python version is changed, the build system will change accordingly. > If I'm using Guix on top of a foreign distro and don't have python3 > installed as part of Guix, will my python-scipy end-up installed for my > foreign distro's python install? Installing Guix things is just ensuring things are in the /gnu/store, plus maybe some environment variables for the profile. So it won't end up where your (not Guix) distro installs Python things at least. Hope that helps! Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl/zqf5fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh aW5lcy5uZXQACgkQXiijOwuE9XcTvw//Uc869SjBgOwpcL8e/rgJ7ko41eraDusj 2CDac+DLXkXPxwjSQscBnzGSHYK2tgOOt0mfXNyX3k8zUjvEknmprRI8JTlFv+oT QBgsLNbmVbDBDBgTHgajSihgcDQldin1G6sIWBz+sXjY0cz+mky5NTww2ph7XpR3 tNohJWorpMbaZFTCSPEBUPVGNMvsVEDqDOZv+0hKyE69AjOYl96zQIfQXGBL5mFS h8nZ36Q2QQCHO+BtymDwuVdQzvtr64v0aVLY8ISEH0oz/sTjf+8GyEzzbub7Us8T hl3oTrfPszV0vdkoQXpjZm8qIxJHoXTDyC6DV37j7CLo3tdwna+XcXtrBFBQ1PMc x7xXtH+rc173jdOaS8PADYn6tEySPeT2yRJxa+ETTkj15Tl6PdDFzp6vmmb3PFtF +iBOMtgEbKEdIlMLs30q2AupUOxNcoYAqJeM+m1mTt/0yzIA3ySCK76HwyX3YGEU Ks4eG6vlwfqJNats1G7WiycoyASZn9EaqLGhPXFcEckfELNgyFVPaNxh9Ub0h3Ey ui1p5MIIQbD4pk7cgYNdQg58Iz2XU1ZGdcgqnIJuMdlay7OF/bln6KouZ5XSLGeS kCCA8gzovTIPql9gvCBzJ9XfDBEzPXFYL1JQrYPmhNVVaZ8wGXgsxYwRiMdcPSwZ Mx2r488nBXw= =icmR -----END PGP SIGNATURE----- --=-=-=--