From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id aD9gOWWFYmGHLgEAgWs5BA (envelope-from ) for ; Sun, 10 Oct 2021 08:17:09 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id ENQ3NGWFYmHwGwAAB5/wlQ (envelope-from ) for ; Sun, 10 Oct 2021 06:17:09 +0000 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 8D9121FD49 for ; Sun, 10 Oct 2021 08:17:09 +0200 (CEST) Received: from localhost ([::1]:60834 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mZS8y-0002BU-Ll for larch@yhetil.org; Sun, 10 Oct 2021 02:17:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58754) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mZS8t-0002Au-GQ for guix-patches@gnu.org; Sun, 10 Oct 2021 02:17:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42826) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mZS8s-0002Dq-WA for guix-patches@gnu.org; Sun, 10 Oct 2021 02:17:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mZS8s-0005pe-SV for guix-patches@gnu.org; Sun, 10 Oct 2021 02:17:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49469] [PATCH] gnu: Add python-pysox. Resent-From: jgart Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 10 Oct 2021 06:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49469 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49469@debbugs.gnu.org Cc: jgart Received: via spool by 49469-submit@debbugs.gnu.org id=B49469.163384659922375 (code B ref 49469); Sun, 10 Oct 2021 06:17:02 +0000 Received: (at 49469) by debbugs.gnu.org; 10 Oct 2021 06:16:39 +0000 Received: from localhost ([127.0.0.1]:54371 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mZS8V-0005oo-9W for submit@debbugs.gnu.org; Sun, 10 Oct 2021 02:16:39 -0400 Received: from mx1.dismail.de ([78.46.223.134]:13699) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mZS8T-0005oF-MM for 49469@debbugs.gnu.org; Sun, 10 Oct 2021 02:16:38 -0400 Received: from mx1.dismail.de (localhost [127.0.0.1]) by mx1.dismail.de (OpenSMTPD) with ESMTP id 1c03a14d for <49469@debbugs.gnu.org>; Sun, 10 Oct 2021 08:16:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=dismail.de; h=from:to:cc :subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; s=20190914; bh=18BYfmUjgynDPvBZ9uGxK sn6XkSdloXb8SWIbPjARNk=; b=iTq2mvTkTZbMYSyqsieEE47Odb/H+vtCPhGVG RdLzFDYqu4GH3A1OLO+vQDhv0QAABcVFEuCpNYzs/x+83bO05GYuQw3T/zdEndPd YTMywvCMYa2IM64I77sRWjsFnCzacfzvXAVkrgedbj4UnDj0PpFGxxbP3olvC844 s6h5axySQenxXPZIqvujPKA0Rmoz9jpDGZ9waWpXnqfGViYAV5kVHt/vUWRivxRL b66SMa7GVThZLiqjoB4cjCqM9s7sxBx02SR9dDTvlw0Czsxut/WQeBm1a3tUjaQI YwZWCobkOmNMcJtCsYuxob+yK0LK9YFEPTICiF8OCxJyUdALA== Received: from smtp1.dismail.de ( [10.240.26.11]) by mx1.dismail.de (OpenSMTPD) with ESMTP id 223d22bf for <49469@debbugs.gnu.org>; Sun, 10 Oct 2021 08:16:37 +0200 (CEST) Received: from smtp1.dismail.de (localhost [127.0.0.1]) by smtp1.dismail.de (OpenSMTPD) with ESMTP id 77496984 for <49469@debbugs.gnu.org>; Sun, 10 Oct 2021 08:16:37 +0200 (CEST) Received: by dismail.de (OpenSMTPD) with ESMTPSA id dc94610f (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Sun, 10 Oct 2021 08:16:36 +0200 (CEST) Date: Sun, 10 Oct 2021 02:15:04 -0400 Message-Id: <20211010061525.11302-2-jgart@dismail.de> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211010061525.11302-1-jgart@dismail.de> References: <20211010061525.11302-1-jgart@dismail.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: jgart X-ACL-Warn: , jgart via Guix-patches From: jgart via Guix-patches via X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1633846629; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: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=2Q+hnJF535A0BHMVdTqY2rAbNM6yqmqayz4QEAoUHkc=; b=COVrxRIHFZvWB3mWv8QFPJ1Li/X5qnsRVBOJkZZia7hc+39vNYwYk1UVUDDlwqsv/VnHa0 6R1HZhfGJG8db0KUyMn50zD8So1QjG9hiMf6iwQmXnm2vhNVOjU9+Ab6IjRT90ddOJO75G vIwoM3Io/N98zPahNdP/89FmXmqFYgHnsUZLPoD/UBGusq/7E4/CtqDFlY+HgU3qfubWJp QBOW6TVRraYIhIyjJj1vAGV4dxErITV4BzF66yhjiUiuXrnXF32BE9cmC6dK14rlCSbYva 9ldLRhzAW7r87SxUi/ZSKmuGRgADS9OCkLjduUbBGAB9aDJnNBbzUJYbsuVlXQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1633846629; a=rsa-sha256; cv=none; b=DHnVEAomniMcFgWZ/8LHZ2Kd1Ohfc+hCfUbsSOTmX4XKH9dQ8nmu93oLLObvqUNJ9QRyXM QezTV0LuPMn577BpIFUbqnABu8m4nJGe/F8eWu2Co1UeqDbiUpIHOXAtlqo4C1cJOmk88T 7D8TeAddKEslDD4Wxn0tSzGlJHvvCdvcyfd7si0yutrWSQDIWWayUQpY5HanvogaWzMlV6 WwxL6SVXwuAfSlOYJn2si0CsSrGfKsemHLQSWTlrMiV03Fb7ELWPtHf8MN0PF7ukv/65Ii cI7ZoE+pwLDPGk4E+fBobXyk/ID7vCyNyzYlD5XLq6M9qzahH5rtPJr4E7Wgmg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=dismail.de header.s=20190914 header.b=iTq2mvTk; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 1.09 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=dismail.de header.s=20190914 header.b=iTq2mvTk; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 8D9121FD49 X-Spam-Score: 1.09 X-Migadu-Scanner: scn0.migadu.com X-TUID: C9fB4FJfrmoh * gnu/packages/audio.scm (python-pysox): New variable. --- gnu/packages/audio.scm | 57 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm index cc51ac51f3..8b412a63d1 100644 --- a/gnu/packages/audio.scm +++ b/gnu/packages/audio.scm @@ -2429,6 +2429,63 @@ compensation, (de)interleaving, and byte-swapping ;; original developer. (license license:expat))) +(define-public python-pysox + (let ((commit "3d0053381c24ae3490f759d4de87194b85789d36") + (revision "0")) + (package + (name "python-pysox") + (version (git-version "1.4.2" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/rabitt/pysox") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0i62jx92vfpcr2z7lp69yzqdi9idfs3pifl3rzm2akc2c4cr1mac")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-sox + (lambda* (#:key inputs #:allow-other-keys) + (let* ((sox-store-path (assoc-ref inputs "sox")) + (sox-bin (string-append sox-store-path "/bin/sox"))) + (substitute* "sox/__init__.py" + (("sox -h") + (string-append sox-bin " -h"))) + (substitute* "sox/core.py" + (("\\['sox") + (string-append "['" sox-bin))) + (substitute* "sox/log.py" + (("Logger\\('sox") + (string-append "Logger\('" sox-bin)))))) + (replace 'check + (lambda* (#:key inputs outputs tests? #:allow-other-keys) + (when tests? + (add-installed-pythonpath inputs outputs) + (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH"))) + (invoke "pytest"))))))) + (propagated-inputs + `(("python-numpy" ,python-numpy) + ("python-typing-extensions" ,python-typing-extensions))) + (native-inputs + `(("sox" ,sox) + ("python-pytest" ,python-pytest) + ("python-pytest-cov" ,python-pytest-cov) + ("python-soundfile" ,python-soundfile))) + (home-page "https://github.com/rabitt/pysox") + (synopsis "Python wrapper around sox") + (description +"@code{pysox} is a wrapper around the @command{sox} command line tool. + pysox's API offers @code{Transformer} and @code{Combiner} classes that allow the user to +incrementally build up effects and audio manipulations. @code{pysox} also +provides methods for querying audio information such as sample rate, +determining whether an audio file is silent and much more.") + (license license:bsd-3)))) + (define-public python-pyaudio (package (name "python-pyaudio") -- 2.33.0