From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Famulari Subject: Branching based on Python version (was [PATCH 2/6] gnu: add python-sqlparse and python2-sqlparse) Date: Sun, 24 Apr 2016 15:24:02 -0400 Message-ID: <20160424192402.GD9128@jasmine> References: <1461266395-2731-1-git-send-email-h.goebel@crazy-compilers.com> <1461266395-2731-3-git-send-email-h.goebel@crazy-compilers.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58838) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1auPdV-0003i2-A2 for guix-devel@gnu.org; Sun, 24 Apr 2016 15:24:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1auPdR-0005Xq-W6 for guix-devel@gnu.org; Sun, 24 Apr 2016 15:24:05 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:34682) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1auPdR-0005Xm-TA for guix-devel@gnu.org; Sun, 24 Apr 2016 15:24:01 -0400 Content-Disposition: inline In-Reply-To: <1461266395-2731-3-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: Hartmut Goebel Cc: guix-devel@gnu.org On Thu, Apr 21, 2016 at 09:19:49PM +0200, Hartmut Goebel wrote: > * gnu/packages/python.scm (python-sqlparse) (python2-sqlparse): > New variables. > + (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"))))))) I think there must be a better way to do this conditional, but I'm not sure what it is. Does anyone have any ideas?