From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id wNcfL5wUn2FEUgEAgWs5BA (envelope-from ) for ; Thu, 25 Nov 2021 05:44:12 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id uL/aKpwUn2ECbAAA1q6Kng (envelope-from ) for ; Thu, 25 Nov 2021 04:44:12 +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 46835F5F9 for ; Thu, 25 Nov 2021 05:44:12 +0100 (CET) Received: from localhost ([::1]:48254 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mq6cF-0003KJ-Da for larch@yhetil.org; Wed, 24 Nov 2021 23:44:11 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57200) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mq6c7-0003Ji-9b for guix-patches@gnu.org; Wed, 24 Nov 2021 23:44:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:43940) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mq6c6-0003si-IY for guix-patches@gnu.org; Wed, 24 Nov 2021 23:44:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mq6c6-0006VO-F9 for guix-patches@gnu.org; Wed, 24 Nov 2021 23:44:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#49469] [PATCH v3] gnu: Add python-pysox. References: <0e7aba9bd4b403707a06597219700743@dismail.de> In-Reply-To: <0e7aba9bd4b403707a06597219700743@dismail.de> Resent-From: jgart Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 25 Nov 2021 04:44: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.163781540624941 (code B ref 49469); Thu, 25 Nov 2021 04:44:02 +0000 Received: (at 49469) by debbugs.gnu.org; 25 Nov 2021 04:43:26 +0000 Received: from localhost ([127.0.0.1]:55483 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mq6bT-0006U8-8h for submit@debbugs.gnu.org; Wed, 24 Nov 2021 23:43:26 -0500 Received: from mx1.dismail.de ([78.46.223.134]:8941) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mq6bQ-0006Tv-Nk for 49469@debbugs.gnu.org; Wed, 24 Nov 2021 23:43:21 -0500 Received: from mx1.dismail.de (localhost [127.0.0.1]) by mx1.dismail.de (OpenSMTPD) with ESMTP id 5d15ef53 for <49469@debbugs.gnu.org>; Thu, 25 Nov 2021 05:43:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=dismail.de; h=from:to:cc :subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=20190914; bh=H1IvbxVFYpYXYRktujncs IDB8tBB/Hc9mYDL4VfW8I8=; b=hOvVKzodrrk4PsIfSIF53z+fJv3NZUPbLY5MU xRFa3Dey0fPOJ9iSvQG77DtRtV50A9x2NqDoXC0FHSXfZXetriRwKtk0SswBhs08 AITq5H3aFPFdFofoIdkGBLKHsG7iT+QAmDO5/oHnaktcJJnzplKz74Y+z9+egjVq 9wJslaUcgB3+zyIT7/MrU9AHIOMEK+y259PFTGFoy6Vc6ztHvbNGiy2K8hGanRYV xg1WJHL0f9YN2q30aoZIxKnOyc1S+cBd3A4uT+OFF3pfvWioQDoIhLsqvRVeQ5u9 YQTZ9UU5YfiVW4nJ3HDb2g6GeckyrGmhBldCZT1FgvqYhcgIA== Received: from smtp1.dismail.de ( [10.240.26.11]) by mx1.dismail.de (OpenSMTPD) with ESMTP id cd1c7ca8 for <49469@debbugs.gnu.org>; Thu, 25 Nov 2021 05:43:14 +0100 (CET) Received: from smtp1.dismail.de (localhost [127.0.0.1]) by smtp1.dismail.de (OpenSMTPD) with ESMTP id 6d0cb48b for <49469@debbugs.gnu.org>; Thu, 25 Nov 2021 05:43:13 +0100 (CET) Received: by dismail.de (OpenSMTPD) with ESMTPSA id e17de741 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Thu, 25 Nov 2021 05:43:08 +0100 (CET) Date: Wed, 24 Nov 2021 23:42:45 -0500 Message-Id: <20211125044245.25678-1-jgart@dismail.de> X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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=1637815452; 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-type:content-type: 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=a6LtrEX/E4aFRcuejV3Of/ZtIYUDWtQ3A01s+hpnZfI=; b=lorH3iMg2iLgfNfy0a1FtfW4mQ55o4vZTYo82iZlOfEzCSbZSnCZA5U9cSl0FzPb0Idw8P ovEkBv4Dgu+v1B+hcjAcIgZS0+sJQpVMFcToja0VuiAt1/x5+fW1ozx9kadjexhml7gSWt EHwUyiUZYwbYvOkbsM4HACmA/ji16305SDEUcEENnG8PABZCq5+ctU6+7c2TFyyAkBLZXN QMHxHI4LvUXM5fFqsBr3npXt7JylFwE5HkgTn+E/hYaY2nwc8dPj/TdRjkQEXPgm7xDvUG ImudEDQJBqGGBVw6dHc3H+oxXDOtsOyjfavnj6KAk1hEOhOYeDlXm5bShtfzjA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1637815452; a=rsa-sha256; cv=none; b=DBma9USVMgxKqDMta27REzpZko9NtniAk6YfIFKwIr5GGo4ILW4hG0u+sqfsZnL1g9XSVt BKsufepJnjI9zhSNrqRaNJU+DqRT0yIro+XNptwZR1XtXUEN4c+mEq5q1eL8ZpUXcPX3vu CaEQJYdpymqpcPgwhHZ54PUA3Q1o5PjZ2FmwUvj9urFdfjyWO3SfmD7IqXoHCnxW8WVpcc EP+6IwN849yxqStHmfIfAjQ39DPtjoefj4TzeAWrJ8o8sO6f/z8SPuoGnsjEiQNrZGayTP 43f/C5uainvUCpgmYBT42lmV9oXC+mZbpfOoCprXE5ohHjTU6uz2r7j/lQSMVw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=dismail.de header.s=20190914 header.b=hOvVKzod; 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: -3.49 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=dismail.de header.s=20190914 header.b=hOvVKzod; 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: 46835F5F9 X-Spam-Score: -3.49 X-Migadu-Scanner: scn1.migadu.com X-TUID: Yu1J6iD7dmZy * gnu/packages/audio.scm (python-pysox): New variable. --- gnu/packages/audio.scm | 56 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm index 4b1a602804..694ea1a21b 100644 --- a/gnu/packages/audio.scm +++ b/gnu/packages/audio.scm @@ -34,6 +34,7 @@ ;;; Copyright © 2020 Giacomo Leidi ;;; Copyright © 2020, 2021 Vinicius Monego ;;; Copyright © 2020 Michael Rohleder +;;; Copyright © 2021 jgart ;;; ;;; This file is part of GNU Guix. ;;; @@ -5532,6 +5533,61 @@ (define-public siggen device. There is support for mono and/or stereo and 8 or 16 bit samples.") (license license:gpl2))) +(define-public python-pysox + ;; PyPi does not include the data folder containing audio files for testing. + (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)))))) + (replace 'check + (lambda* (#:key inputs outputs tests? #:allow-other-keys) + (when tests? + (add-installed-pythonpath inputs outputs) + (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{python-pysox} is a wrapper around the @command{sox} command +line tool. The API offers @code{Transformer} and @code{Combiner} +classes that allow the user to incrementally build up effects and audio +manipulations. @code{python-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 mda-lv2 (package (name "mda-lv2") -- 2.34.0