From 0a7a98f127834e368a2944a994fe72b2a735d01b Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 3 Jan 2021 15:11:56 +0100 Subject: [PATCH 2/3] gnu: Add python-googletrans. * gnu/packages/python-web.scm (python-googletrans): New public variable. --- gnu/packages/python-web.scm | 39 +++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 75f07b92d6..b0dc135537 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -558,6 +558,45 @@ over a different origin than that of the web application.") (define-public python2-furl (package-with-python2 python-furl)) +(define-public python-googletrans + (package + (name "python-googletrans") + ;; This is an alpha version. Google helpfully broke the 3.0.0 release to + ;; validate the warning in the description below -- thanks! + ;; + (version "3.1.0a0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "googletrans" version)) + (sha256 + (base32 "015fvyk1fq61n33bzawg1fcplb810lr6wv2xgs5334apjykp60yj")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'relax-version-restrictions + (lambda _ + (substitute* "setup.py" + (("==") ">="))))))) + (native-inputs + `(("python-coveralls" ,python-coveralls) + ("python-pytest" ,python-pytest))) + (propagated-inputs + `(("python-httpx" ,python-httpx))) + (home-page "https://github.com/ssut/py-googletrans") + (synopsis "Google Translate SaaSS Python client library") + (description + "This package provides a Python API to interact with the Google Translate +@acronym{SaaSS, Service as a Software Substitute}. + +You should not use this library in your software: it does nothing but send the +translation queries on to Google and give them complete control over the result. +It is useless without an Internet connection, or if the API is changed. When +the service is discontinued, all copies of your software will become useless as +well.") + (license license:expat))) + (define-public python-gtts (package (name "python-gtts") -- 2.30.1