From mboxrd@z Thu Jan 1 00:00:00 1970 From: Efraim Flashner Subject: Re: pybitmessage fails to detect PyQt4.QtCore module due to sip error Date: Mon, 27 Jun 2016 05:06:47 +0300 Message-ID: <20160627020647.GA5519@debian-netbook> References: <20160626203626.GA30235@shadowwalker> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="G4iJoqBmSsgzjUCe" 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 1bHLx0-0002fd-HE for guix-devel@gnu.org; Sun, 26 Jun 2016 22:07:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHLwx-00088Z-68 for guix-devel@gnu.org; Sun, 26 Jun 2016 22:07:02 -0400 Received: from flashner.co.il ([178.62.234.194]:38336) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHLww-00086S-Qk for guix-devel@gnu.org; Sun, 26 Jun 2016 22:06:59 -0400 Received: from debian-netbook (85.65.166.137.dynamic.barak-online.net [85.65.166.137]) by flashner.co.il (Postfix) with ESMTPSA id 4E3B9401EC for ; Mon, 27 Jun 2016 02:06:50 +0000 (UTC) Content-Disposition: inline In-Reply-To: <20160626203626.GA30235@shadowwalker> 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 --G4iJoqBmSsgzjUCe Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jun 26, 2016 at 08:36:27PM +0000, ng0 wrote: > Hi, >=20 > I can't provide full patches yet, so these file-inserts > are to show where I'm at now. >=20 > The problem I run into is even though the new > package "python2-pyqt-4" in gnu/packages/qt.scm > builds, I get a failing detection in python ide > ~~~~~ > ng0=E2=92=B6shadowwalker /gnu/store/fibig7q6h274m95bzrn9qfq421xiqs6c-pybi= tmessage-0.6.0/lib/python2.7/site-packages/pybitmessage$ python > Python 2.7.10 (default, Jan 1 1970, 00:00:01) > [GCC 4.9.3] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import PyQt4.QtCore > Traceback (most recent call last): > File "", line 1, in > ImportError: No module named sip > ~~~~~ >=20 > and of course also in execution of the > depends.py of pybitmessage >=20 > ~~~~~ > ng0=E2=92=B6shadowwalker /gnu/store/fibig7q6h274m95bzrn9qfq421xiqs6c-pybi= tmessage-0.6.0/lib/python2.7/site-packages/pybitmessage$ ./depends.py > INFO: Python version: 2.7.10 (default, Jan 1 1970, 00:00:01) > [GCC 4.9.3] > INFO: sqlite3 Module Version: 2.6.0 > INFO: SQLite Library Version: 3.10.0 > INFO: SQLite Library Source ID: 2016-01-06 11:01:07 fd0a50f0797d154fefff7= 24624f00548b5320566 > INFO: SQLite Library Compile Options: ENABLE_FTS3, ENABLE_RTREE, ENABLE_U= NLOCK_NOTIFY, SECURE_DELETE, SYSTEM_MALLOC, THREADSAFE=3D1 > INFO: Checking OpenSSL at /gnu/store/9id9n7zmrgarggv6zb6ak4vps0lh5j9b-ope= nssl-1.0.2g/lib/libcrypto.so > INFO: OpenSSL Name: /gnu/store/9id9n7zmrgarggv6zb6ak4vps0lh5j9b-openssl-1= =2E0.2g/lib/libcrypto.so > INFO: OpenSSL Version: OpenSSL 1.0.2h 3 May 2016 > INFO: OpenSSL Compile Options: compiler: gcc -I. -I.. -I../include -fPIC= -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -W= a,--noexecstack -m64 -DL_ENDIAN -O3 -Wall -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_= ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_A= SM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM= -DGHASH_ASM -DECP_NISTZ256_ASM > ERROR: The PyQt4 package is not available. PyBitmessage requires PyQt 4.8= or later and Qt 4.7 or later. > INFO: curses Module Version: 2.2 > ERROR: The curses interface can not be used. The pythondialog package is = not available. > CRITICAL: PyBitmessage cannot start. One or more dependencies are unavail= able. > ~~~~~ >=20 > So at this moment, or at least for today, I'm stuck > and new input would be very welcome. >=20 > These are the packages: >=20 > ~~~~~ > gnu/packages/qt.scm: >=20 > (define-public python2-pyqt-4 > (package (inherit python-pyqt-4) > (name "python2-pyqt-4") > (native-inputs > `(("python-sip" ,python2-sip) > ("qt" ,qt-4))) > (inputs > `(("python" ,python-2))))) > ~~~~~ >=20 > ~~~~~ > gnu/packages/python.scm: > #:use-module (gnu packages qt) >=20 > (define-public pybitmessage > (package > (name "pybitmessage") > (version "0.6.0") > (source > (origin > (method url-fetch) > (uri (string-append "https://github.com/Bitmessage/" > "PyBitmessage/archive/v" version ".tar.gz")) > (file-name (string-append name "-" version ".tar.gz")) > (sha256 > (base32 > "026wbbr7cxi5lml8j14905myb2p10icjixzry45mmaa2zsimrviv")))) > (inputs > `(("python" ,python-2) > ("openssl" ,openssl) > ("sqlite" ,sqlite) > ("qt" ,qt-4))) > (native-inputs > `(("pkg-config" ,pkg-config))) > (propagated-inputs > `(("python2-pyqt-4" ,python2-pyqt-4) > ("python2-pysqlite" ,python2-pysqlite) > ("python2-pyopenssl" ,python2-pyopenssl))) > ;; Todo: package: SocksiPy-1.00, PyElliptic, pydialog (ncurses). > ;; XXX: pyelliptic is altered (backported) by PyBitmessage. > (build-system gnu-build-system) > (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. > (("libcrypto.so") > (string-append (assoc-ref inputs "openssl") > "/lib/libcrypto.so"))))) > (add-after 'unpack 'fix-local-files-in-paths > (lambda* (#:key inputs outputs #:allow-other-keys) > (substitute* "src/proofofwork.py" > (("bitmsghash.so") > (string-append (assoc-ref outputs "out") > "/lib/bitmsghash.so"))))) > (add-after 'unpack 'fix-pyelliptic > (lambda* (#:key inputs outputs #:allow-other-keys) > (substitute* "src/pyelliptic/openssl.py" > (("libcrypto.so") > (string-append (assoc-ref inputs "openssl") > "/lib/libcrypto.so")) > (("libssl.so") > (string-append (assoc-ref inputs "openssl") > "/lib/libssl.so"))))) > (delete 'check) ; not available > (replace 'install > (lambda* (#:key inputs outputs #:allow-other-keys) > (let* ((out (assoc-ref outputs "out")) > (python (assoc-ref inputs "python")) > (python-version > (last (string-split python #\-))) > (python-major+minor > (string-join > (take (string-split python-version #\.) 2) > ".")) > ;;(path (getenv "PYTHONPATH")) > (pylib (string-append out "/lib/python" > python-major+minor > "/site-packages")) > (bin (string-append out "/bin")) > (doc (string-append out "/share/man/man1")) > (lib (string-append out "/lib")) > (share (string-append out "/share/applications")) > (icons24 (string-append out "/share/icons/hicolor/24x= 24/apps")) > (iconss (string-append out "/share/icons/hicolor/scal= able/apps")) > (pixmaps (string-append out "/share/pixmaps"))) > (chdir "../..") > (install-file "src/bitmsghash/bitmsghash.so" lib) > (delete-file-recursively "src/bitmsghash") > (delete-file "src/build_osx.py") > (copy-recursively "src" (string-append pylib "/pybitmessag= e")) > (install-file "man/pybitmessage.1.gz" doc) > (install-file "desktop/pybitmessage.desktop" share) > (install-file "desktop/icon24.png" icons24) > (install-file "desktop/can-icon.svg" iconss) > (install-file "desktop/icon14.xpm" pixmaps) > ;; this breaks at the minimum depends.py: > ;; (for-each (lambda (file) > ;; (wrap-program file > ;; `("PYTHONPATH" ":" prefix (,path)))) > ;; (find-files pylib "\\.*$")) > ;; #t)))))) > )))))) > (license license:expat) > (description > "Distributed and trustless peer-to-peer communications protocol > for sending encrypted messages to one person or many subscribers.") > (synopsis "Distributed peer-to-peer communication") > (home-page "https://bitmessage.org/"))) > ~~~~~ >=20 > thanks, > -- > =E2=99=A5=E2=92=B6 Mx ng0 > For non-prism friendly talk find me on > psyced.org / loupsycedyglgamf.onion >=20 --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --G4iJoqBmSsgzjUCe Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCgAGBQJXcIoyAAoJEPTB05F+rO6TOWoP/2Wo4zvCseizZiGgXudDon93 YjrCXwjhzqjyhsFfwzAx33axTWfAwLaZZ5FNehWHxnhQAtjh5bUreD0NRLnWqij1 MZYRIfHWG1ogWWVkhpnHL8UXJoyJBxW6JOgm/t96ciiQpIaYh+yT0HI4u4mX1SP1 66qhmX9rvcynsfTNKh6afAZdyb4fYO2KZNBz4x02U2MLKRlnNVJm7f6+WAXdIDx3 rg7QoXeJRzhfqNLmc2m6Gb/q8RI2uDkZEPVTiSFtQYoy1UJm03+7eNOBnw1t0uIg eEUJ+KgEvXQJj/LPnLtfYzAJVwPdKdyAeE7FrFJuzjd0+/9KUWeFylL3tyt4culz 6opG0LqtLuFpVxLNZK9vMktUKypoPTCuT6OMZY9MzPVnoi2rqnIKQihrgCFrgmH4 3eIS8qgwEI3bX7En7kg7sOBPD2aEg2xS2ggeZ7SS4iNAqIFQ2MRog/jcP15t/+v2 PxIvKvU8wWjUSBg4Jru70+LivAYwwjKTVZXAqk4a0BN22c4bNxsLvXV9uYGhYRgJ J8Hf0xDs5nnLT/tHHLhxx8/Llr6xCG7RXjMMGsxT2317yGQNlubXovjP6IDOeLTj 6ScbxvN309fHqEwm8/VdrTzlPUrm3+vcu4uaLRafye/YRIKmZi11BHRbz+9Zov8Q D3kyAXyodqkr+Xry+yKH =oL0c -----END PGP SIGNATURE----- --G4iJoqBmSsgzjUCe--