Commit 16d9eff4 authored by jokatzke's avatar jokatzke
Browse files

python3Packages.py3langid: init at 0.2.2

parent c0980c45
Loading
Loading
Loading
Loading
+43 −0
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, fetchPypi
, pythonOlder
, numpy
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "py3langid";
  version = "0.2.2";
  format = "setuptools";

  disabled = pythonOlder "3.6";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-tN4B2tfnAfKdIWoJNeheCWzIZ1kD0j6oRFsrtfCQuW8=";
  };

  propagatedBuildInputs = [
    numpy
  ];

  nativeCheckInputs = [
    pytestCheckHook
  ];

  # nixify path to the courlan binary in the test suite
  postPatch = ''
    substituteInPlace tests/test_langid.py --replace "'langid'" "'$out/bin/langid'"
  '';

  pythonImportsCheck = [ "py3langid" ];

  meta = with lib; {
    description = "Fork of the language identification tool langid.py, featuring a modernized codebase and faster execution times";
    homepage = "https://github.com/adbar/py3langid";
    changelog = "https://github.com/adbar/py3langid/blob/v${version}/HISTORY.rst";
    license = licenses.bsd3;
    maintainers = with maintainers; [ jokatzke ];
  };
}
+2 −0
Original line number Diff line number Diff line
@@ -9982,6 +9982,8 @@ self: super: with self; {
  py3exiv2 = callPackage ../development/python-modules/py3exiv2 { };
  py3langid = callPackage ../development/python-modules/py3langid { };
  py3nvml = callPackage ../development/python-modules/py3nvml { };
  py3rijndael = callPackage ../development/python-modules/py3rijndael { };