Merge pull request #309391 from mweinelt/do-things
Various python fixes ZHF-style.
This commit is contained in:
commit
e3f29be1d3
@ -213,6 +213,11 @@ python.pkgs.buildPythonApplication rec {
|
||||
"--reruns" "3"
|
||||
];
|
||||
|
||||
disabledTests = [
|
||||
# unreliable around day changes
|
||||
"test_order_create_invoice"
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
export PYTHONPATH=$(pwd)/src:$PYTHONPATH
|
||||
export DJANGO_SETTINGS_MODULE=tests.settings
|
||||
|
@ -52,5 +52,6 @@ buildPythonPackage rec {
|
||||
changelog = "https://github.com/bdraco/aiodhcpwatcher/blob/${src.rev}/CHANGELOG.md";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ hexa ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
@ -1,6 +1,8 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, stdenv
|
||||
, gcc12Stdenv
|
||||
|
||||
# build-system
|
||||
, cython
|
||||
@ -11,11 +13,17 @@
|
||||
, unittestCheckHook
|
||||
}:
|
||||
|
||||
let
|
||||
stdenv' = if stdenv.isLinux then gcc12Stdenv else stdenv;
|
||||
in
|
||||
buildPythonPackage rec {
|
||||
pname = "faster-fifo";
|
||||
version = "1.4.5";
|
||||
format = "pyproject";
|
||||
|
||||
# https://github.com/alex-petrenko/faster-fifo/issues/47\
|
||||
stdenv = stdenv';
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "alex-petrenko";
|
||||
repo = "faster-fifo";
|
||||
|
@ -2,7 +2,6 @@
|
||||
, stdenv
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
|
||||
# build-system
|
||||
, setuptools
|
||||
@ -34,7 +33,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "librosa";
|
||||
version = "0.10.1";
|
||||
version = "0.10.2";
|
||||
format = "pyproject";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
@ -42,26 +41,16 @@ buildPythonPackage rec {
|
||||
repo = "librosa";
|
||||
rev = "refs/tags/${version}";
|
||||
fetchSubmodules = true; # for test data
|
||||
hash = "sha256-zbmU87hI9A1CVcBZ/5FU8z0t6SS4jfJk9bj9kLe/EHI=";
|
||||
hash = "sha256-zUKljPKWOhyb3Zv4KEUcvLsVkxVhL+rzErKycAl6jIg=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
setuptools
|
||||
];
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
# https://github.com/librosa/librosa/issues/1754
|
||||
# https://github.com/librosa/librosa/pull/1755
|
||||
name = "matplotlib-3.8-compat.patch";
|
||||
url = "https://github.com/librosa/librosa/commit/beef47885ce1255b43b65e48ea2054ddace37c6c.patch";
|
||||
hash = "sha256-rrnlUHXHY2me4BWGs3wFq8WJmz75CbXTWKFp3VdJKzE=";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.cfg \
|
||||
--replace "--cov-report term-missing --cov librosa --cov-report=xml " ""
|
||||
--replace-fail "--cov-report term-missing --cov librosa --cov-report=xml " ""
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [
|
||||
@ -107,11 +96,20 @@ buildPythonPackage rec {
|
||||
"test_example"
|
||||
"test_example_info"
|
||||
"test_load_resample"
|
||||
# does not converge
|
||||
"test_nnls_vector"
|
||||
"test_cite_released"
|
||||
"test_cite_badversion"
|
||||
"test_cite_unreleased"
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
# https://github.com/librosa/librosa/pull/1808
|
||||
"test_pyin_multi_center"
|
||||
# crashing the python interpreter
|
||||
"test_unknown_time_unit"
|
||||
"test_unknown_wavaxis"
|
||||
"test_waveshow_unknown_wavaxis"
|
||||
"test_waveshow_bad_maxpoints"
|
||||
"test_waveshow_deladaptor"
|
||||
"test_waveshow_disconnect"
|
||||
"test_unknown_axis"
|
||||
"test_axis_bound_warning"
|
||||
"test_auto_aspect"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -24,6 +24,11 @@ buildPythonPackage rec {
|
||||
hash = "sha256-3ihcpYtpcejPkiyf4g4jveyNU6flQB2sv9EZ5Pd7tUc=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace tests/http_response_test.py \
|
||||
--replace-fail assertEquals assertEqual
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [
|
||||
requests
|
||||
six
|
||||
|
@ -3,7 +3,7 @@
|
||||
, fetchPypi
|
||||
, param
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
, pythonAtLeast
|
||||
, pyyaml
|
||||
, requests
|
||||
}:
|
||||
@ -13,7 +13,7 @@ buildPythonPackage rec {
|
||||
version = "0.5.0";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
disabled = pythonAtLeast "3.12";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
|
@ -5,7 +5,7 @@
|
||||
, pytest
|
||||
, jinja2
|
||||
, matplotlib
|
||||
, nose
|
||||
, pynose
|
||||
, pillow
|
||||
, pytestCheckHook
|
||||
}:
|
||||
@ -31,7 +31,7 @@ buildPythonPackage rec {
|
||||
propagatedBuildInputs = [
|
||||
jinja2
|
||||
matplotlib
|
||||
nose
|
||||
pynose
|
||||
pillow
|
||||
];
|
||||
|
||||
|
@ -2,33 +2,56 @@
|
||||
, stdenv
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
|
||||
# build-system
|
||||
, cmake
|
||||
, setuptools
|
||||
, setuptools-scm
|
||||
, pybind11
|
||||
|
||||
# dependencies
|
||||
, cffi
|
||||
, numpy
|
||||
|
||||
# native dependencies
|
||||
, libsamplerate
|
||||
|
||||
# tests
|
||||
, pytestCheckHook
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "samplerate";
|
||||
version = "0.1.0";
|
||||
format = "setuptools";
|
||||
version = "0.2.1";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "tuxu";
|
||||
repo = "python-samplerate";
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-lHZ9SVnKcsEsnKYXR/QocGbKPEoA7yCZxXvrNPeH1rA=";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-/9NFJcn8R0DFjVhFAIYOtzZM90hjVIfsVXFlS0nHNhA=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.py \
|
||||
--replace ", 'pytest-runner'" ""
|
||||
|
||||
substituteInPlace samplerate/lowlevel.py --replace \
|
||||
"lib_filename = _find_library('samplerate')" \
|
||||
'lib_filename = "${libsamplerate.out}/lib/libsamplerate${stdenv.hostPlatform.extensions.sharedLibrary}"'
|
||||
# unvendor pybind11, libsamplerate
|
||||
rm -r external
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace-fail "add_subdirectory(external)" "find_package(pybind11 REQUIRED)"
|
||||
'';
|
||||
|
||||
build-system = [
|
||||
cmake
|
||||
setuptools
|
||||
setuptools-scm
|
||||
pybind11
|
||||
];
|
||||
|
||||
dontUseCmakeConfigure = true;
|
||||
|
||||
buildInputs = [
|
||||
libsamplerate
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
cffi
|
||||
numpy
|
||||
|
@ -1,7 +1,7 @@
|
||||
{ stdenv, bazel_5, buildBazelPackage, lib, fetchFromGitHub, symlinkJoin
|
||||
, addOpenGLRunpath, fetchpatch, fetchzip, linkFarm
|
||||
# Python deps
|
||||
, buildPythonPackage, pythonOlder, python
|
||||
, buildPythonPackage, pythonAtLeast, pythonOlder, python
|
||||
# Python libraries
|
||||
, numpy, tensorboard, abseil-cpp, absl-py
|
||||
, packaging, setuptools, wheel, keras-preprocessing, google-pasta
|
||||
@ -500,7 +500,7 @@ let
|
||||
|
||||
in buildPythonPackage {
|
||||
inherit version pname;
|
||||
disabled = pythonOlder "3.8";
|
||||
disabled = pythonAtLeast "3.12";
|
||||
|
||||
src = bazel-build.python;
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
, stdenv
|
||||
, buildPythonPackage
|
||||
, setuptools
|
||||
, pythonOlder
|
||||
, pythonAtLeast
|
||||
, fetchPypi
|
||||
, substituteAll
|
||||
|
||||
@ -43,7 +43,7 @@ buildPythonPackage rec {
|
||||
pname = "wxpython";
|
||||
version = "4.2.1";
|
||||
format = "other";
|
||||
disabled = pythonOlder "3.7";
|
||||
disabled = pythonAtLeast "3.12";
|
||||
|
||||
src = fetchPypi {
|
||||
pname = "wxPython";
|
||||
|
Loading…
Reference in New Issue
Block a user