summary refs log blame commit diff
path: root/pkgs/development/python-modules/charset-normalizer/default.nix
blob: d406ea15fbd384bce4b47b4a774687ec8957b04c (plain) (tree)
1
2
3
4
5
6
7
8
9



                    
             



                               
                     


                               




                                
                                                                 










                                                                        


                        







                                                                      
{ lib
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
, pythonOlder
}:

buildPythonPackage rec {
  pname = "charset-normalizer";
  version = "2.0.12";
  format = "setuptools";

  disabled = pythonOlder "3.5";

  src = fetchFromGitHub {
    owner = "Ousret";
    repo = "charset_normalizer";
    rev = version;
    hash = "sha256-d5vWnZtFR669l1Meg4ZSsYIyBlJZya7SpXJMx2AP8NU=";
  };

  checkInputs = [
    pytestCheckHook
  ];

  postPatch = ''
    substituteInPlace setup.cfg \
      --replace " --cov=charset_normalizer --cov-report=term-missing" ""
  '';

  pythonImportsCheck = [
    "charset_normalizer"
  ];

  meta = with lib; {
    description = "Python module for encoding and language detection";
    homepage = "https://charset-normalizer.readthedocs.io/";
    license = licenses.mit;
    maintainers = with maintainers; [ fab ];
  };
}