Merge pull request #217857 from azuwis/soundfile

python3Packages.soundfile: 0.11.0 -> 0.12.1
This commit is contained in:
Weijia Wang
2023-02-27 12:09:02 +02:00
committed by GitHub
2 changed files with 31 additions and 7 deletions
@@ -0,0 +1,25 @@
From b3eabd314f050a7491e82bc1560e8d8633569a06 Mon Sep 17 00:00:00 2001
From: Zhong Jianxin <azuwis@gmail.com>
Date: Fri, 24 Feb 2023 11:03:41 +0800
Subject: [PATCH] Fix build on linux arm64
---
setup.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index ef99bcc..81c2dcb 100644
--- a/setup.py
+++ b/setup.py
@@ -80,7 +80,7 @@ else:
elif platform == 'linux':
# the oldest mainline github runner available is ubuntu 20.04,
# which runs glibc 2.31:
- oses = 'manylinux_2_31_x86_64'
+ oses = 'manylinux_2_31_{}'.format(architecture0)
else:
pythons = 'py2.py3'
oses = 'any'
--
2.39.1
@@ -1,7 +1,6 @@
{ lib
, buildPythonPackage
, fetchPypi
, fetchpatch
, pytestCheckHook
, numpy
, libsndfile
@@ -12,15 +11,19 @@
buildPythonPackage rec {
pname = "soundfile";
version = "0.11.0";
version = "0.12.1";
# https://github.com/bastibe/python-soundfile/issues/157
disabled = isPyPy || stdenv.isi686;
src = fetchPypi {
inherit pname version;
sha256 = "sha256-kxc4ock+hoTC0+HVFKxjRAzoJ+x4PqCi0+RzDj3FjBg=";
hash = "sha256-6OEBeyzx3adnrvGdL9nuXr4H4FDUMPd6Cnxmugi4za4=";
};
patches = [
./0001-Fix-build-on-linux-arm64.patch
];
postPatch = ''
substituteInPlace soundfile.py --replace "_find_library('sndfile')" "'${libsndfile.out}/lib/libsndfile${stdenv.hostPlatform.extensions.sharedLibrary}'"
'';
@@ -29,10 +32,6 @@ buildPythonPackage rec {
propagatedBuildInputs = [ numpy libsndfile cffi ];
propagatedNativeBuildInputs = [ cffi ];
preConfigure = lib.optionalString (stdenv.isDarwin && stdenv.isx86_64) ''
export PYSOUNDFILE_ARCHITECTURE=x86_64
'';
meta = {
description = "An audio library based on libsndfile, CFFI and NumPy";
license = lib.licenses.bsd3;