From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 8j23N4vVDmDJeAAA0tVLHw (envelope-from ) for ; Mon, 25 Jan 2021 14:28:27 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id eDAQM4vVDmDyfwAAB5/wlQ (envelope-from ) for ; Mon, 25 Jan 2021 14:28:27 +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 70878940480 for ; Mon, 25 Jan 2021 14:28:27 +0000 (UTC) Received: from localhost ([::1]:35168 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l42qw-0005uO-9P for larch@yhetil.org; Mon, 25 Jan 2021 09:28:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37192) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l42qY-0005sc-TB for guix-patches@gnu.org; Mon, 25 Jan 2021 09:28:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:55020) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l42qY-0002kt-92 for guix-patches@gnu.org; Mon, 25 Jan 2021 09:28:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l42qY-0003H0-5E for guix-patches@gnu.org; Mon, 25 Jan 2021 09:28:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#45931] [PATCH] gnu: Add python-build. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 25 Jan 2021 14:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45931 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Tanguy Le Carrour Received: via spool by 45931-submit@debbugs.gnu.org id=B45931.161158486212552 (code B ref 45931); Mon, 25 Jan 2021 14:28:02 +0000 Received: (at 45931) by debbugs.gnu.org; 25 Jan 2021 14:27:42 +0000 Received: from localhost ([127.0.0.1]:38333 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l42qE-0003GN-AZ for submit@debbugs.gnu.org; Mon, 25 Jan 2021 09:27:42 -0500 Received: from mail-qv1-f52.google.com ([209.85.219.52]:36144) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l42qC-0003G7-Eo for 45931@debbugs.gnu.org; Mon, 25 Jan 2021 09:27:41 -0500 Received: by mail-qv1-f52.google.com with SMTP id es14so2416706qvb.3 for <45931@debbugs.gnu.org>; Mon, 25 Jan 2021 06:27:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=XlB4+bB5ZAbBb6JQA81LPqxLB2xI7iJ/9VaiIS5QW+4=; b=WShbBSB7zWJi6Sh5x+C5k5tJWk0Imrsl6e5E70zStx9woxWQgUuvmCMQRGk+z5euMp cPTVNVGOU+GuRrwq+MWXoIihCpQUaQ/hG5GV/ITf+zdyCaCE4EWefq8UVH4qeMo/hrh6 mYJbfKyuH53Z/TaEWVoJFbvpJoh09TnXWxzpzGL29zgIJPrU/0YZGfAlA5ApZ088GIcY 4oFzA8EivixWtVas1SOJfIVCgfGiD0aWFW97c2IN2k+kt/sED7vZZatQXGV7/bvOX7Ff ME4fr4OcldupRylLJ11R/GaLln3k/fCcgmmOeryXmH2UlGFrSfKUDfEE0rYfSwj3TBys 6/Bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=XlB4+bB5ZAbBb6JQA81LPqxLB2xI7iJ/9VaiIS5QW+4=; b=lxXNI9KcT+zfY2/6kmTWp1bnco5r7MJLYBC99f6ZpDddNLfgLo4N1CHwDscOGOfZag iVecgWERQHI7YrzIoYUja2B3HUXBiFJyr/jbdJIjWKc5y4cgJgyinfWcdKpSpgqB3VES 31V67XROGgauMtp1rGp9EoPIvyero8em0A1ONR3deK0TLGYRZfFD4UK3kIiY8/cFo9CB 85CsmsHtGgIZ87tQsQOh7SDI3xc8iVF95enMO0gWAmoczCE6BvbdjWE9f1GkB3mW74k5 mul7rJF/7hl+4kIPPz7anLyRwBMKniCoCNjpyzhztreEiJpMaeKNS2TZOrWNrMbBvp3T oPjQ== X-Gm-Message-State: AOAM5329f6pu2Zdl5Em/7tA0pHs1rUtByoRmXsPK416nAa+xYwIPRJ0H wCmkIj7zsKyqOc2yRa20TQiIgZ0kK94= X-Google-Smtp-Source: ABdhPJwFGXeJkrFIoBcAJyoqD7l0mdU18lDZ0hMSrL7JfHgY6l/1o1vqr1f5C4exzY+FVWBo4HsScg== X-Received: by 2002:a0c:aedc:: with SMTP id n28mr949181qvd.21.1611584853961; Mon, 25 Jan 2021 06:27:33 -0800 (PST) Received: from hurd (dsl-10-132-34.b2b2c.ca. [72.10.132.34]) by smtp.gmail.com with ESMTPSA id o20sm11604872qki.93.2021.01.25.06.27.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jan 2021 06:27:33 -0800 (PST) From: Maxim Cournoyer References: <20210117101119.17861-1-tanguy@bioneland.org> Date: Mon, 25 Jan 2021 09:27:32 -0500 In-Reply-To: <20210117101119.17861-1-tanguy@bioneland.org> (Tanguy Le Carrour's message of "Sun, 17 Jan 2021 11:11:19 +0100") Message-ID: <87bldd3xd7.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 45931@debbugs.gnu.org Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.76 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=WShbBSB7; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 70878940480 X-Spam-Score: -1.76 X-Migadu-Scanner: scn0.migadu.com X-TUID: VmgczYr7lBbu Hello Tanguy, Tanguy Le Carrour writes: > * gnu/packages/python-xyz.scm (python-build): New variable. > * gnu/packages/patches/python-build-disable-failing-tests.patch: Add patch. > * gnu/local.mk: Add above patch. > --- > gnu/local.mk | 1 + > .../python-build-disable-failing-tests.patch | 25 +++++++++++ > gnu/packages/python-xyz.scm | 42 +++++++++++++++++++ > 3 files changed, 68 insertions(+) > create mode 100644 gnu/packages/patches/python-build-disable-failing-tests.patch > > diff --git a/gnu/local.mk b/gnu/local.mk > index 77f1d4a096..f0702160c3 100644 > --- a/gnu/local.mk > +++ b/gnu/local.mk > @@ -1526,6 +1526,7 @@ dist_patch_DATA = \ > %D%/packages/patches/python-aionotify-0.2.0-py3.8.patch \ > %D%/packages/patches/python-argcomplete-1.11.1-fish31.patch \ > %D%/packages/patches/python-axolotl-AES-fix.patch \ > + %D%/packages/patches/python-build-disable-failing-tests.patch \ > %D%/packages/patches/python-cross-compile.patch \ > %D%/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch \ > %D%/packages/patches/python-configobj-setuptools.patch \ > diff --git a/gnu/packages/patches/python-build-disable-failing-tests.patch b/gnu/packages/patches/python-build-disable-failing-tests.patch > new file mode 100644 > index 0000000000..499dad2179 > --- /dev/null > +++ b/gnu/packages/patches/python-build-disable-failing-tests.patch > @@ -0,0 +1,25 @@ > +Disable failing tests. > + > +diff --git a/tests/test_env.py b/tests/test_env.py > +index 5f9a710..c941a6c 100644 > +--- a/tests/test_env.py > ++++ b/tests/test_env.py > +@@ -13,6 +13,7 @@ import build.env > + > + > + @pytest.mark.isolated > ++@pytest.mark.skipif(True, reason="This fails for unknown reasons on Guix") > + def test_isolation(): > + subprocess.check_call([sys.executable, '-c', 'import build.env']) > + with build.env.IsolatedEnvBuilder() as env: > +@@ -47,6 +48,7 @@ def test_isolated_environment_install(mocker): > + > + > + @pytest.mark.isolated > ++@pytest.mark.skipif(True, reason="This fails for unknown reasons on Guix") > + def test_create_isolated_build_host_with_no_pip(tmp_path, capfd, mocker): > + mocker.patch.object(build.env, 'pip', None) > + expected = {'pip', 'greenlet', 'readline', 'cffi'} if platform.python_implementation() == 'PyPy' else {'pip'} > +-- > +2.30.0 > + > diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm > index d08e23936c..9a58ba50a2 100644 > --- a/gnu/packages/python-xyz.scm > +++ b/gnu/packages/python-xyz.scm > @@ -3677,6 +3677,48 @@ text styles of documentation.") > software version simply.") > (license license:expat))) > > +(define-public python-build > + (package > + (name "python-build") > + (version "0.1.0") > + (source > + (origin > + (method git-fetch) > + (uri (git-reference > + (url "https://github.com/pypa/build") > + (commit version))) > + (file-name (git-file-name name version)) > + (sha256 > + (base32 > + "0mpciw66y130b704m3zrq4r473jw41b6p3sd1ya9my4v872r2dsw")) > + (patches (search-patches "python-build-disable-failing-tests.patch")))) > + (build-system python-build-system) > + (arguments > + `(#:phases > + (modify-phases %standard-phases > + (replace 'check > + (lambda _ > + (setenv "PYTHONPATH" > + (string-append > + (getcwd) "/src/" > + ":" (getenv "PYTHONPATH"))) > + (invoke "python" "-m" "pytest" "tests/")))))) > + (propagated-inputs > + `(("python-packaging" ,python-packaging) > + ("python-pep517" ,python-pep517) > + ("python-toml" ,python-toml))) > + (native-inputs > + `(("python-filelock" ,python-filelock) > + ("python-pytest" ,python-pytest) > + ("python-pytest-mock" ,python-pytest-mock))) > + (home-page "https://github.com/pypa/build") > + (synopsis "Simple and correct PEP517 package builder") > + (description > + "Build will invoke the PEP 517 hooks to build a distribution package. > +It is a simple build tool and does not perform any dependency management.") > + ;; MIT license > + (license license:expat))) > + > (define-public python-deprecated > (package > (name "python-deprecated") > -- > 2.30.0 This package was added to the core-updates branch on Jan 15 by myself; I needed it to bump python-isort to a newer version after moving to Python 3.9.1. I've named it 'python-pypa-build' and put it under a new module, (gnu packages python-build). This module is special in that it's probably going to get pulled by (guix build python-build-system) at some point, so should be considered a 'build' module and not pull external modules if possible. If you need it on master we could try cherry picking a few commits from core-updates, I think. Thank you! Maxim