Merge pull request #130560 from Artturin/pyqtgraph-tests

python3Packages.pyqtgraph: 0.12.1 -> 0.12.2 and enable tests
This commit is contained in:
Sandro 2021-07-20 17:44:01 +02:00 committed by GitHub
commit 7ed40dd7f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,26 +1,57 @@
{ lib { lib
, buildPythonPackage , buildPythonPackage
, fetchPypi , fetchFromGitHub
, numpy
, pyopengl
, pyqt5
, scipy , scipy
, numpy
, pyqt5
, pyopengl
, qt5
, python
, pytestCheckHook
, freefont_ttf
, makeFontsConf
, fetchpatch
}: }:
let
fontsConf = makeFontsConf {
fontDirectories = [ freefont_ttf ];
};
in
buildPythonPackage rec { buildPythonPackage rec {
pname = "pyqtgraph"; pname = "pyqtgraph";
version = "0.12.1"; version = "0.12.2";
src = fetchPypi { src = fetchFromGitHub {
inherit pname version; owner = "pyqtgraph";
sha256 = "d2ef3b5289184fb48dfe5f44ccb58d9d64ffb5452fc524a2bd7a640a36b3874d"; repo = "pyqtgraph";
rev = "pyqtgraph-${version}";
sha256 = "093kkxwj75nb508vz7px4x7lxrwpaff10pl15m4h74hjwyvbsg3d";
}; };
propagatedBuildInputs = [ numpy pyopengl pyqt5 scipy ]; # TODO: remove when updating to 0.12.3
patches = [
(fetchpatch {
url = "https://github.com/pyqtgraph/pyqtgraph/commit/2de5cd78da92b48e48255be2f41ae332cf8bb675.patch";
sha256 = "1hy86psqyl6ipvbg23zvackkd6f7ajs6qll0mbs0x2zmrj92hk00";
})
];
doCheck = false; # tries to create windows (QApps) on collection, which fails (probably due to no display) propagatedBuildInputs = [
numpy
pyqt5
scipy
pyopengl
];
pythonImportsCheck = [ "pyqtgraph" ]; checkInputs = [ pytestCheckHook ];
preCheck = ''
export QT_PLUGIN_PATH="${qt5.qtbase.bin}/${qt5.qtbase.qtPluginPrefix}"
export QT_QPA_PLATFORM=offscreen
export DYLD_FRAMEWORK_PATH=/System/Library/Frameworks
export FONTCONFIG_FILE=${fontsConf}
'';
meta = with lib; { meta = with lib; {
description = "Scientific Graphics and GUI Library for Python"; description = "Scientific Graphics and GUI Library for Python";