From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 8HtRKa3pll+qfwAA0tVLHw (envelope-from ) for ; Mon, 26 Oct 2020 15:22:21 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id OGxAJa3pll8jbgAA1q6Kng (envelope-from ) for ; Mon, 26 Oct 2020 15:22:21 +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 EFF909402A5 for ; Mon, 26 Oct 2020 15:22:20 +0000 (UTC) Received: from localhost ([::1]:60218 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kX4KB-0005mA-NB for larch@yhetil.org; Mon, 26 Oct 2020 11:22:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38226) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kX4K2-0005m0-9c for guix-devel@gnu.org; Mon, 26 Oct 2020 11:22:10 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]:53996) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kX4K0-000788-Az for guix-devel@gnu.org; Mon, 26 Oct 2020 11:22:09 -0400 Received: by mail-wm1-x336.google.com with SMTP id d78so12055113wmd.3 for ; Mon, 26 Oct 2020 08:22:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:in-reply-to:references:date:message-id:mime-version :content-transfer-encoding; bh=C9eB8AycJ0sbE414/LytByIGu1eviRMBByleoLwd6+Y=; b=WBA+pYLvn/MwzSRjRVinRz6YvIoFA7StlIjeEVrNO/EabrGKUH53EbC6ZMgwswa5xJ h6oiYu2EGfeG36my6Ov1n0fnFxRwBnYNe8OnUS1LvmK4EvcyzPmXukWx9jr2INJZ9/yc H/9FPBG/9Vicc86BiV8WaMRInFEvGaVAVCG8h5LBOqp68vlW4gXk63vem463CKbAyEbE 4jSMHBcJPxDeWtFxa0/3PN7XslsxaLoa4HRBjIVK354ri5G5Lgw4l6/y74DwMqmnmu8Z GtzImRQB7sMFLb+qC5QOlU2jace1cg2MlSsNxPE/hre3PqM4G+cYjy+hHr+G3Yco8Csn yAbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=C9eB8AycJ0sbE414/LytByIGu1eviRMBByleoLwd6+Y=; b=rt1mQc6MK5/Pp75aKrrKAHQ9TqbA8IX+PUOG3bJ8gRx6BdH1dvxH227kdGPzN11isN 1qVyzRkN9Uqwf24AZh2cwt1yjDWSoOVZXXw6+gFbhhIpfOlAmAiamzpZ0MySfaUgCzbo T2N2NAHh8gsUBIxAFYYuuELQGsSXW1Jy7svmgcXDW4mupEPMwZvlwXHfPn6iBW+Y5XUM lxb4cSYdkufC4Igcg8AyLWDRHhdl3sN0sBI91szlPRxlQTOFK5wNpL++teqSidGkyMgZ vYgqOLBKlj2FVmkHtPb698hNSxM6KcdbIw3P48g2e4J7MPjBYQc06A4JD5VvAkKq4Fpc Q80A== X-Gm-Message-State: AOAM530tWYxwvI1AphrHDY/vVZTW9LdcBJ/7knT3e3IvOSj3TgUgvwxl ptv2KbHdk+zlkpbFudccHMGsFvGd+q8= X-Google-Smtp-Source: ABdhPJwFV6SprTBXWw96MSdCnHxW8+KWuL+V+CAN6rGed5+xhI1dUMEkCv/BePCIamSTL53/nSvMjA== X-Received: by 2002:a1c:3243:: with SMTP id y64mr16457974wmy.175.1603725726487; Mon, 26 Oct 2020 08:22:06 -0700 (PDT) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id 4sm24274278wrn.48.2020.10.26.08.22.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Oct 2020 08:22:06 -0700 (PDT) From: zimoun To: Malte Frank Gerdes , guix-devel@gnu.org Subject: Re: usage of pypi-uri in the pypi importer In-Reply-To: <86r1pwu0ff.fsf@gmail.com> References: <86r1pwu0ff.fsf@gmail.com> Date: Mon, 26 Oct 2020 16:22:03 +0100 Message-ID: <861rhl57xg.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=zimon.toutoune@gmail.com; helo=mail-wm1-x336.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list 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+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=WBA+pYLv; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Spam-Score: -1.71 X-TUID: W/CXb1sNGVy4 Dear, On Sat, 17 Oct 2020 at 21:17, Malte Frank Gerdes = wrote: > i noticed that the python pypi importer generates packages definitions > which rely on the pypi-uri function declared in the python build > system. I observed that the python build system itself doesn't use this > function at all, so why is it defined there and not in the python > importer, which seems to be the only piece of software using it? Because, =E2=80=9Cpypi-uri=E2=80=9D is used by *a lot* of Python packages = =E2=80=93 packages using =E2=80=99python-build-system=E2=80=99. For example, gnu/packages/python-science.scm: --8<---------------cut here---------------start------------->8--- [..] #:use-module (guix build-system python)) (define-public python-scipy (package (name "python-scipy") (version "1.3.2") (source (origin (method url-fetch) (uri (pypi-uri "scipy" version)) (sha256 (base32 "192d8dsybvhv19igkrsafbdafx198nz7pibkjgrqjhlr66s3jfd0")))) (build-system python-build-system) [..]=20=20=20=20 --8<---------------cut here---------------end--------------->8--- In what you are proposing, if I read correctly, the gnu/packages/python-science.scm should have to also import =E2=80=99(guix i= mport pypi)=E2=80=99. > Also: I tried to package pyinstrument-cext and noticed that the importer > generated function isn't able to find the source package - only > 404's. The importer uses PyPI's json API to get information about a > given package (this includes it's url - called source-url), so is the > pypi-uri function needed at all? the necessary information is available > even without it. Or are there any specific reasons why things are as > they are? I am not sure to understand. Using Guix 353bdae, I get: --8<---------------cut here---------------start------------->8--- $ guix import pypi pyinstrument-cext Starting download of /tmp/guix-file.5tmgen >From https://files.pythonhosted.org/packages/b6/95/0a391322dd7f2f97f5533736= 59a787b7428dfe15fc2a8e01844c8768f45e/pyinstrument_cext-0.2.2.tar.gz... =E2=80=A6xt-0.2.2.tar.gz 5KiB 704KiB/s 00:00 [#############= #####] 100.0% Starting download of /tmp/guix-file.cZDsRo >From https://files.pythonhosted.org/packages/13/2e/d548d3727aa3c5b77eb79f66= 7e7212de1acf93087ddce5274887abbe217d/pyinstrument_cext-0.2.2-cp27-cp27m-mac= osx_10_6_intel.whl... =E2=80=A6-cp27m-macosx_10_6_intel.whl 7KiB 679KiB/s 00:00 [#############= #####] 100.0% (package (name "python-pyinstrument-cext") (version "0.2.2") (source (origin (method url-fetch) (uri (pypi-uri "pyinstrument-cext" version)) (sha256 (base32 "0nycf7nhx2xzba49m8208agx5xghzxkma3iim5f43h3l3pvjb7pj")))) (build-system python-build-system) (home-page "https://github.com/joerick/pyinstrument_cext") (synopsis "A CPython extension supporting pyinstrument") (description "A CPython extension supporting pyinstrument") (license #f)) --8<---------------cut here---------------end--------------->8--- BTW, =E2=80=99pypi-uri=E2=80=99 eases the management of all the packages co= ming from PyPI. If the URL of PyPI change or is mirrored, it is easy to switch or add the mirror; otherwise one would have to go package by package. Well, if I understand correctly what you mean. All the best, simon