guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pybitmessage fails to detect PyQt4.QtCore module due to sip error


From: ng0
Subject: Re: pybitmessage fails to detect PyQt4.QtCore module due to sip error
Date: Mon, 27 Jun 2016 23:18:31 +0000

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]