From patchwork Wed Sep 7 18:34:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Garek Dyszel X-Patchwork-Id: 42283 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 2877527BBEA; Wed, 7 Sep 2022 19:37:15 +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 C80FF27BBE9 for ; Wed, 7 Sep 2022 19:37:14 +0100 (BST) Received: from localhost ([::1]:40906 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oVzvF-0006mn-RN for patchwork@mira.cbaines.net; Wed, 07 Sep 2022 14:37:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38470) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oVzt9-0005qG-Rk for guix-patches@gnu.org; Wed, 07 Sep 2022 14:35:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39333) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oVzt9-0005Qn-Gt for guix-patches@gnu.org; Wed, 07 Sep 2022 14:35:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oVzt9-000831-C4 for guix-patches@gnu.org; Wed, 07 Sep 2022 14:35:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57540] [RFC PATCH v2 11/19] gnu: Add python-hatch-vcs.* gnu/packages/python-xyz.scm (python-hatch-vcs): 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:03 +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.166257565730767 (code B ref 57540); Wed, 07 Sep 2022 18:35:03 +0000 Received: (at 57540) by debbugs.gnu.org; 7 Sep 2022 18:34:17 +0000 Received: from localhost ([127.0.0.1]:56240 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVzsO-00080B-PC for submit@debbugs.gnu.org; Wed, 07 Sep 2022 14:34:17 -0400 Received: from knopi.disroot.org ([178.21.23.139]:51288) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVzsM-000802-F6 for 57540@debbugs.gnu.org; Wed, 07 Sep 2022 14:34:14 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id F170749FB1 for <57540@debbugs.gnu.org>; Wed, 7 Sep 2022 20:34:13 +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 dhT_3oWiKtoc for <57540@debbugs.gnu.org>; Wed, 7 Sep 2022 20:34:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1662575651; bh=7mH9haXQTE1A2E0nljjfrT8XE4r5qbehk0N38qG1914=; h=From:To:Subject:Date; b=bq9J7iKI9Si39+pujnTIyoPlWWF6mhNRdeHqNBhobkvyUce4QPNf2vhRnODcy13ov R9udAPw0kkd+IFmbuFLLvYlYjFZGTNP19JU3xdixqdsHuIsns/UgdoH1rttAzL/KWm z2TuibMEDBnjxLRCGZ8p7IZujM96ZOed41n76pMmoUBRXO2b1HSh7VQNoYoj3RwoUG qO2V1xAC5Y2hPNMTTrWAn/vcmtKk/lLrbebh4wSD3bTGia0Nw9gzVoVPaJ6uEfykCs Fod8yn40Rm2B9sLzDUE+g6zy6tf0/4sF4C5VCCmLYtZn3Q0h8Btv9mY6lHLBiHitRW dzrHn1x3mZbOQ== Date: Wed, 07 Sep 2022 14:34:08 -0400 Message-ID: <87edwnvxsv.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-hatch-vcs): New variable. --- gnu/packages/python-xyz.scm | 62 +++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 8dd8d902a5..b5b319cfde 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -30835,3 +30835,65 @@ (define-public python-hatchling (description "Modern, extensible Python project management") ;; MIT License (license license:expat))) + +(define-public python-hatch-vcs + ;; Tags are not accurate; just use the commit itself. + (let ((commit "367daedb23ba906f3e0714c64392fdd6ffa69ab2") + (revision "1")) + (package + (name "python-hatch-vcs") + (version (git-version "0.2.0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ofek/hatch-vcs") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0nlnv32jqiz8ikc013h5simmiqqg0qa7pm0qcbd8yiqq1p43iw05")))) + (build-system python-build-system) + (inputs (list python + python-pypa-build + python-pathspec + python-pluggy-1.0 + python-editables + git)) + ;; python-setuptools-scm-6.4 minimum + (propagated-inputs (list python-hatchling)) + (native-inputs (list python-pytest python-setuptools-scm-7)) + (arguments + ;; Copied directly from the build process for + ;; python-jsonschema-next. + (substitute-keyword-arguments (package-arguments python-jsonschema) + ((#:phases phases) + #~(modify-phases #$phases + (replace 'build + (lambda _ + (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" + #$output + whl)))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "pytest" "-vvv")))))))) + (home-page "https://ofek.dev/projects/hatch/") + (synopsis "Hatch plugin for versioning with your preferred VCS") + (description "Hatch plugin for versioning with your preferred VCS") + ;; MIT License + (license license:expat))))