depot/third_party/nixpkgs/pkgs/development/python-modules/googletrans/default.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

34 lines
826 B
Nix

{ lib, buildPythonPackage, fetchFromGitHub, requests, pytest, coveralls }:
buildPythonPackage rec {
pname = "googletrans";
version = "2.4.0";
src = fetchFromGitHub {
owner = "ssut";
repo = "py-googletrans";
rev = "v${version}";
sha256 = "0wzzinn0k9rfv9z1gmfk9l4kljyd4n6kizsjw4wjxv91kfhj92hz";
};
propagatedBuildInputs = [
requests
];
checkInputs = [ pytest coveralls ];
# majority of tests just try to ping Google's Translate API endpoint
doCheck = false;
checkPhase = ''
pytest
'';
pythonImportsCheck = [ "googletrans" ];
meta = with lib; {
description = "Googletrans is python library to interact with Google Translate API";
homepage = "https://py-googletrans.readthedocs.io";
license = licenses.mit;
maintainers = with maintainers; [ unode ];
};
}