From mboxrd@z Thu Jan 1 00:00:00 1970 From: ng0 Subject: python syntax escape question (pybitmessage update) Date: Thu, 2 Mar 2017 21:37:37 +0000 Message-ID: <20170302213737.yprhiiizdhu42d7s@abyayala> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="5cuxpwxqghw2kv5m" Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60976) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cjYQ2-0003Us-M1 for guix-devel@gnu.org; Thu, 02 Mar 2017 16:37:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cjYPz-0006yA-EJ for guix-devel@gnu.org; Thu, 02 Mar 2017 16:37:50 -0500 Received: from latitanza.investici.org ([82.94.249.234]:39271) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cjYPy-0006vW-VG for guix-devel@gnu.org; Thu, 02 Mar 2017 16:37:47 -0500 Received: from [82.94.249.234] (latitanza [82.94.249.234]) (Authenticated sender: niasterisk@grrlz.net) by localhost (Postfix) with ESMTPSA id 33656120C84 for ; Thu, 2 Mar 2017 21:37:44 +0000 (UTC) Content-Disposition: inline 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 --5cuxpwxqghw2kv5m Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Hi, while updating PyBitmessage I ran (again) into python syntax issues, how to escape them. There's a "Press the Anykey" variant in there which needs to be removed (and it's not just specific to Guix, but as I already said on freenode IRC I'm burnt out on upstreaming to PyBitmessage, won't do it). I've appended the work in progress patch. --5cuxpwxqghw2kv5m Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename="0001-gnu-pybitmessage-Update-to-0.6.2.patch" Content-Transfer-Encoding: quoted-printable >From 916d75f2a1f2ec292131dc316e11238b58b7e624 Mon Sep 17 00:00:00 2001 From: ng0 Date: Thu, 2 Mar 2017 11:19:40 +0000 Subject: [PATCH] gnu: pybitmessage: Update to 0.6.2. * gnu/packages/messaging.scm (pybitmessage): Update to 0.6.2. --- gnu/packages/messaging.scm | 90 +++++++++++-----------------------------= ------ 1 file changed, 21 insertions(+), 69 deletions(-) diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm index 0ffc031c8..e1a1547b2 100644 --- a/gnu/packages/messaging.scm +++ b/gnu/packages/messaging.scm @@ -5,7 +5,7 @@ ;;; Copyright =C2=A9 2015 Andreas Enge ;;; Copyright =C2=A9 2015, 2016, 2017 Ricardo Wurmus ;;; Copyright =C2=A9 2015 Efraim Flashner -;;; Copyright =C2=A9 2016, 2017 +;;; Copyright =C2=A9 2016, 2017 ng0 ;;; Copyright =C2=A9 2016 Andy Patterson ;;; Copyright =C2=A9 2016, 2017 Cl=C3=A9ment Lassieur ;;; @@ -770,7 +770,7 @@ connect with friends and family without anyone else l= istening in.") (define-public pybitmessage (package (name "pybitmessage") - (version "0.6.1") + (version "0.6.2") (source (origin (method url-fetch) @@ -779,9 +779,9 @@ connect with friends and family without anyone else l= istening in.") (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "1ffj7raxpp277kphj98190fxrwfx16vmbspk7k3azg3bh5f5idnf")))) + "1in2mhaxkp2sx8pgvifq9dk1z8b2x3imf1anr0z926vwxwjrf85w")))) (inputs - `(("python" ,python-2) + `(("python-2" ,python-2) ("python:tk" ,python-2 "tk") ("openssl" ,openssl) ("sqlite" ,sqlite) @@ -789,74 +789,26 @@ connect with friends and family without anyone else= listening in.") ("python2-pyqt-4" ,python2-pyqt-4) ("python2-sip" ,python2-sip) ("python2-pysqlite" ,python2-pysqlite) - ("python2-pyopenssl" ,python2-pyopenssl))) - (native-inputs - `(("pkg-config" ,pkg-config))) - (build-system gnu-build-system) + ("python2-pyopenssl" ,python2-pyopenssl) + ("python2-msgpack" ,python2-msgpack))) + (build-system python-build-system) (arguments - `(#:imported-modules ((guix build python-build-system) - ,@%gnu-build-system-modules) - #:make-flags (list (string-append "PREFIX=3D" - (assoc-ref %outputs "out"))) - #:tests? #f ; no test target + `(#:tests? #f ; no test target + #:python ,python-2 #:phases (modify-phases %standard-phases - (add-before 'build 'fix-makefile - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "Makefile" - (("mkdir -p \\$\\{DESTDIR\\}/usr") "") - (("/usr/local") "") - (("/usr") "") - (("#!/bin/sh") (string-append "#!" (which "sh"))) - (("python2") (which "python")) - (("/opt/openssl-compat-bitcoin/lib/") - (string-append (assoc-ref inputs "openssl") "/lib/"))) - #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")))) - #t)) - (add-after 'unpack 'fix-depends - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "src/depends.py" - (("libcrypto.so") - (string-append (assoc-ref inputs "openssl") - "/lib/libcrypto.so"))) - #t)) - (add-after 'unpack 'fix-local-files-in-paths - (lambda* (#:key outputs #:allow-other-keys) - (substitute* "src/proofofwork.py" - (("bitmsghash.so") - (string-append (assoc-ref outputs "out") - "/lib/bitmsghash.so"))) - #t)) - (add-after 'unpack 'fix-pyelliptic - (lambda* (#:key inputs #: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"))) - #t)) - ;; XXX: Make does not build and install bitmsghash, do it - ;; and place it in /lib. - (add-before 'build 'build-and-install-bitmsghash - (lambda* (#:key outputs #:allow-other-keys) - (chdir "src/bitmsghash") - (system* "make") - (chdir "../..") - (install-file "src/bitmsghash/bitmsghash.so" - (string-append (assoc-ref outputs "out") "/li= b")) - #t)) - (add-after 'install 'wrap - (@@ (guix build python-build-system) wrap))))) + (add-after 'unpack 'fix-setup.py + (lambda _ + ;; Guix can not press the Anykey. + (substitute* "setup.py" + ((" if detectPrereqs\\(True\\) !=3D \\[\\]: + print \"Press Return to continue\" + try: + nothing =3D raw_input\\(\\) + except NameError: + pass") + "")) + #t))))) (license license:expat) (description "Distributed and trustless peer-to-peer communications protocol --=20 2.12.0 --5cuxpwxqghw2kv5m--