python311Packages.nameparser: add format

- disable on unsupported Python releases
- add pythonImportsCheck
- switch to unittestCheckHook
This commit is contained in:
Fabian Affolter 2023-10-14 21:49:56 +02:00
parent 6b4453e7a7
commit 73cc147717

View File

@ -1,20 +1,29 @@
{ lib
, buildPythonPackage
, fetchPypi
, glibcLocales
, pythonOlder
, unittestCheckHook
}:
buildPythonPackage rec {
pname = "nameparser";
version = "1.1.3";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-qiQArXHM+AcGdbQDEaJXyTRln5GFSxVOG6bCZHYcBJ0=";
};
LC_ALL="en_US.UTF-8";
buildInputs = [ glibcLocales ];
nativeCheckInputs = [
unittestCheckHook
];
pythonImportsCheck = [
"nameparser"
];
meta = with lib; {
description = "Module for parsing human names into their individual components";