Merge pull request #311042 from fabaff/nanotime-refactor

python312Packages.nanotime: refactor
This commit is contained in:
Fabian Affolter 2024-05-12 17:44:16 +02:00 committed by GitHub
commit 8ee54174fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,24 +1,31 @@
{ lib, buildPythonPackage, fetchPypi, nose }: {
lib,
buildPythonPackage,
fetchPypi,
setuptools,
pythonOlder,
}:
buildPythonPackage rec { buildPythonPackage rec {
pname = "nanotime"; pname = "nanotime";
version = "0.5.2"; version = "0.5.2";
format = "setuptools"; pyproject = true;
disabled = pythonOlder "3.7";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "c7cc231fc5f6db401b448d7ab51c96d0a4733f4b69fabe569a576f89ffdf966b"; hash = "sha256-x8wjH8X220AbRI16tRyW0KRzP0tp+r5Wmldvif/flms=";
}; };
nativeCheckInputs = [ nose ]; build-system = [ setuptools ];
checkPhase = '' # Tests currently failing
nosetests # https://github.com/jbenet/nanotime/issues/2
'';
# tests currently fail
doCheck = false; doCheck = false;
pythonImportsCheck = [ "nanotime" ];
meta = with lib; { meta = with lib; {
description = "Provides a time object that keeps time as the number of nanoseconds since the UNIX epoch"; description = "Provides a time object that keeps time as the number of nanoseconds since the UNIX epoch";
homepage = "https://github.com/jbenet/nanotime/tree/master/python"; homepage = "https://github.com/jbenet/nanotime/tree/master/python";