python3Packages.py-cpuinfo: 7.0.0 -> 8.0.0

This commit is contained in:
Fabian Affolter 2021-05-04 23:33:02 +02:00
parent f0290a5d27
commit def35a9603

View File

@ -1,7 +1,6 @@
{ lib { lib
, stdenv , stdenv
, fetchFromGitHub , fetchFromGitHub
, fetchpatch
, buildPythonPackage , buildPythonPackage
, pytestCheckHook , pytestCheckHook
, sysctl , sysctl
@ -9,28 +8,15 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "py-cpuinfo"; pname = "py-cpuinfo";
version = "7.0.0"; version = "8.0.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "workhorsy"; owner = "workhorsy";
repo = pname; repo = pname;
rev = "v${version}"; rev = "v${version}";
sha256 = "10qfaibyb2syiwiyv74l7d97vnmlk079qirgnw3ncklqjs0s3gbi"; sha256 = "sha256-Mgzj1HTasUNHeHMVwV6d+TeyVqnBNUwCJ1EC3kfovf8=";
}; };
patches = [
# Make it detect Apple Silicon, remove after https://github.com/workhorsy/py-cpuinfo/pull/161 is merged.
(fetchpatch {
url = "https://github.com/workhorsy/py-cpuinfo/commit/54c32da6678f9d75ec5acf4534056cdc85c2a04d.patch";
sha256 = "sha256-3R46KrpACAQ1V0CQtz48V5mQXxvplUQrXnACtiE8WqY=";
})
# Continuation of the patch above
(fetchpatch {
url = "https://github.com/workhorsy/py-cpuinfo/commit/0d00f4b99750f292c85ff23e1039ea9489cb7ec8.patch";
sha256 = "sha256-mHoXoCAEG2v3xpQppRFWzSvhYCp5i9CZkbEgtiLVzMs=";
})
];
checkInputs = [ checkInputs = [
pytestCheckHook pytestCheckHook
]; ];
@ -42,17 +28,19 @@ buildPythonPackage rec {
--replace "_run_and_get_stdout(['sysctl'" "_run_and_get_stdout(['${sysctl}/bin/sysctl'" --replace "_run_and_get_stdout(['sysctl'" "_run_and_get_stdout(['${sysctl}/bin/sysctl'"
''; '';
meta = { pythonImportsCheck = [ "cpuinfo" ];
description = "Get CPU info with pure Python 2 & 3";
meta = with lib; {
description = "Get CPU info with pure Python";
longDescription = '' longDescription = ''
Py-cpuinfo gets CPU info with pure Python and should work without any Py-cpuinfo gets CPU info with pure Python and should work without any
extra programs or libraries, beyond what your OS provides. It does not extra programs or libraries, beyond what your OS provides. It does not
require any compilation (C/C++, assembly, etc.) to use and works with require any compilation (C/C++, assembly, etc.) to use and works with
Python 2 and 3. Python.
''; '';
inherit (src.meta) homepage; homepage = "https://github.com/workhorsy/py-cpuinfo";
changelog = "https://github.com/workhorsy/py-cpuinfo/blob/v${version}/ChangeLog"; changelog = "https://github.com/workhorsy/py-cpuinfo/blob/v${version}/ChangeLog";
license = lib.licenses.mit; license = licenses.mit;
maintainers = with lib.maintainers; [ costrouc ]; maintainers = with maintainers; [ costrouc ];
}; };
} }