From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 4PVBAcjDPWNGJgEAbAwnHQ (envelope-from ) for ; Wed, 05 Oct 2022 19:50:00 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id MKZgAMjDPWPzIgEAG6o9tA (envelope-from ) for ; Wed, 05 Oct 2022 19:50:00 +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 B934923429 for ; Wed, 5 Oct 2022 19:49:59 +0200 (CEST) Received: from localhost ([::1]:48646 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1og8Ws-0001Pl-4y for larch@yhetil.org; Wed, 05 Oct 2022 13:49:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50000) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1og8U3-0001GK-Sq for guix-patches@gnu.org; Wed, 05 Oct 2022 13:47:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58919) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1og8U2-00071Y-H2 for guix-patches@gnu.org; Wed, 05 Oct 2022 13:47:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1og8U2-00073m-8Q for guix-patches@gnu.org; Wed, 05 Oct 2022 13:47:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58310] [PATCH 05/14] gnu: Add python-hatch. 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:47: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.166499197327042 (code B ref 58310); Wed, 05 Oct 2022 17:47:02 +0000 Received: (at 58310) by debbugs.gnu.org; 5 Oct 2022 17:46:13 +0000 Received: from localhost ([127.0.0.1]:57988 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1og8TF-000725-5D for submit@debbugs.gnu.org; Wed, 05 Oct 2022 13:46:13 -0400 Received: from knopi.disroot.org ([178.21.23.139]:52774) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1og8TD-00071x-Ok for 58310@debbugs.gnu.org; Wed, 05 Oct 2022 13:46:12 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 3AD6B4C694 for <58310@debbugs.gnu.org>; Wed, 5 Oct 2022 19:46:10 +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 ESMTP id sCXhUSA7hFXA for <58310@debbugs.gnu.org>; Wed, 5 Oct 2022 19:46:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1664991968; bh=iJDhqJkvmPn06e89JBywFr3PcF4FuzWZRHg2R1dr7eo=; h=From:To:Subject:Date; b=Wlr6T07qp2rh8JG4IKHZwtJ5vtpCBbPLovRqMcctNmyOPzzHbrl9uBkGGcfTj/n2n dleFW6hV67ydImkGsMKdNF2ywyZPva0YQIZVOLYcRAuqudHx9Iybsz0nz5II2BIj9i nGLolioz0Jnhgoj/in1yfqlkzrbfC40rZrz7UmSdufj1wn8gHdIJmRJJ8R4ODRdJNx OCfSWHFcbwbSCkJT5tp3A7zVRtYNndyJm0x1ohZJ0lCK7PburcHTNkt0b4QwVB3CRk Jjrn/LNzG/atL5ECLXdhdBB/W/iJQcQIpHMxQo5v1vOdMLE3CffVD6TReM73ckR1tu BObjmE1w9K1Vg== Date: Wed, 05 Oct 2022 13:46:04 -0400 Message-ID: <878rluqi3n.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=1664992199; 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=/BKq75xrrPe3Boo45YJa5yo/fIzB6RGJWbey7vmSuh0=; b=nE6SVZZNiMGK8gfN0ELwWuvYhlR1fOvlDiW+efjD/oH7QctJ3j7sTo4xvH2eogzPvw9d5A VhC8nRRcBZvm/bCHfOlGSL3gwT6UyIUnzGUx/vsJfI6CkpM9sNDvjPKrXdA4oN6BSoAiVn kr3ERlUKj9bFhzGo8eCU+5gG99LushLQGtfaAcevNHN2G6EkaL8RDRT+S9vYVrkA/VuXFm J5bfJy3i5bmtBmgEh78i8VZa7ghquG+Ey5es18pLhbqtoHek6NOE5fJiOnBuHAPc1gLhQp rZPFpmHCmNYV9rs5itBrKcPX4xMkTqBBusXYvEHilMQnk3+ajA9O92Re5eoVeQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1664992199; a=rsa-sha256; cv=none; b=JEKY3U++VvKU5zSF+WZkIv8ygtoFvrMHzNy0r1Oq92jYy3KdxxQ3dOoJV+a5JAY9hkCGsA IFqmSZvh+D30n4nvIOflHnBsEFM+R1uKJd5ugCynVJMf9fMq1hHZhqv3Pjxh2l38dzdEzm UL8NZMnHu7YdE+NvTLRu0TB5EPDbZMcR+2pWMAJx1kC9Cx9jGzV7ntr2Qwt8umPJ3hiZ0Q EPz+FDValDGRNxFF9MBj6x79LoiDGW1BYXGQr+FTXFh0CbB3GK5bDAm5pS0x0z4nFwothB TSAin1a22X7zJA6oaSxCRhPlIMtjpPbNICGyAqd024cqi9Ro0C4Qx3KPDZqEFA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=disroot.org header.s=mail header.b=Wlr6T07q; 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: -3.16 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=disroot.org header.s=mail header.b=Wlr6T07q; 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: B934923429 X-Spam-Score: -3.16 X-Migadu-Scanner: scn0.migadu.com X-TUID: AsbeiMJUIUGp diff --git a/gnu/packages/python-build.scm b/gnu/packages/python-build.scm index f90d23874f..0b8d8a7647 100644 --- a/gnu/packages/python-build.scm +++ b/gnu/packages/python-build.scm @@ -579,3 +579,64 @@ (define-public python-hatchling-bootstrap (synopsis "Bootstrap binaries to build @code{python-hatch}") (description "Bootstrap binaries to build @code{python-hatch}") (license license:expat))) + +(define-public python-hatch + (package + (name "python-hatch") + (version "1.10.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/pypa/hatch") + (commit (string-append "hatch-v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "030yi9hw50mn899pq073lw2a55r57skl2g9agjp3b4l95f3nay30")))) + (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-hatchling-bootstrap + python-tomli + python-platformdirs + python-rich + python-tomli-w)) + (build-system python-build-system) + (arguments + `( ;Tests appear to be written such that the input python-pluggy-1.0 is + ;; not detected. + #:tests? #f + #:phases (modify-phases %standard-phases + (replace 'build + (lambda _ + ;; ZIP does not support timestamps before 1980. + (setenv "SOURCE_DATE_EPOCH" "315532800") + (invoke "hatchling" "build"))) + (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)))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (chdir "tests") + (invoke "pytest" "-vv")))) + ;; Can't have hatch as a requirement of itself. + (delete 'sanity-check)))) + (home-page "https://ofek.dev/projects/hatch/") + (synopsis "Python build system with project generation") + (description + "Python build system with project generation. It also defines a specific +syntax in @code{toml} files to check for dependencies.") + (license license:expat))) -- 2.37.3