Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / pyqtdatavisualization / default.nix
blob1561e9d4be51aef1552d86550d57782233846c47
1 { lib
2 , stdenv
3 , buildPythonPackage
4 , fetchPypi
5 , pyqt5
6 , pyqt-builder
7 , python
8 , pythonOlder
9 , qtdatavis3d
10 , setuptools
11 , sip
14 buildPythonPackage rec {
15   pname = "pyqtdatavisualization";
16   version = "5.15.5";
17   format = "pyproject";
19   disabled = pythonOlder "3.7";
21   src = fetchPypi {
22     pname = "PyQtDataVisualization";
23     inherit version;
24     hash = "sha256-iSf496pwhX7wDFHj379vg92fOFX0FuDVMVknYcu53H8=";
25   };
27   postPatch = ''
28     substituteInPlace pyproject.toml \
29       --replace "[tool.sip.project]" "[tool.sip.project]''\nsip-include-dirs = [\"${pyqt5}/${python.sitePackages}/PyQt5/bindings\"]"
30   '';
32   outputs = [ "out" "dev" ];
34   enableParallelBuilding = true;
35   # HACK: paralellize compilation of make calls within pyqt's setup.py
36   # pkgs/stdenv/generic/setup.sh doesn't set this for us because
37   # make gets called by python code and not its build phase
38   # format=pyproject means the pip-build-hook hook gets used to build this project
39   # pkgs/development/interpreters/python/hooks/pip-build-hook.sh
40   # does not use the enableParallelBuilding flag
41   preBuild = ''
42     export MAKEFLAGS+="''${enableParallelBuilding:+-j$NIX_BUILD_CORES}"
43   '';
45   dontWrapQtApps = true;
47   nativeBuildInputs = [
48     sip
49     qtdatavis3d
50     setuptools
51     pyqt-builder
52   ];
54   buildInputs = [
55     qtdatavis3d
56   ];
58   propagatedBuildInputs = [
59     pyqt5
60   ];
62   dontConfigure = true;
64   # has no tests
65   doCheck = false;
67   pythonImportsCheck = [
68     "PyQt5.QtDataVisualization"
69   ];
71   meta = with lib; {
72     description = "Python bindings for the Qt Data Visualization library";
73     homepage = "https://riverbankcomputing.com/";
74     license = licenses.gpl3Only;
75     maintainers = with maintainers; [ panicgh ];
76   };