From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id AL/uFYAbdWBoAgEAgWs5BA (envelope-from ) for ; Tue, 13 Apr 2021 06:18:08 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id ACLED4AbdWCTYAAAbx9fmQ (envelope-from ) for ; Tue, 13 Apr 2021 04:18:08 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E2227AB98 for ; Tue, 13 Apr 2021 06:18:07 +0200 (CEST) Received: from localhost ([::1]:40436 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lWAV5-0007fZ-2O for larch@yhetil.org; Tue, 13 Apr 2021 00:18:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57040) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lWAV0-0007e1-7t for guix-patches@gnu.org; Tue, 13 Apr 2021 00:18:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47165) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lWAUz-00064u-W8 for guix-patches@gnu.org; Tue, 13 Apr 2021 00:18:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lWAUz-0004jM-PL for guix-patches@gnu.org; Tue, 13 Apr 2021 00:18:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47741] [PATCH 1/3] gnu: opendht: Add Python bindings, tools. References: <20210413041500.1223-1-maxim.cournoyer@gmail.com> In-Reply-To: <20210413041500.1223-1-maxim.cournoyer@gmail.com> Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 13 Apr 2021 04:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47741 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 47741@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 47741-submit@debbugs.gnu.org id=B47741.161828745018115 (code B ref 47741); Tue, 13 Apr 2021 04:18:01 +0000 Received: (at 47741) by debbugs.gnu.org; 13 Apr 2021 04:17:30 +0000 Received: from localhost ([127.0.0.1]:58705 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lWAUT-0004i7-Sq for submit@debbugs.gnu.org; Tue, 13 Apr 2021 00:17:30 -0400 Received: from mail-qt1-f171.google.com ([209.85.160.171]:47000) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lWAUR-0004hs-GM for 47741@debbugs.gnu.org; Tue, 13 Apr 2021 00:17:28 -0400 Received: by mail-qt1-f171.google.com with SMTP id y2so11761077qtw.13 for <47741@debbugs.gnu.org>; Mon, 12 Apr 2021 21:17:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=tjcgDKaysCTsqq2UEVGi8TFD248kZSPkD9pieNvR94M=; b=GKntYoj7gaQr/KYaE9N4Mi0TfA/uyte06STo/jtNdkaI0uzlOQEtGg9nIicXq7+MJq LIvMzFPG8RKstonkeV1tuDzS4K1/GbvWkI2uD3IU1XLVOkUA3FAZE1BYmp9nqcN91gAi jjiVLAyg4i184RjT3CvEjDKB5ftAx3/69HOTSB3A7kpS6pLIQuJDeiIHIeYhu9f+65yT YOIN5kSGlJpnrghaz/CNDE8To+a5XgA1CT5E2RpSNy6AP2vhs+LN5JcGC9UqMQF088oK JExxpioBFESqgbFtusN4Rtg35V3qVwjiyDaCGoKBeAn9pxdDpTWLDwtPmBCEO2IaovHd Roow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=tjcgDKaysCTsqq2UEVGi8TFD248kZSPkD9pieNvR94M=; b=bgqyOm1rJdsCaWd6pumhJDOjeoolfSKKD1YsBKgeSOWfNReLMmAsvALI5GosDCquwl VteYm+3WnS2gXb/PeItB0DhWZMPYrKi3x0i3aMmzlPVqQGYTu3oifzwIbMV8pppTuDTx dLZmsshfp1yxwcKafbMq6Crmrx1f7ssn4Mul5oou04Rl5uMnmM0at2tPDz+bdcHxDkfi bFASC/nY1vwV3R0q6x+Mxy+mvRJZ0yc3BQgpzR9I4GmiqGnRZgdz21SFYsTBskdRjGVt a3oQy+PalluHqbh5J0JDQi0g1tRg/RCciN8fUgzG0S5ThMh/HKahH77qzU+Om5gSB9by A0tA== X-Gm-Message-State: AOAM530cjFF4kcAONbNHXFtmhoMY/8+hTW90vn1CSiSc9/aQdwsaxUQ0 drdtZW7NDVbmeff0yf6P860V9KcV0mc= X-Google-Smtp-Source: ABdhPJwnZHqR9VzhEaXrUe1VcrsrTrq0XfqlYQm3z99tn6DjTK2lquZWo/m97NsJ29UVERx9Au6H3Q== X-Received: by 2002:ac8:7dce:: with SMTP id c14mr28401005qte.82.1618287441822; Mon, 12 Apr 2021 21:17:21 -0700 (PDT) Received: from localhost.localdomain (dsl-10-128-209.b2b2c.ca. [72.10.128.209]) by smtp.gmail.com with ESMTPSA id w1sm7414074qto.85.2021.04.12.21.17.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Apr 2021 21:17:21 -0700 (PDT) From: Maxim Cournoyer Date: Tue, 13 Apr 2021 00:17:08 -0400 Message-Id: <20210413041710.1708-1-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1618287488; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=tjcgDKaysCTsqq2UEVGi8TFD248kZSPkD9pieNvR94M=; b=KLo104+32mzVvKWQs7FUVa8/v9Ce26g07n9q/zfHMvwZ9CrkYBdSuxt7llUBP8f6bXCP4v 3y2pegtqjB8SRgjBYTPa6UnT8hnXCX0im7gd1IFxKbhtMPQLZ+o+Twy8RvlNQiczTER2WU yaM+JQft7dqxhyhQiYZIL/FKgyXWirDNDcNozLD6LZU4liHxXAs2UgsW17DYD4IKs+Gn1+ k+nWjt6WBlTryJ66lZbc3tztD+B+N8dri4cwOp4jZM/PcSg39P8GGcPbt0ULBaCoC70hF5 TP5Z7XrhmNJ0IS3b7EQ2R5EqAFUy2tFDGVeHaygmllaB2xLsqHSsTPvWUayjaA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1618287488; a=rsa-sha256; cv=none; b=S5b4TiICqLPpYxIsSqn1x0QDG8qo429j56ZGgnGBOUNI19fN0eKPzGTlmidBaM6EfUvicd bROP5MYEDbEHq6639L/WJ22yJoNjsrwH52ZXDWadiQ5xI0a9MpHdCFcEVXBYggF2pkrJhC 8G6+Lbv46yosxQQAtUqyjMfzSPtc/9+btKVfZXgiaf16xTGtrXNjL/9VTHL8RaFOp41nrO Lb3/hT2txDUqYJiOd6q50tMJnO7dA2QQqiPe5KzdFaJcTrTPkunUz5VW4Ii2iZaMjbPx8o 9i+vKzAToYtc3d8LtZYIVpl2t1wTMmsnEK/vRS0dtb0a+hhC+l1HuDuqhqWtiA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=GKntYoj7; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 2.66 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=GKntYoj7; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: E2227AB98 X-Spam-Score: 2.66 X-Migadu-Scanner: scn0.migadu.com X-TUID: W6s3g/Ee9Xdz * gnu/packages/networking.scm (opendht) [outputs]: Add tools and debug outputs. [native-inputs]: Add python and python-cython. [imported-modules, modules, phases]: New arguments. [configure-flags]: Disable static compilation. Enable Python support and the tools. [synopsis]: Update synopsis. [description]: Expound description. --- gnu/packages/networking.scm | 75 ++++++++++++++++++++++++++++++++----- 1 file changed, 66 insertions(+), 9 deletions(-) diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm index baaa9c5707..b3a51c4b82 100644 --- a/gnu/packages/networking.scm +++ b/gnu/packages/networking.scm @@ -3436,6 +3436,7 @@ and targeted primarily for asynchronous processing of HTTP-requests.") (base32 "1wc0f6cnvnlmhxnx64nxqgsx93k4g7ljdaqjl40ml74jg3nqrzcl")))) ;; Since 2.0, the gnu-build-system does not seem to work anymore, upstream bug? + (outputs '("out" "tools" "debug")) (build-system cmake-build-system) (inputs `(("argon2" ,argon2) @@ -3452,23 +3453,79 @@ and targeted primarily for asynchronous processing of HTTP-requests.") `(("autoconf" ,autoconf) ("automake" ,automake) ("pkg-config" ,pkg-config) + ("python" ,python) + ("python-cython" ,python-cython) ("libtool" ,libtool) ("cppunit" ,cppunit))) (arguments - `(#:tests? #f ; Tests require network connection. + `(#:imported-modules ((guix build python-build-system) ;for site-packages + ,@%cmake-build-system-modules) + #:modules (((guix build python-build-system) #:prefix python:) + (guix build cmake-build-system) + (guix build utils)) + #:tests? #f ; Tests require network connection. #:configure-flags - '(;;"-DOPENDHT_TESTS=on" - "-DOPENDHT_TOOLS=off" - "-DOPENDHT_PYTHON=off" + '( ;;"-DOPENDHT_TESTS=on" + "-DOPENDHT_STATIC=off" + "-DOPENDHT_TOOLS=on" + "-DOPENDHT_PYTHON=on" "-DOPENDHT_PROXY_SERVER=on" "-DOPENDHT_PUSH_NOTIFICATIONS=on" "-DOPENDHT_PROXY_SERVER_IDENTITY=on" - "-DOPENDHT_PROXY_CLIENT=on"))) + "-DOPENDHT_PROXY_CLIENT=on") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'fix-python-installation-prefix + ;; Specify the installation prefix for the compiled Python module + ;; that would otherwise attempt to installs itself to Python's own + ;; site-packages directory. + (lambda* (#:key inputs outputs #:allow-other-keys) + (substitute* "python/CMakeLists.txt" + (("--root=\\\\\\$ENV\\{DESTDIR\\}") + (string-append "--root=/ --single-version-externally-managed " + "--prefix=${CMAKE_INSTALL_PREFIX}"))))) + (add-after 'unpack 'specify-runpath-for-python-module + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (substitute* "python/setup.py.in" + (("extra_link_args=\\[(.*)\\]" _ args) + (string-append "extra_link_args=[" args + ", '-Wl,-rpath=" out "/lib']")))))) + (add-after 'install 'move-and-wrap-tools + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (tools (assoc-ref outputs "tools")) + (site-packages (python:site-packages inputs outputs))) + (mkdir tools) + (rename-file (string-append out "/bin") + (string-append tools "/bin")) + (wrap-program (string-append tools "/bin/dhtcluster") + `("PYTHONPATH" prefix (,site-packages))))))))) (home-page "https://github.com/savoirfairelinux/opendht/") - (synopsis "Distributed Hash Table (DHT) library") - (description "OpenDHT is a Distributed Hash Table (DHT) library. It may -be used to manage peer-to-peer network connections as needed for real time -communication.") + (synopsis "Lightweight Distributed Hash Table (DHT) library") + (description "OpenDHT provides an easy to use distributed in-memory data +store. Every node in the network can read and write values to the store. +Values are distributed over the network, with redundancy. It includes the +following features: +@itemize +@item Lightweight and scalable, designed for large networks and small devices; +@item High resilience to network disruption; +@item Public key cryptography layer providing optional data signature and +encryption (using GnuTLS); +@item IPv4 and IPv6 support; +@item Clean and powerful C++14 map API; +@item Bindings for C, Rust & Python 3; +@item REST API with an optional HTTP client and server with push notification +support. +@end itemize +The following tools are also included: +@table @command +@item dhtnode +A command line tool to run a DHT node and perform operations supported by the +library (get, put, etc.) with text values. +@item dhtchat +A very simple IM client working over the DHT. +@end table") (license license:gpl3+))) (define-public frrouting -- 2.31.1