From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Famulari Subject: Re: Branching based on Python version (was [PATCH 2/6] gnu: add python-sqlparse and python2-sqlparse) Date: Mon, 25 Apr 2016 15:06:03 -0400 Message-ID: <20160425190603.GC17335@jasmine> References: <1461266395-2731-1-git-send-email-h.goebel@crazy-compilers.com> <1461266395-2731-3-git-send-email-h.goebel@crazy-compilers.com> <20160424192402.GD9128@jasmine> <87inz6ado2.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58660) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aulpf-0004Qi-D4 for guix-devel@gnu.org; Mon, 25 Apr 2016 15:06:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aulpb-000519-DU for guix-devel@gnu.org; Mon, 25 Apr 2016 15:06:07 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:54202) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aulpb-00050s-9P for guix-devel@gnu.org; Mon, 25 Apr 2016 15:06:03 -0400 Content-Disposition: inline In-Reply-To: <87inz6ado2.fsf@gnu.org> 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: Ludovic =?iso-8859-1?Q?Court=E8s?= Cc: guix-devel@gnu.org On Sun, Apr 24, 2016 at 11:40:29PM +0200, Ludovic Courtès wrote: > Leo Famulari skribis: > > > 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? > > (guix build python-build-system) includes ‘get-python-version’, which > could be used for this purpose. > > But I think the above is acceptable here (I’d use ‘when’ instead of the > one-armed ‘if’, but that’s purely cosmetic.) Okay, sounds good. Hartmut, can you change it to use 'when' when you submit your revisions to python-selenium and python-geoip2? > > Thanks, > Ludo’.