From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hartmut Goebel Subject: [PATCH 2/7] gnu: add python-sqlparse and python2-sqlparse Date: Sun, 17 Apr 2016 22:50:52 +0200 Message-ID: <1460926257-25147-3-git-send-email-h.goebel@crazy-compilers.com> References: <1460926257-25147-1-git-send-email-h.goebel@crazy-compilers.com> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52841) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1artid-0007Ao-Q7 for guix-devel@gnu.org; Sun, 17 Apr 2016 16:56:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1arteq-0002Ey-Cz for guix-devel@gnu.org; Sun, 17 Apr 2016 16:54:59 -0400 Received: from mail-out.m-online.net ([2001:a60:0:28:0:1:25:1]:37538) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1arteq-0002E8-3z for guix-devel@gnu.org; Sun, 17 Apr 2016 16:51:04 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3qp3Mq48svz3hmY0 for ; Sun, 17 Apr 2016 22:51:03 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.68]) by mail.m-online.net (Postfix) with ESMTP id 3qp3Mq44RgzvdWJ for ; Sun, 17 Apr 2016 22:51:03 +0200 (CEST) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavisd-new, port 10024) with ESMTP id ugNXWwjR9nKg for ; Sun, 17 Apr 2016 22:51:02 +0200 (CEST) Received: from hermia.goebel-consult.de (ppp-188-174-144-124.dynamic.mnet-online.de [188.174.144.124]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS for ; Sun, 17 Apr 2016 22:51:02 +0200 (CEST) Received: from thisbe.goebel-consult.de (unknown [192.168.110.30]) by hermia.goebel-consult.de (Postfix) with ESMTP id E43D660767 for ; Sun, 17 Apr 2016 22:50:58 +0200 (CEST) In-Reply-To: <1460926257-25147-1-git-send-email-h.goebel@crazy-compilers.com> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org * gnu/packages/python.scm (python-sqlparse) (python2-sqlparse): New functions. --- gnu/packages/python.scm | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 70db0e1..b77ab15 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -8752,3 +8752,39 @@ respectively.") (define-public python2-tblib (package-with-python2 python-tblib)) + +(define-public python-sqlparse + (package + (name "python-sqlparse") + (version "0.1.19") + (source + (origin + (method url-fetch) + (uri (pypi-uri "sqlparse" version)) + (sha256 + (base32 + "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda* _ + ;; setup.py-integrated 2to3 only affects the build files, but + ;; py.test is using the source files. So we need to convert them + ;; manually. + (if (zero? (system* "python3")) + (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests") + #t) + (zero? (system* "py.test"))))))) + (native-inputs + `(("python-pytest" ,python-pytest) + ("python-setuptools" ,python-setuptools))) + (home-page "https://github.com/andialbrecht/sqlparse") + (synopsis "Non-validating SQL parser") + (description "sqlparse is a non-validating SQL parser for Python. It +provides support for parsing, splitting and formatting SQL statements.") + (license bsd-3))) + +(define-public python2-sqlparse + (package-with-python2 python-sqlparse)) -- 2.7.4