From patchwork Thu Oct 21 03:52:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinicius Monego X-Patchwork-Id: 33965 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 44A4F27BBE4; Thu, 21 Oct 2021 04:55:14 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 36E4C27BBE1 for ; Thu, 21 Oct 2021 04:55:13 +0100 (BST) Received: from localhost ([::1]:34830 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdPAe-0007k1-8E for patchwork@mira.cbaines.net; Wed, 20 Oct 2021 23:55:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38314) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdPAU-0007jd-MX for guix-patches@gnu.org; Wed, 20 Oct 2021 23:55:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:44373) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mdPAU-0005Jl-DS for guix-patches@gnu.org; Wed, 20 Oct 2021 23:55:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mdPAU-0005LF-DO for guix-patches@gnu.org; Wed, 20 Oct 2021 23:55:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#51314] [PATCH 01/29] gnu: Add python-filetype. References: <20211021035100.241119-1-monego@posteo.net> In-Reply-To: <20211021035100.241119-1-monego@posteo.net> Resent-From: Vinicius Monego Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 21 Oct 2021 03:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51314 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 51314@debbugs.gnu.org Cc: Vinicius Monego Received: via spool by 51314-submit@debbugs.gnu.org id=B51314.163478845420432 (code B ref 51314); Thu, 21 Oct 2021 03:55:02 +0000 Received: (at 51314) by debbugs.gnu.org; 21 Oct 2021 03:54:14 +0000 Received: from localhost ([127.0.0.1]:55910 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mdP9h-0005JU-OB for submit@debbugs.gnu.org; Wed, 20 Oct 2021 23:54:13 -0400 Received: from mout01.posteo.de ([185.67.36.65]:41261) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mdP9f-0005JE-Dl for 51314@debbugs.gnu.org; Wed, 20 Oct 2021 23:54:11 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id E578B240026 for <51314@debbugs.gnu.org>; Thu, 21 Oct 2021 05:54:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1634788444; bh=3pTHGb9SimSuk3/cUxHy4ELXMJl21UyeZzbZnp8ecxw=; h=From:To:Cc:Subject:Date:From; b=ORgNSeduXdyV5Cm7PH4jySa7UQypiirciZHKw0axCU4dl/ZPvJpCHbwtXgyum2eas pEDtg5BVzB5gRstXW3U9HLhYYAfchnUevUcLcjfsTHapYn+lK4bAUVxwgvP4NP+WlS wo2JSHs+TxYEzjVQqFJLS6P9C+V2HsQ9ejQP7A5uYLrtNLORG5Ksuw0/kD/c5zxkbd fcvOw0QvLtkfx3wu43L31d+ICcKCh7ArgFUIIfWLhwV5mlP4VfnYYaNCt6n3Ys0F6w blm0+XZAT2B489IN0AL/k9kjRHilFYw+V2osxUB7wa9Xfi2TtNHsb4+Dk0VQDYEP/F G1KyPFpfrexuw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4HZYWH6VZTz9rxH; Thu, 21 Oct 2021 05:54:03 +0200 (CEST) From: Vinicius Monego Date: Thu, 21 Oct 2021 03:52:46 +0000 Message-Id: <20211021035314.241360-1-monego@posteo.net> 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/python-xyz.scm (python-filetype): New variable. --- gnu/packages/python-xyz.scm | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index c335dea277..0e56570b83 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -11069,6 +11069,41 @@ your package is installed, via @code{pkg_resources} (part of @code{setuptools}).") (license license:gpl3+))) +(define-public python-filetype + (package + (name "python-filetype") + (version "1.0.8") + (source + (origin + (method url-fetch) + (uri (pypi-uri "filetype" version)) + (sha256 + (base32 "05mkinkcn36v1cnb5hzay3zxmv7jmmflckxxp08rgzbkkf3i9pvp")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda* (#:key inputs outputs tests? #:allow-other-keys) + (when tests? + (add-installed-pythonpath inputs outputs) + (invoke "python" "-m" "pytest" "-k" + (string-append + ;; Both tests fail with FileNotFoundError. + "not test_infer_zip_from_disk" + " and not test_infer_tar_from_disk")))))))) + (native-inputs + `(("python-flake8" ,python-flake8) + ("python-pytest" ,python-pytest) + ("python-pytest-benchmark" + ,python-pytest-benchmark))) + (home-page "https://github.com/h2non/filetype.py") + (synopsis "Infer file type and MIME type of any file/buffer") + (description "@code{filetype} is a small and dependency free Python +package to infer file type and MIME type checking the magic numbers +signature of a file or buffer.") + (license license:expat))) + (define-public python-legacy-api-wrap (package (name "python-legacy-api-wrap")