From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:47644) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iGLSJ-0004mp-Ed for guix-patches@gnu.org; Fri, 04 Oct 2019 07:09:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iGLSI-00019P-9d for guix-patches@gnu.org; Fri, 04 Oct 2019 07:09:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:32988) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iGLSI-00019L-6V for guix-patches@gnu.org; Fri, 04 Oct 2019 07:09:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iGLSI-0006xW-1E for guix-patches@gnu.org; Fri, 04 Oct 2019 07:09:02 -0400 Subject: [bug#37617] [PATCH 3/6] gnu: Add python-cssselect2. Resent-Message-ID: From: Hartmut Goebel Date: Fri, 4 Oct 2019 13:08:21 +0200 Message-Id: <20191004110824.16081-3-h.goebel@crazy-compilers.com> In-Reply-To: <20191004110824.16081-1-h.goebel@crazy-compilers.com> References: <20191004110824.16081-1-h.goebel@crazy-compilers.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 37617@debbugs.gnu.org * gnu/packages/python-web.scm (python-cssselect2): New variable. --- gnu/packages/python-web.scm | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 576b75175d..0946a298a9 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -3309,3 +3309,36 @@ grammar of CSS but doesn’t know specific rules, properties or values supported in various CSS modules.") (license license:bsd-3))) +(define-public python-cssselect2 + (package + (name "python-cssselect2") + (version "0.2.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "cssselect2" version)) + (sha256 + (base32 "0skymzb4ncrm2zdsy80f53vi0arf776lvbp51hzh4ayp1il5lj3h")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda _ (invoke "pytest")))))) + (propagated-inputs + `(("python-tinycss2" ,python-tinycss2))) + (native-inputs + `(("python-pytest-cov" ,python-pytest-cov) + ("python-pytest-flake8" ,python-pytest-flake8) + ("python-pytest-isort" ,python-pytest-isort) + ("python-pytest-runner" ,python-pytest-runner))) + (home-page "https://cssselect2.readthedocs.io/") + (synopsis "CSS selectors for Python ElementTree") + (description "@code{cssselect2} is a straightforward implementation of +CSS3 Selectors for markup documents (HTML, XML, etc.) that can be read by +ElementTree-like parsers (including cElementTree, lxml, html5lib, etc.). + +Unlike the Python package @code{cssselect}, it does not translate selectors to +XPath and therefore does not have all the correctness corner cases that are +hard or impossible to fix in cssselect.") + (license license:bsd-3))) -- 2.21.0