Unverified Commit e3f29be1 authored by Martin Weinelt's avatar Martin Weinelt Committed by GitHub
Browse files

Merge pull request #309391 from mweinelt/do-things

Various python fixes ZHF-style.
parents 8f650600 e726d862
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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
+1 −0
Original line number Diff line number Diff line
@@ -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;
  };
}
+8 −0
Original line number Diff line number Diff line
{ 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";
+16 −18
Original line number Diff line number Diff line
@@ -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; {
+5 −0
Original line number Diff line number Diff line
@@ -24,6 +24,11 @@ buildPythonPackage rec {
    hash = "sha256-3ihcpYtpcejPkiyf4g4jveyNU6flQB2sv9EZ5Pd7tUc=";
  };

  postPatch = ''
    substituteInPlace tests/http_response_test.py \
      --replace-fail assertEquals assertEqual
  '';

  propagatedBuildInputs = [
    requests
    six
Loading