From mboxrd@z Thu Jan 1 00:00:00 1970 From: ng0@we.make.ritual.n0.is Subject: Re: pybitmessage fails to detect PyQt4.QtCore module due to sip error Date: Mon, 27 Jun 2016 23:18:31 +0000 Message-ID: <87eg7ip6ew.fsf@we.make.ritual.n0.is> References: <20160626203626.GA30235@shadowwalker> <20160627020647.GA5519@debian-netbook> 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]:59629) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHfnl-0006Wl-IH for guix-devel@gnu.org; Mon, 27 Jun 2016 19:18:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHfnh-0005ma-9x for guix-devel@gnu.org; Mon, 27 Jun 2016 19:18:48 -0400 Received: from 93-95-228-168.1984.is ([93.95.228.168]:40096 helo=beleriand.n0.is) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHfng-0005mO-T3 for guix-devel@gnu.org; Mon, 27 Jun 2016 19:18:45 -0400 Received: by beleriand.n0.is (OpenSMTPD) with ESMTPSA id 5d970726 TLS version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO for ; Mon, 27 Jun 2016 23:18:38 +0000 (UTC) In-Reply-To: <20160627020647.GA5519@debian-netbook> (Efraim Flashner's message of "Mon, 27 Jun 2016 05:06:47 +0300") 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 Hi, Efraim Flashner writes: >> ~~~~~ >> gnu/packages/python.scm: >> #:use-module (gnu packages qt) >> .... >> (arguments >> `(#:modules ((srfi srfi-1) >> ,@%gnu-build-system-modules) >> #:phases >> (modify-phases %standard-phases >> ;; A Makefile exists but needs too much patching. >> (replace 'build >> (lambda* (#:key outputs #:allow-other-keys) >> (chdir "src/bitmsghash") >> (system* "make") >> #t)) >> (add-after 'unpack 'fix-unmatched-python-shebangs >> (lambda* (#:key inputs #:allow-other-keys) >> (substitute* "src/bitmessagemain.py" >> (("#!/usr/bin/env python2.7") >> (string-append "#!" (which "python")))) >> (substitute* "src/bitmessagecli.py" >> (("#!/usr/bin/env python2.7.x") >> (string-append "#!" (which "python")))))) >> (add-after 'unpack 'fix-depends >> (lambda* (#:key inputs #:allow-other-keys) >> (substitute* "src/depends.py" >> (("import ctypes.util") >> "import ctypes.util >> ctypes.util.find_library('m')") > > I haven't tried playing with it myself yet, but this stood out to me. > The indentation is correct, but with the open quote that's a lot of > spaces. If it's supposed to be a new line then > ctypes.util.find_library('m') should be all the way on the left. I'm not > sure how python handles the extra spaces in .py files. > Those were added because python syntax required them to match. I don't know in which way I could insert this precise (not like displayed here, it's less in the resulting file) amount of white spaces. If I got the right part here pasted, it creates this: import re if re.match(r'linux|darwin|freebsd', sys.platform): try: import ctypes.util ctypes.util.find_library('m') path = ctypes.util.find_library('ssl') if path not in paths: paths.append(path) except: pass it might be off in python syntax in the email in the snippet I just pasted because it broke while pasting, had to recreate the intendation. -- ♥Ⓐ Mx ng0 For non-prism friendly talk find me on psyced.org / loupsycedyglgamf.onion