evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / development / python-modules / dynd / default.nix
blobb60e57b34c9c47c8d147a0ccd36af3d8b3715d07
2   lib,
3   buildPythonPackage,
4   cython,
5   numpy,
6   libdynd,
7   fetchpatch,
8   cmake,
9   fetchFromGitHub,
10   pythonAtLeast,
13 buildPythonPackage rec {
14   version = "0.7.2";
15   format = "setuptools";
16   pname = "dynd";
18   disabled = pythonAtLeast "3.11";
20   src = fetchFromGitHub {
21     owner = "libdynd";
22     repo = "dynd-python";
23     rev = "v${version}";
24     sha256 = "19igd6ibf9araqhq9bxmzbzdz05vp089zxvddkiik3b5gb7l17nh";
25   };
27   patches = [
28     # Fix numpy compatibility
29     # https://github.com/libdynd/dynd-python/issues/746
30     (fetchpatch {
31       url = "https://aur.archlinux.org/cgit/aur.git/plain/numpy-compatibility.patch?h=python-dynd&id=e626acabd041069861311f314ac3dbe9e6fd24b7";
32       sha256 = "sha256-oA/3G8CGeDhiYXbNX+G6o3QSb7rkKItuCDCbnK3Rt10=";
33       name = "numpy-compatibility.patch";
34     })
35   ];
37   # setup.py invokes git on build but we're fetching a tarball, so
38   # can't retrieve git version. We hardcode:
39   preConfigure = ''
40     substituteInPlace setup.py --replace "ver = check_output(['git', 'describe', '--dirty'," "ver = '${version}'"
41     substituteInPlace setup.py --replace "'--always', '--match', 'v*']).decode('ascii').strip('\n')" ""
42   '';
44   dontUseCmakeConfigure = true;
46   nativeBuildInputs = [ cmake ];
48   buildInputs = [
49     cython
50     libdynd.dev
51   ];
53   propagatedBuildInputs = [
54     libdynd
55     numpy
56   ];
58   #  ModuleNotFoundError: No module named 'dynd.config'
59   doCheck = false;
61   pythonImportsCheck = [ "dynd" ];
63   meta = with lib; {
64     homepage = "http://libdynd.org";
65     license = licenses.bsd2;
66     description = "Python exposure of dynd";
67     maintainers = with maintainers; [ teh ];
68   };