2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
aiohttp,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
requests,
|
2021-09-18 10:52:07 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "charset-normalizer";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "3.3.2";
|
2022-01-26 04:04:25 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.5";
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Ousret";
|
|
|
|
repo = "charset_normalizer";
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-01-13 08:15:51 +00:00
|
|
|
hash = "sha256-T9lnlS05Ogb2eLLHYWFnjBtRaB/OBqGWHQ/2WLunrNY=";
|
2021-09-18 10:52:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace " --cov=charset_normalizer --cov-report=term-missing" ""
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2023-11-16 04:20:00 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "charset_normalizer" ];
|
2021-09-18 10:52:07 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
passthru.tests = {
|
|
|
|
inherit aiohttp requests;
|
|
|
|
};
|
2023-01-11 07:51:40 +00:00
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Python module for encoding and language detection";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "normalizer";
|
2021-09-18 10:52:07 +00:00
|
|
|
homepage = "https://charset-normalizer.readthedocs.io/";
|
2023-11-16 04:20:00 +00:00
|
|
|
changelog = "https://github.com/Ousret/charset_normalizer/blob/${version}/CHANGELOG.md";
|
2021-09-18 10:52:07 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|