From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 13 19:43:01 2020 Received: (at 38148) by debbugs.gnu.org; 14 Jan 2020 00:43:01 +0000 Received: from localhost ([127.0.0.1]:60454 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1irAIP-0003Ev-9z for submit@debbugs.gnu.org; Mon, 13 Jan 2020 19:43:01 -0500 Received: from mail-pf1-f172.google.com ([209.85.210.172]:43531) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1irAIM-0003EW-Nh for 38148@debbugs.gnu.org; Mon, 13 Jan 2020 19:42:59 -0500 Received: by mail-pf1-f172.google.com with SMTP id x6so5688944pfo.10 for <38148@debbugs.gnu.org>; Mon, 13 Jan 2020 16:42:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:message-id:in-reply-to :date:mime-version; bh=QMLWvUsyTHJoCoe+3Z4egQPNSSge49yEpXrueeqvq0g=; b=bWrFOaM4YWoURgCV2HiGPX2aHIyJyvr9jWQ1VAayhCyX8FbAECwnkaOJSg3Sy5q9EP Me3Qbo2tV5Hp3E+CGoHMvQ1ofsVNuktJpaWHwDvOL3GDy8vg0uojT+9FiRQTOl3CR/96 BrnNPm65EkfxRHKLGKxIz+6O4JOZJV1JF/8n1fHe/EMc2Xg+yhcL0nbgbbqUgNRSgF4O JN6pBqmetvYaFLjZffjt8FcdIk2jdnQ+oArZ3Mj2UZvEIuAX5k5v5/05UuekJoyyrFMW Ol03RKVqORmE0fprlFp8J9t7RkkOydiHJXevlqVSTXgqupmRmYMD6m6gjvDpywKRMYJI /BAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :message-id:in-reply-to:date:mime-version; bh=QMLWvUsyTHJoCoe+3Z4egQPNSSge49yEpXrueeqvq0g=; b=kgAoV68fOhU1Ewtd4JlxOonRI1Ehk7s27d/ymN2U9EfjlZcfv8vnWC/LJcvgOHtWEy UQGMcv54UnbI6YF/WIIIaK/cQ6pgXQHV/co48YeSHbtZnm4WEvRtD/TIE0Bd66A/l9ws 3h6VpdZvVXA+4uv6oaW6tM6IIvNptOg+2MmAZbBhOmPt+KLWyOB8infncB2vlaCKNZlC Ae62w2jqKv4A2Gwx6/s7MNo2PXx3cYrzayW5Pj2Qatp7BR8f7Z+MFq21boEGeItNN8Qc yx6r+SPs7k73JH72x9fS9GOC+eS62CnXsb7rHYvF1SitqF9U4YlNphXdqX4V7eHESpO5 T8/w== X-Gm-Message-State: APjAAAWGFHDmf9gnlhXCFe9VIdjLRB3tWyH3QkR0cEFxv0CRoNQdJ4Hn qNczenJ2CLgUh+TbqhHN71H2Y/7AfL0= X-Google-Smtp-Source: APXvYqxTH+RtovrkL/SmKPPAUIpbJbEN26Jevdiu6lLEy2f1NcE7yr2Efjx7ez8mLHNjQu2WKnZoYQ== X-Received: by 2002:a63:e513:: with SMTP id r19mr24228660pgh.326.1578962572450; Mon, 13 Jan 2020 16:42:52 -0800 (PST) Received: from neutron (S010664777da04f43.vf.shawcable.net. [70.68.94.152]) by smtp.gmail.com with ESMTPSA id z26sm15983588pfa.90.2020.01.13.16.42.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jan 2020 16:42:51 -0800 (PST) References: <20191109100530.zdfrewfmengq7pud@hooch.localdomain> <20200113103304.9093-1-mike.rosset@gmail.com> <87o8v7qw5t.fsf@ambrevar.xyz> User-agent: mu4e 1.2.0; emacs 26.3 From: Mike Rosset To: Pierre Neidhardt Subject: Re: bug#38148: [PATCH 1/2] gnu: Add python-pyqtwebengine. Message-ID: <87tv4yc1hb.fsf@gmail.com> In-reply-to: <87o8v7qw5t.fsf@ambrevar.xyz> Date: Mon, 13 Jan 2020 16:42:47 -0800 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 38148 Cc: 38148@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> + ;; store. >> + (add-before 'configure 'substitute-source >> + (lambda* (#:key inputs #:allow-other-keys) >> + (let* ((qtbase (assoc-ref inputs "qtbase")) >> + (qtprinter.h (string-append "\"" qtbase "/include/qt5/QtPrintSupport/qprinter.h\""))) >> + (substitute* "sip/QtPrintSupport/qprinter.sip" >> + (("") >> + qtprinter.h)) >> + #t))) >> (replace 'configure >> (lambda* (#:key inputs outputs #:allow-other-keys) >> (let* ((out (assoc-ref outputs "out")) >> @@ -1986,6 +1998,91 @@ framework. The bindings are implemented as a set of Python modules and >> contain over 620 classes.") >> (license license:gpl3))) > > Please apply the above pyqt change to a separate commit. I missed this comment with my new series. If this really needs to be done, I'll have to redo all of the commits and resend the series. Can this be avoided if possible? > + (arguments >> + `(#:modules ((srfi srfi-1) >> + ,@%gnu-build-system-modules) >> + #:phases >> + (modify-phases %standard-phases >> + (replace 'configure >> + (lambda* (#:key inputs outputs #:allow-other-keys) >> + (let* ((out (assoc-ref outputs "out")) >> + (sipdir (string-append out "/share/sip")) >> + (pyqt-sipdir (string-append >> + (assoc-ref inputs "python-pyqt") "/share/sip")) >> + (python (assoc-ref inputs "python")) >> + (python-version >> + (last (string-split python #\-))) >> + (python-major+minor >> + (string-join >> + (take (string-split python-version #\.) 2) >> + ".")) > > Use version-major+minor from (guix utils) instead? This is not an easy fix, I actually snarfed this from python-pyqt. In fact most of the python packages in this file use this method. Unfortunately version-major+minor cannot take an input, it needs to take a guix package record. This creates some scoping issues, in order to get the version for python. you would need to do something like semi pseudo code. --8<---------------cut here---------------start------------->8--- (begin (use-modules (gnu packages python)) (version-major+minor python)) --8<---------------cut here---------------end--------------->8--- This approach in theory works only when the input is python. But take the scenario were the input changes to a specific python version. Then our above code will still work but no longer produce the correct path. How python-build-system handles this. Is the same way as this let. In fact it looks like they wer copied verbatim. Unfortunately these python packages don't use python setuptools. So gnu-build-system is used instead. Even if we could use python-build-system. This would just make the code more ascetically pleasing. The underlying code would still be the same. The string parsing is not pretty, but it at least functional. If the input version changes the so probably will the path. Mike