biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / pyqt3d / default.nix
blob487ab3a109859270b8602a52988e7b8f1ea9105c
2   lib,
3   buildPythonPackage,
4   fetchPypi,
5   pyqt5,
6   pyqt-builder,
7   python,
8   pythonOlder,
9   qt3d,
10   setuptools,
11   sip,
14 buildPythonPackage rec {
15   pname = "pyqt3d";
16   version = "5.15.7";
17   format = "pyproject";
19   disabled = pythonOlder "3.7";
21   src = fetchPypi {
22     pname = "PyQt3D";
23     inherit version;
24     hash = "sha256-6ng+tUbH2tLV6q+C6lBQ3eRSVamELgoddYSIHp4lqVE=";
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 = [
33     "out"
34     "dev"
35   ];
37   enableParallelBuilding = true;
38   # HACK: paralellize compilation of make calls within pyqt's setup.py
39   # pkgs/stdenv/generic/setup.sh doesn't set this for us because
40   # make gets called by python code and not its build phase
41   # format=pyproject means the pip-build-hook hook gets used to build this project
42   # pkgs/development/interpreters/python/hooks/pip-build-hook.sh
43   # does not use the enableParallelBuilding flag
44   preBuild = ''
45     export MAKEFLAGS+="''${enableParallelBuilding:+-j$NIX_BUILD_CORES}"
46   '';
48   dontWrapQtApps = true;
50   nativeBuildInputs = [
51     sip
52     qt3d
53     setuptools
54     pyqt-builder
55   ];
57   buildInputs = [ qt3d ];
59   propagatedBuildInputs = [ pyqt5 ];
61   dontConfigure = true;
63   # has no tests
64   doCheck = false;
66   pythonImportsCheck = [ "PyQt5.Qt3DCore" ];
68   meta = with lib; {
69     description = "Python bindings for the Qt 3D framework";
70     homepage = "https://riverbankcomputing.com/";
71     license = licenses.gpl3Only;
72     maintainers = with maintainers; [ panicgh ];
73   };