From patchwork Tue Feb 19 04:55:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Leo Famulari X-Patchwork-Id: 1191 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 1004A16C61; Tue, 19 Feb 2019 04:56:13 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 9314016C5F for ; Tue, 19 Feb 2019 04:56:12 +0000 (GMT) Received: from localhost ([127.0.0.1]:41582 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gvxS0-0006g7-37 for patchwork@mira.cbaines.net; Mon, 18 Feb 2019 23:56:12 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35927) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gvxRt-0006fm-3x for guix-patches@gnu.org; Mon, 18 Feb 2019 23:56:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gvxRr-0001gB-O6 for guix-patches@gnu.org; Mon, 18 Feb 2019 23:56:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:54420) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gvxRr-0001ei-DR for guix-patches@gnu.org; Mon, 18 Feb 2019 23:56:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gvxRq-0001RX-BK for guix-patches@gnu.org; Mon, 18 Feb 2019 23:56:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#34515] [PATCH 13/13] gnu: Add Magic-Wormhole. Resent-From: Leo Famulari Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 19 Feb 2019 04:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34515 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: Ricardo Wurmus Received: via spool by 34515-submit@debbugs.gnu.org id=B34515.15505521425497 (code B ref 34515); Tue, 19 Feb 2019 04:56:02 +0000 Received: (at 34515) by debbugs.gnu.org; 19 Feb 2019 04:55:42 +0000 Received: from localhost ([127.0.0.1]:53701 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gvxRR-0001QL-9p for submit@debbugs.gnu.org; Mon, 18 Feb 2019 23:55:42 -0500 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:36489) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gvxRN-0001Px-Mf for 34515@debbugs.gnu.org; Mon, 18 Feb 2019 23:55:34 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 3730922153; Mon, 18 Feb 2019 23:55:28 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 18 Feb 2019 23:55:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=mesmtp; bh=hXT1ORcDGvscxkdGosykMB6K pULnwskyhUje3FhzWJo=; b=Vn3UBt9tSLyg9UnZ6af/YtfHZXOCvMXlrz9DcraJ fw1rtmzPU+BuArZXLnO0rYjKMHK5jThJ1RKGh+4VEZ/q43KFZeZzFoQHt1vq9VLL 9unG5E0tJ+2qyofmcu7qggjksYH5/LZfDY8PYIKC65+bAw4eG48C0Ps27d/MrWvM mMM= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=hXT1OR cDGvscxkdGosykMB6KpULnwskyhUje3FhzWJo=; b=ze7zBlxjXb5FhhBS8yM3Yo 4Q1wyhZiljEDHSRCXIU5btSMrkg6QmumMqFV8YDXzBxC+3dNIFo3Mmv/hUTOYL/F LIpxf4OLTQfj0BNkzzktn9G2f7OyBl3kbOhELaeyYSyPzwf0sZuBkVkH3xC+zpEa UGVLbgYmVvZAe0zF74+XqcLthzoyqDPV+iUdwYH/+02wV4OPxXcnblQ5Y7SobLiJ TkPNqseRCgUuEXXuIShchw0AtFwkEqYYi8BkHfahnfem/FCo9Tydi12hw8/oQLiX Po8LMseRTaU6E6iXBDfBBtHCKPSwwZJj/BrkS28AihbQvLYiaXmbSCYhYqalnx5g == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrtddvgdehheculddtuddrgedtledrtddtmd cutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfhuthen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkfhggtggujggfsehgtd erredtreejnecuhfhrohhmpefnvghoucfhrghmuhhlrghrihcuoehlvghosehfrghmuhhl rghrihdrnhgrmhgvqeenucffohhmrghinhepghhithhhuhgsrdgtohhmnecukfhppeejie druddvgedrvddtvddrudefjeenucfrrghrrghmpehmrghilhhfrhhomheplhgvohesfhgr mhhulhgrrhhirdhnrghmvgenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from localhost (c-76-124-202-137.hsd1.pa.comcast.net [76.124.202.137]) by mail.messagingengine.com (Postfix) with ESMTPA id D6458E44DF; Mon, 18 Feb 2019 23:55:26 -0500 (EST) Date: Mon, 18 Feb 2019 23:55:26 -0500 From: Leo Famulari Message-ID: <20190219045526.GF2718@jasmine.lan> References: <10c8f51b53835850b458bef15e2a11ab0dc0d70a.1550437064.git.leo@famulari.name> <87sgwlwkcg.fsf@elephly.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <87sgwlwkcg.fsf@elephly.net> User-Agent: Mutt/1.11.2 (2019-01-07) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 34515@debbugs.gnu.org Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches On Mon, Feb 18, 2019 at 09:51:11AM +0100, Ricardo Wurmus wrote: > Leo Famulari writes: > > * gnu/packages/magic-wormhole.scm (magic-wormhole): New variable. > […] > > + ;; XXX I can't figure out how to build the docs properly. > > + (add-after 'install 'install-docs > > + (lambda* (#:key outputs #:allow-other-keys) > > + (let* ((out (assoc-ref outputs "out")) > > + (man (string-append out "/share/man/man1"))) > > + (install-file "docs/wormhole.1" man)) > > + #t))))) > > What does it mean to build them properly? Should anything besides the > man pages be built? In short, it fails like this: ------ make: Entering directory '/tmp/guix-build-magic-wormhole-0.11.2.drv-0/magic-wormhole-0.11.2/docs' Running Sphinx v1.7.7 setup.py:20: DeprecationWarning: 'U' mode is deprecated long_description=open('README.md', 'rU').read(), /gnu/store/b7fqhszxl02g6pfm3vw6b3cjz472qrly-python-3.7.0/lib/python3.7/distutils/dist.py:274: UserWarning: Unknown distribution option: 'long_description_content_type' warnings.warn(msg) Configuration error: There is a programable error in your configuration file: Traceback (most recent call last): File "/gnu/store/q6qyrgr41lqzbray6944l1rs7i6b83kp-python-sphinx-1.7.7/lib/python3.7/site-packages/sphinx/config.py", line 161, in __init__ execfile_(filename, config) File "/gnu/store/q6qyrgr41lqzbray6944l1rs7i6b83kp-python-sphinx-1.7.7/lib/python3.7/site-packages/sphinx/util/pycompat.py", line 150, in execfile_ exec_(code, _globals) File "conf.py", line 70, in version, release = _get_versions() File "conf.py", line 67, in _get_versions short = ".".join(v.split(".")[:2]) TypeError: a bytes-like object is required, not 'str' make: *** [Makefile:20: man] Error 2 make: Leaving directory '/tmp/guix-build-magic-wormhole-0.11.2.drv-0/magic-wormhole-0.11.2/docs' ------ Using the patch under discussion, only a pre-built manual page is installed. There is apparently a build script that uses Sphinx to build a more full set of manual pages, from markdown source files. This documentation would discuss the design and implementation of Magic-Wormhole, and it would be nice to have. With the attached patch, the problem can be reproduced, and I've reported it upstream here: https://github.com/warner/magic-wormhole/issues/321 > > + (native-inputs > > + `(("python-mock" ,python-mock) > > + ;; XXX These are required for the test suite but end up being referenced > > + ;; by the built package. > > + ("magic-wormhole-mailbox-server" ,magic-wormhole-mailbox-server) > > + ("magic-wormhole-transit-relay" ,magic-wormhole-transit-relay))) > > Are they not supposed to be referenced by the built package? > If they are supposed to be used by the built package is it enough to > have them as inputs and not as propagated inputs? In this case they are actually native-inputs, not propagated-inputs. But they still end up on the PYTHONPATHs in the built package, so they are referenced. I don't believe they are used by the magic-wormhole program except in client-server way over the network. They shouldn't need to be part of the closure of magic-wormhole. diff --git a/gnu/packages/magic-wormhole.scm b/gnu/packages/magic-wormhole.scm index 4f8fabd1c5..80e707a3e2 100644 --- a/gnu/packages/magic-wormhole.scm +++ b/gnu/packages/magic-wormhole.scm @@ -117,17 +117,20 @@ together, allowing them to pretend they have a direct connection.") "01fr4bi6kc6fz9n3c4qq892inrc3nf6p2djy65yvm7xkvdxncydf")))) (build-system python-build-system) (arguments - '(#:phases + '(#:tests? #f ; to speed up debugging the documentation build failure + #:phases (modify-phases %standard-phases ;; XXX I can't figure out how to build the docs properly. (add-after 'install 'install-docs (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (man (string-append out "/share/man/man1"))) - (install-file "docs/wormhole.1" man)) - #t))))) + (invoke "make" "-C" "docs" "man") + #t)))))) (native-inputs `(("python-mock" ,python-mock) + ("python-sphinx" ,python-sphinx) + ("python-recommonmark" ,python-recommonmark) ;; XXX These are required for the test suite but end up being referenced ;; by the built package. ("magic-wormhole-mailbox-server" ,magic-wormhole-mailbox-server) @@ -156,3 +159,68 @@ wordlist. The receiving side offers tab-completion on the codewords, so usually only a few characters must be typed. Wormhole codes are single-use and do not need to be memorized.") (license expat))) + +(define-public python-commonmark + (package + (name "python-commonmark") + (version "0.8.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "commonmark" version)) + (sha256 + (base32 + "1130029ykz4jny5sr65zb03lm2xp062k4pmfaapxxrgaw1acijxb")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + ;; have to delete and recreate check? + (delete 'check) + (add-after 'install 'check + ;; inputs and outputs? + (lambda* (#:key inputs outputs #:allow-other-keys) + (add-installed-pythonpath inputs outputs) + (invoke "python" "setup.py" "test")))) + ) + ) + (propagated-inputs + `( + ("python-flake8" ,python-flake8) + ("python-future" ,python-future) + ("python-hypothesis" ,python-hypothesis) + )) + (home-page + "https://github.com/rtfd/CommonMark-py") + (synopsis + "Python parser for the CommonMark Markdown spec") + (description + "Python parser for the CommonMark Markdown spec") + (license bsd-3))) + +(define-public python-recommonmark + (package + (name "python-recommonmark") + (version "0.5.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "recommonmark" version)) + (sha256 + (base32 + "0j5vylbhdddjhc6kj4y9pm8pyf7yy9965kr77bi1m9bia39bh855")))) + (build-system python-build-system) + (arguments + '(#:tests? #f)) ; fail mysteriously... + (propagated-inputs + `(("python-commonmark" ,python-commonmark) + ("python-docutils" ,python-docutils) + ("python-sphinx" ,python-sphinx))) + (home-page + "https://github.com/rtfd/recommonmark") + (synopsis + "A docutils-compatibility bridge to CommonMark, enabling you to write CommonMark inside of Docutils & Sphinx projects.") + (description + "A docutils-compatibility bridge to CommonMark, enabling you to write CommonMark inside of Docutils & Sphinx projects.") + (license expat))) +