depot/third_party/nixpkgs/pkgs/development/python-modules/charset-normalizer/default.nix
Default email a0cb138ada Project import generated by Copybara.
GitOrigin-RevId: a100acd7bbf105915b0004427802286c37738fef
2023-02-02 18:25:31 +00:00

47 lines
984 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
, pythonOlder
# popular downstream dependencies
, aiohttp
, requests
}:
buildPythonPackage rec {
pname = "charset-normalizer";
version = "3.0.1";
format = "setuptools";
disabled = pythonOlder "3.5";
src = fetchFromGitHub {
owner = "Ousret";
repo = "charset_normalizer";
rev = "refs/tags/${version}";
hash = "sha256-2kXs6ZdemA6taV4aa9xBKLmhbSgpybjg3Z61EUFabrk=";
};
nativeCheckInputs = [
pytestCheckHook
];
postPatch = ''
substituteInPlace setup.cfg \
--replace " --cov=charset_normalizer --cov-report=term-missing" ""
'';
pythonImportsCheck = [
"charset_normalizer"
];
passthru.tests = { inherit aiohttp requests; };
meta = with lib; {
description = "Python module for encoding and language detection";
homepage = "https://charset-normalizer.readthedocs.io/";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}