From patchwork Wed Sep 7 18:34:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Garek Dyszel X-Patchwork-Id: 42280 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 48ABF27BBE9; Wed, 7 Sep 2022 19:36:16 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 8C54827BBEA for ; Wed, 7 Sep 2022 19:36:15 +0100 (BST) Received: from localhost ([::1]:45540 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oVzuI-0005wp-L8 for patchwork@mira.cbaines.net; Wed, 07 Sep 2022 14:36:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38468) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oVzt9-0005os-38 for guix-patches@gnu.org; Wed, 07 Sep 2022 14:35:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39330) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oVzt8-0005Nx-PZ for guix-patches@gnu.org; Wed, 07 Sep 2022 14:35:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oVzt8-00082m-Ia for guix-patches@gnu.org; Wed, 07 Sep 2022 14:35:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57540] [RFC PATCH v2 10/19] gnu: Add python-hatchling.* gnu/packages/python-xyz.scm (python-hatchling): New variable. References: <79d544f7d8ba64b631a6f0f1d2ef0b08@disroot.org> In-Reply-To: <79d544f7d8ba64b631a6f0f1d2ef0b08@disroot.org> Resent-From: Garek Dyszel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 07 Sep 2022 18:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57540 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57540@debbugs.gnu.org Received: via spool by 57540-submit@debbugs.gnu.org id=B57540.166257564730745 (code B ref 57540); Wed, 07 Sep 2022 18:35:02 +0000 Received: (at 57540) by debbugs.gnu.org; 7 Sep 2022 18:34:07 +0000 Received: from localhost ([127.0.0.1]:56237 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVzsF-0007zo-CC for submit@debbugs.gnu.org; Wed, 07 Sep 2022 14:34:07 -0400 Received: from knopi.disroot.org ([178.21.23.139]:49864) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVzsE-0007zh-54 for 57540@debbugs.gnu.org; Wed, 07 Sep 2022 14:34:06 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 927E040143 for <57540@debbugs.gnu.org>; Wed, 7 Sep 2022 20:34:05 +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 QTWkB2VGviY2 for <57540@debbugs.gnu.org>; Wed, 7 Sep 2022 20:34:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1662575644; bh=Evy0AxQhHJgf8kXgl2AsfFAJqWrr0lQA/T+KV2AbKZg=; h=From:To:Subject:Date; b=cyMCzjBdK/kOhvfbcPlG1495swQoGSBj7VXabZrQ8NDqBuCY3ECv4/p98JG+tBIkV wygfZGgt1/3LQhG4KJ/3xqZeXKIdzn1Y99DhDYI1KBbhu2ycdgXa0g3vIymkIGsILQ vS0rTnS91mOVmqyPQOXz09y81iKI1r5j6Ojdrp0ykTCVDWJWFLDUYf8+jWT3XN3Xum ZSHCQPDIw061oa2wwxU7DQ5Zwu7HTPsTVcL3z7+Imzx+ljKQiISJT8HPC28IzgNAzJ ZaMcVOLVLITzLOU0iamgR3eKf9i1SbaADQzc/5ioMuVTsfmv9CBBV0riBm9moYRZk/ daO9+dj3r5Wbw== Date: Wed, 07 Sep 2022 14:34:01 -0400 Message-ID: <87fsh3vxt2.fsf@disroot.org> Mime-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Garek Dyszel X-ACL-Warn: , Garek Dyszel via Guix-patches X-Patchwork-Original-From: Garek Dyszel via Guix-patches via From: Garek Dyszel X-getmail-retrieved-from-mailbox: Patches * gnu/packages/python-xyz.scm (python-hatchling): New variable. --- gnu/packages/python-xyz.scm | 64 +++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index cc5b85c3a1..8dd8d902a5 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -30771,3 +30771,67 @@ (define-public python-version "This package provides a simple utility for checking the python version.") ;; MIT License (license license:expat)))) + +(define-public python-hatchling + (package + (name "python-hatchling") + (version "1.8.1") + (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")))) + ;; 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 + 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 + `(#:phases (modify-phases %standard-phases + ;; Copied directly from the build process for + ;; python-jsonschema-next. + (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)))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "pytest" "-vv"))))))) + (home-page "https://ofek.dev/projects/hatch/") + (synopsis "Modern, extensible Python project management") + (description "Modern, extensible Python project management") + ;; MIT License + (license license:expat)))