From patchwork Mon Apr 25 03:56:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 38849 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 09F0027BBEA; Mon, 25 Apr 2022 05:21:21 +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_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,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 958E727BBE9 for ; Mon, 25 Apr 2022 05:21:20 +0100 (BST) Received: from localhost ([::1]:43200 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1niqDv-0000IL-OL for patchwork@mira.cbaines.net; Mon, 25 Apr 2022 00:21:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38892) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nipvb-00080U-Eb for guix-patches@gnu.org; Mon, 25 Apr 2022 00:02:27 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:38797) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nipvY-0001nH-6V for guix-patches@gnu.org; Mon, 25 Apr 2022 00:02:20 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nipvY-0008F0-49 for guix-patches@gnu.org; Mon, 25 Apr 2022 00:02:20 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55104] [PATCH 079/232] gnu: Add python-cffsubr. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 25 Apr 2022 04:02:20 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55104 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 55104@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 55104-submit@debbugs.gnu.org id=B55104.165085932831450 (code B ref 55104); Mon, 25 Apr 2022 04:02:20 +0000 Received: (at 55104) by debbugs.gnu.org; 25 Apr 2022 04:02:08 +0000 Received: from localhost ([127.0.0.1]:60882 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nipvL-0008Az-Qk for submit@debbugs.gnu.org; Mon, 25 Apr 2022 00:02:08 -0400 Received: from mail-qt1-f178.google.com ([209.85.160.178]:33387) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nipu1-0007sw-4E for 55104@debbugs.gnu.org; Mon, 25 Apr 2022 00:00:46 -0400 Received: by mail-qt1-f178.google.com with SMTP id hf18so9594504qtb.0 for <55104@debbugs.gnu.org>; Sun, 24 Apr 2022 21:00:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RzY72zsZMIwTIf8kng2cORG0NV3AjZ4OS6RdGT1/snM=; b=HezP0E4Sxfu4u2Fg2VsfYLqDG0GmZTXob6YsMqvfeRCssNH7WfmczVK3zIVayNu2R0 DqPD5gmhkjFuo/akUBFR80mPCqhN+g7P6xKrgCbfpi63sgl810p/nEhQhGXuW3r2F2gh Z/UWNseqJJ3ItMLET5r0nuQy5yd6RiiEty7/iM3kAV6x5AlB+arjQP0IzzWVUJpkmVtU q76IZ3G/+NebRXlqIKdM7Ya4kBLjjK8fzZIfbRTRIomraT8MPEEgJcD2lUdbEdJOT+yn sGxmIyzKtR++PaR+WyKANSJPTyb2F1y1tAOMDZb2wZBeUqXtokknOQyhJzni7NC0EEwC 4HzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RzY72zsZMIwTIf8kng2cORG0NV3AjZ4OS6RdGT1/snM=; b=CvZNZpckPCsNKkzGqlKEVj5cmJGqcSpzq+xuofdyuqcN82cdMWJPcLSGWpBf39MEYs TBPwMtsey7XyiIt4WNxM/2A3mF3+0AqV9U5TgTc2TFgKCn4L+fmupzsKDX40Z9bOB3MA DTMuR7zl5pWmOpx/+I9s9tUBBC5sY1qxcEHM8M400BgzE0QxRFgWRW254H7qVC+2Aobg IrFBkTKvpPTyYdOp/capXRVzWov1t1hNfsCncmRDYN4D7Zfwk9zh/Vlq06vOkMh5ZGYf smg9ow4hehcfhuY71/bZMQC8aK66KWeIYQ0Gk85GCZfZkZiyfZVJzdWJSCv3qC2RxNXu ZVMw== X-Gm-Message-State: AOAM532fjzeTb9OJvcyAJ6UyCTFlI6t65fMhSTwv1ctQLwr3ns3T5Ng2 RhwTXfDfSBYT+G+UVtvree8imQGVeBuDmA== X-Google-Smtp-Source: ABdhPJzpoRcWKcyEDKL8FZR4QZbMACQdpYvuc5kTxbav1q6wNSvoSDH+nE9ttbhlipseUMQbsSZlJQ== X-Received: by 2002:a05:622a:6083:b0:2f1:d380:1fad with SMTP id hf3-20020a05622a608300b002f1d3801fadmr10944097qtb.4.1650859239576; Sun, 24 Apr 2022 21:00:39 -0700 (PDT) Received: from localhost.localdomain (dsl-150-232.b2b2c.ca. [66.158.150.232]) by smtp.gmail.com with ESMTPSA id w82-20020a376255000000b0069ee3f0ae63sm4478142qkb.45.2022.04.24.21.00.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Apr 2022 21:00:39 -0700 (PDT) From: Maxim Cournoyer Date: Sun, 24 Apr 2022 23:56:45 -0400 Message-Id: <20220425035918.25683-79-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20220425035918.25683-1-maxim.cournoyer@gmail.com> References: <20220425035918.25683-1-maxim.cournoyer@gmail.com> 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" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/fontutils.scm (python-cffsubr): New variable. --- gnu/packages/fontutils.scm | 49 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm index 0c479cd5de..9d170da953 100644 --- a/gnu/packages/fontutils.scm +++ b/gnu/packages/fontutils.scm @@ -271,6 +271,55 @@ (define-public python-afdko @end table") (license license:asl2.0))) +(define-public python-cffsubr + (package + (name "python-cffsubr") + (version "0.2.9.post1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "cffsubr" version)) + (modules '((guix build utils))) + (snippet '(delete-file-recursively "external")) ;unbundle ADFKO + (sha256 + (base32 "0p7wyagkmwf4agr6ysgswrpmpifx5rz8dnjbcs2gmj29rwnl2cbb")))) + (build-system python-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-setup.py + (lambda _ + (substitute* '("pyproject.toml" + "setup.py") + ;; This is not needed when building the package. + (("setuptools-git-ls-files") "") + ;; Do not attempt to build the unbundled ADFKO. + (("cmdclass\\[\"build_ext\"] = ExecutableBuildExt.*") + "")))) + (add-after 'unpack 'patch-tx-path + (lambda* (#:key inputs #:allow-other-keys) + (define tx (search-input-file inputs "bin/tx")) + (substitute* "src/cffsubr/__init__.py" + (("TX_EXE = \"tx\"") + (format #f "TX_EXE = ~s" tx)) + ;; Use the full 'tx' file name directly. + (("with path\\(__name__, TX_EXE) as tx_cli:") + "") + ((" (return subprocess.run\\(\\[)str\\(tx_cli)(].*)" _ h t) + (format #f "~a~s~a" h tx t))))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "pytest" "-vv"))))))) + (native-inputs (list python-pytest python-setuptools-scm python-wheel)) + (inputs (list python-afdko)) + (propagated-inputs (list python-fonttools)) + (home-page "https://github.com/adobe-type-tools/cffsubr") + (synopsis "Compact Font Format (CFF) subroutinizer") + (description "This package provides the @command{cffsubr} command, a +Compact Font Format (CFF) subroutinizer based on the Adobe Font Development +Kit for OpenType (AFDKO) @command{tx} tool.") (license license:asl2.0))) (define-public python-cu2qu