From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 wNecL53CPWPsAQEAbAwnHQ (envelope-from ) for ; Wed, 05 Oct 2022 19:45:01 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id MFm7Lp3CPWPOSwAAG6o9tA (envelope-from ) for ; Wed, 05 Oct 2022 19:45:01 +0200 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 8815BF2F2 for ; Wed, 5 Oct 2022 19:45:01 +0200 (CEST) Received: from localhost ([::1]:48672 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1og8S4-0008W9-OX for larch@yhetil.org; Wed, 05 Oct 2022 13:45:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34204) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1og8QA-0006ja-FH for guix-patches@gnu.org; Wed, 05 Oct 2022 13:43:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58898) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1og8QA-0005EM-6x for guix-patches@gnu.org; Wed, 05 Oct 2022 13:43:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1og8QA-0006w0-2k for guix-patches@gnu.org; Wed, 05 Oct 2022 13:43:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58310] [PATCH 04/14] gnu: Add python-hatchling-bootstrap. References: <87h70iqji2.fsf@disroot.org> In-Reply-To: <87h70iqji2.fsf@disroot.org> Resent-From: Garek Dyszel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 05 Oct 2022 17:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58310 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58310@debbugs.gnu.org Received: via spool by 58310-submit@debbugs.gnu.org id=B58310.166499173026583 (code B ref 58310); Wed, 05 Oct 2022 17:43:02 +0000 Received: (at 58310) by debbugs.gnu.org; 5 Oct 2022 17:42:10 +0000 Received: from localhost ([127.0.0.1]:57976 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1og8PK-0006uh-B8 for submit@debbugs.gnu.org; Wed, 05 Oct 2022 13:42:10 -0400 Received: from knopi.disroot.org ([178.21.23.139]:56998) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1og8PI-0006uY-4h for 58310@debbugs.gnu.org; Wed, 05 Oct 2022 13:42:08 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 8D5644C4A1 for <58310@debbugs.gnu.org>; Wed, 5 Oct 2022 19:42:07 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with UTF8SMTP id cGZRVsBeWMTn for <58310@debbugs.gnu.org>; Wed, 5 Oct 2022 19:42:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1664991722; bh=0tzVFOJActm9IlanJ/hCGQV/c1FXBsbR+SvyRuEQM9M=; h=From:To:Subject:Date; b=g98p2Y0RR8QtQqwPVe0DosFct+1GCbW7++/4OqhBfORjMY9ZICQkKke1aqkTvWBVS +tc1p2rmMYgR5kIJm2PYafyb4mD6pYTAI6FbSvz1iiGn96CmRTJWWOx8zvELDKM0ie ZgyB0w3F+f26St2GJCZgXoXV9DVC9nb1StdMSIGQJKkOTB62VR/p4YZAJw1CzcPOzN wPuhnoN9yinlcUzdaesZrwp4yBggZQOU9xJ1rwpGqge6yC1eS5L3f7VhpoJa0M+stE MQpcRjzdOb356Vx+r3P6ikFzhWlixgcGORdG1ZllwhvEFH3Ci1ddc3cLjo2DuNSM3U JfegaxtUvlfAA== Date: Wed, 05 Oct 2022 13:41:58 -0400 Message-ID: <87czb6qiah.fsf@disroot.org> 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: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: Garek Dyszel X-ACL-Warn: , Garek Dyszel via Guix-patches From: Garek Dyszel via Guix-patches via X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1664991901; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=fnN/sJtEFkj+KiMRvL7I52RmrEQakqQ11VHDYGLKBug=; b=NdwwtsC/TqPNVifqlch9J0r3YptHbgxGKM97hLOiC1kcs81ebuwzZmEREz3Yker+9Qyr79 m4gJ8ZGWDNp0zrdDXcWMdiwJYUxhWZQL+sTMIHMfwu198Hz41ghq9qoTGbZOmPaRtYdPs1 eF9g+rdfFWp0KE7jNvsKnDJRMVOU26IOVMcRC61XmMlPhHbnALBlxs+a4+O9h3jxdPmeFs 5OmvY9fX93hO6Wcrx/5UNgFjsLFhhkBdGzuY3+X7dKuUfC/OFchlbza6xWxb4L/yTUcT2E giicyM5siV4smhSjtFqsJ/eQO+E6CYR+d5L+vVCe2soBjFmYcLxZy/m6xSkLwQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1664991901; a=rsa-sha256; cv=none; b=eLmsSPLTvfdpqIb5PaFUNJOagbdHj6hpIVyznJ/lJHAz8mqC+XJsnLl7JRa2fB4/Yk6EPA ukBKP7gzfEto/ZjWLrJBMD6O1xrhoWeRfaeAO666kNPs1yTcqGDdjeORweEseGR143hnsY +7A1ToyZbqhcy+nt4LB68O6rF69gTdIZExRhdre9jW3cAh7wICVoJwKQlUj4e0lf77dIHx oF4dB0xLMLp6r68VVRAGoO3f5lF97nbntNwN6T/1AXn+vnfqlN4lXE7t2P888Uz6SmOfsm rbsGLnlvf5QhDOQYJL+j/RSfAWpScY3zJisbH+WobdIHYYPpSIeuqvj86DKozQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=disroot.org header.s=mail header.b=g98p2Y0R; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.86 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=disroot.org header.s=mail header.b=g98p2Y0R; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 8815BF2F2 X-Spam-Score: -2.86 X-Migadu-Scanner: scn1.migadu.com X-TUID: aGfg1zrpXWPZ * gnu/packages/python-build.scm (python-hatchling-bootstrap): New variable. --- gnu/packages/python-build.scm | 63 +++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/gnu/packages/python-build.scm b/gnu/packages/python-build.scm index e17cde16d9..f90d23874f 100644 --- a/gnu/packages/python-build.scm +++ b/gnu/packages/python-build.scm @@ -516,3 +516,66 @@ (define-public python-editables ``editable mode''. In other words, changes to the package source will be reflected in the package visible to Python, without needing a reinstall.") (license license:expat))) + +;; This depends on packages in python-xyz.scm: +;; python-version, python-importlib-metadata, python-pathspec, +;; python-pluggy-1.0, and python-platformdirs. +(define-public python-hatchling-bootstrap + (package + (name "python-hatchling-bootstrap") + (version "1.10.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/pypa/hatch") + (commit (string-append "hatchling-v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + ;;"1q25kqw71g8mjwfjz9ph0iigdqa26zzxgmqm0v0bp0z1j8rcl237" + "1yqkwck2aihfdm9ljv5q4nygmmqyp35xwyp8lqn2f4vq9p6njq3c")))) + ;; python-pypa-build needed for bootstrapping. + ;; Otherwise we get a circular reference: + ;; python-hatchling trying to build itself, without + ;; first having hatchling installed. + (inputs (list python-pypa-build + python-editables + python-importlib-metadata + python-version + python-packaging-next + python-pathspec + python-pluggy-1.0 ;TODO: Not detected by pytest? + python-tomli + python-platformdirs)) + (build-system python-build-system) + (arguments + `( ;Tests depend on module python-hatch, which this + ;; is bootstrapping. + #:tests? #f + #:phases (modify-phases %standard-phases + (replace 'build + (lambda _ + (chdir "backend") + ;; ZIP does not support timestamps before 1980. + (setenv "SOURCE_DATE_EPOCH" "315532800") + (invoke "python" + "-m" + "build" + "--wheel" + "--no-isolation" + "."))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((whl (car (find-files "dist" "\\.whl$")))) + (invoke "pip" + "--no-cache-dir" + "--no-input" + "install" + "--no-deps" + "--prefix" + (assoc-ref %outputs "out") + whl))))))) + (home-page "https://ofek.dev/projects/hatch/") + (synopsis "Bootstrap binaries to build @code{python-hatch}") + (description "Bootstrap binaries to build @code{python-hatch}") + (license license:expat))) -- 2.37.3