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