all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* python syntax escape question (pybitmessage update)
@ 2017-03-02 21:37 ng0
  2017-03-02 23:00 ` Ricardo Wurmus
  0 siblings, 1 reply; 2+ messages in thread
From: ng0 @ 2017-03-02 21:37 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 344 bytes --]

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.

[-- Attachment #2: 0001-gnu-pybitmessage-Update-to-0.6.2.patch --]
[-- Type: text/plain, Size: 5982 bytes --]

From 916d75f2a1f2ec292131dc316e11238b58b7e624 Mon Sep 17 00:00:00 2001
From: ng0 <contact.ng0@cryptolab.net>
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 © 2015 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2015, 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2015 Efraim Flashner <efraim@flashner.co.il>
-;;; Copyright © 2016, 2017 <contact.ng0@cryptolab.net>
+;;; Copyright © 2016, 2017 ng0 <contact.ng0@cryptolab.net>
 ;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca>
 ;;; Copyright © 2016, 2017 Clément Lassieur <clement@lassieur.org>
 ;;;
@@ -770,7 +770,7 @@ connect with friends and family without anyone else listening 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 listening 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="
-                                         (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") "/lib"))
-             #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\\) != \\[\\]:
+        print \"Press Return to continue\"
+        try:
+            nothing = raw_input\\(\\)
+        except NameError:
+            pass")
+                ""))
+             #t)))))
     (license license:expat)
     (description
      "Distributed and trustless peer-to-peer communications protocol
-- 
2.12.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: python syntax escape question (pybitmessage update)
  2017-03-02 21:37 python syntax escape question (pybitmessage update) ng0
@ 2017-03-02 23:00 ` Ricardo Wurmus
  0 siblings, 0 replies; 2+ messages in thread
From: Ricardo Wurmus @ 2017-03-02 23:00 UTC (permalink / raw)
  To: ng0; +Cc: guix-devel


ng0 <contact.ng0@cryptolab.net> writes:

> 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

I’d just patch out the “if detectPrereqs” part to ensure that the prompt
never appears.

~~ Ricardo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-03-02 23:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-02 21:37 python syntax escape question (pybitmessage update) ng0
2017-03-02 23:00 ` Ricardo Wurmus

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.