evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / development / python-modules / cpufeature / default.nix
blob13f364fb00ee5f39e391f028c59cc637fa9dd10c
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   unittestCheckHook,
6   pythonOlder,
7   setuptools,
8 }:
10 buildPythonPackage rec {
11   pname = "cpufeature";
12   version = "0.2.1";
13   pyproject = true;
15   disabled = pythonOlder "3.7";
17   src = fetchFromGitHub {
18     owner = "robbmcleod";
19     repo = "cpufeature";
20     rev = "refs/tags/v${version}";
21     hash = "sha256-dp569Tp8E5/avQpYvhPNPgS/A+q2e/ie+7BR7h2Ip+I=";
22   };
24   nativeBuildInputs = [ setuptools ];
26   propagatedBuildInputs = [ setuptools ];
28   nativeCheckInputs = [ unittestCheckHook ];
30   pythonImportsCheck = [ "cpufeature" ];
32   preCheck = ''
33     # Change into the test directory due to a relative resource path
34     cd cpufeature
35   '';
37   meta = with lib; {
38     description = "Python module for detection of CPU features";
39     homepage = "https://github.com/robbmcleod/cpufeature";
40     license = licenses.cc0;
41     maintainers = with maintainers; [ fab ];
42     platforms = [
43       "x86_64-linux"
44       "x86_64-windows"
45     ];
46   };