python310Packages.shortuuid: add pythonImportsCheck

- disable on older Python releases
- switch to pytestCheckHook
This commit is contained in:
Fabian Affolter 2022-05-22 11:31:44 +02:00 committed by GitHub
parent 543b1c5fa6
commit e369494848
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,32 +1,38 @@
{ lib
, buildPythonPackage
, isPy3k
, fetchPypi
, django
, pep8
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "shortuuid";
version = "1.0.9";
format = "setuptools";
disabled = !isPy3k;
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-RZ8S+hrMNP8hOxNxRnwDJRaWRaMe2YniaIcjOa91Y9U=";
hash = "sha256-RZ8S+hrMNP8hOxNxRnwDJRaWRaMe2YniaIcjOa91Y9U=";
};
checkInputs = [
django
pep8
pytestCheckHook
];
pythonImportsCheck = [
"shortuuid"
];
pytestFlagsArray = [
"shortuuid/tests.py"
];
meta = with lib; {
description = "A generator library for concise, unambiguous and URL-safe UUIDs";
description = "Library to generate concise, unambiguous and URL-safe UUIDs";
homepage = "https://github.com/stochastic-technologies/shortuuid/";
license = licenses.bsd3;
maintainers = with maintainers; [ zagy ];
};
}