From patchwork Thu Oct 13 21:04:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Elsing X-Patchwork-Id: 43396 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 E6F9827BBEA; Thu, 13 Oct 2022 22:09:27 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 5729B27BBE9 for ; Thu, 13 Oct 2022 22:09:27 +0100 (BST) Received: from localhost ([::1]:59098 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oj5SI-0007Ff-Gv for patchwork@mira.cbaines.net; Thu, 13 Oct 2022 17:09:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35700) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oj5P7-00033w-54 for guix-patches@gnu.org; Thu, 13 Oct 2022 17:06:10 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36099) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oj5P5-0007VE-N7 for guix-patches@gnu.org; Thu, 13 Oct 2022 17:06:08 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oj5P5-0005nv-Hl for guix-patches@gnu.org; Thu, 13 Oct 2022 17:06:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58261] [PATCH v3 14/15] gnu: Add ringdecomposerlib. Resent-From: David Elsing Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 13 Oct 2022 21:06:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58261 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58261@debbugs.gnu.org Cc: David Elsing Received: via spool by 58261-submit@debbugs.gnu.org id=B58261.166569512322161 (code B ref 58261); Thu, 13 Oct 2022 21:06:07 +0000 Received: (at 58261) by debbugs.gnu.org; 13 Oct 2022 21:05:23 +0000 Received: from localhost ([127.0.0.1]:35163 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oj5OL-0005lG-Lf for submit@debbugs.gnu.org; Thu, 13 Oct 2022 17:05:23 -0400 Received: from mout01.posteo.de ([185.67.36.65]:40577) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oj5O1-0005hn-7G for 58261@debbugs.gnu.org; Thu, 13 Oct 2022 17:05:02 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id B2EAC240027 for <58261@debbugs.gnu.org>; Thu, 13 Oct 2022 23:04:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1665695095; bh=SUL91lVQfctg1CdIhUb8ZqXqO5a/ldR7qqJQ3GZwRSA=; h=From:To:Cc:Subject:Date:From; b=kBVspxtrHTG2LbBUKasUraMJMt+hUZX4BGjffGc6M2/AN24N4qcK2KOvSaqxJbNVo Ws2RAQOiYpXlatB7VeRsc2eWm2MwfN59sWPh1TT0/ML68o38m+xs9Lv7JroOM6CGDR u/7ukL/b2lv00Ib9L0ugG9Jd00qHN1frwHywjOb7zASUEWI3YIou0sm4f6lgVlyESA rciz1NZgnJ/AgPC1DgOSDsFzAqJ375MyPpZsDkP9//uZFhch393zx4OZiuo2mw9tVH jvVcprmO4ff1Epf2zrOcOThBizwEe0kakp3m/UOhNXeqnnJQUgTKouhD/KuPaQy/ba HKx9slXS/feVA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MpMTz2QpKz6tnd; Thu, 13 Oct 2022 23:04:55 +0200 (CEST) From: David Elsing Date: Thu, 13 Oct 2022 21:04:23 +0000 Message-Id: <20221013210424.993-15-david.elsing@posteo.net> In-Reply-To: <20221007152148.32591-1-david.elsing@posteo.net> References: <20221007152148.32591-1-david.elsing@posteo.net> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/chemistry.scm (ringdecomposerlib): New variable. --- gnu/packages/chemistry.scm | 81 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) diff --git a/gnu/packages/chemistry.scm b/gnu/packages/chemistry.scm index 82bc3ae29e..1a80bd1ad5 100644 --- a/gnu/packages/chemistry.scm +++ b/gnu/packages/chemistry.scm @@ -1022,3 +1022,84 @@ (define-public avalon-toolkit canonicalization of SMILES and MOL files, molecular structure fingerprinting and rendering molecules.") (license license:bsd-3))) + +(define-public ringdecomposerlib + (package + (name "ringdecomposerlib") + (version "1.1.3") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/rareylab/RingDecomposerLib") + (commit (string-append "v" version "_rdkit")))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1rxzs2wpkkdi40wdzxc4sn0brk7dm7ivgqyfh38gf2f5c7pbg0wi")))) + (build-system cmake-build-system) + (arguments + (list + #:configure-flags + #~(list "-DBUILD_PYTHON_WRAPPER=ON" + "-DPYTHON_EXECUTABLE=python3" + (string-append "-DPYTHON_FLAGS=;--prefix=" #$output ";--root=/")) + #:imported-modules (append %cmake-build-system-modules + '((guix build python-build-system))) + #:modules '((guix build cmake-build-system) + (guix build utils) + ((guix build python-build-system) + #:select (add-installed-pythonpath))) + #:phases + #~(modify-phases %standard-phases + (add-before 'configure 'patch-cmake + (lambda _ + (substitute* (list "src/Test/CMakeLists.txt" + "src/RingDecomposerLib/CMakeLists.txt") + (("build_.*STATIC") "#")) + (substitute* "test/CMakeLists.txt" + (("STATIC_TEST") "SHARED_TEST")) + ;; Link Python library against shared library + (substitute* "src/python/CMakeLists.txt" + (("RingDecomposerLibStatic") "RingDecomposerLib")) + (substitute* "src/python/setup.py.in" + (("static_libs =.*") "static_libs = []\n") + (("shared_libs\\s*=.*") + (string-append + "shared_libs = ['RingDecomposerLib']")) + (("library_dirs\\s*=\\s*\\[\\]") + "library_dirs = ['${CMAKE_BINARY_DIR}/src/RingDecomposerLib']") + (("extra_objects=.*") + (string-append + "extra_link_args=['-Wl,-rpath=" #$output "/lib'],\n"))))) + (add-after 'build 'build-doc + (lambda _ + ;; Disable redundant LaTeX documentation + (substitute* "../source/documentation/sphinx/conf.py" + (("^(subprocess.*latex|shutil).*") "")) + (substitute* "../source/documentation/doxygen.cfg" + (("GENERATE_LATEX.*YES") "GENERATE_LATEX = NO")) + ;; Build HTML documentation + (invoke "sphinx-build" "-b" "html" + "../source/documentation/sphinx" "html"))) + (add-after 'install 'install-doc + (lambda _ + ;; Not reproducible + (delete-file-recursively "html/.doctrees") + (copy-recursively "html" + (string-append #$output "/share/doc/" + #$name "-" #$version "/html")))) + (delete 'check) + (add-after 'install 'check + (assoc-ref %standard-phases 'check)) + (add-before 'check 'set-pythonpath + (lambda* (#:key inputs outputs #:allow-other-keys) + (add-installed-pythonpath inputs outputs)))))) + (inputs (list python)) + (native-inputs (list doxygen python python-cython python-sphinx)) + (home-page "https://github.com/rareylab/RingDecomposerLib") + (synopsis "Library for calculating ring topology descriptions such as +unique ring families") + (description "ringdecomposerlib is a library for the calculation of +unique ring families, relevant cycles, the smallest set of smallest rings and +other ring topology descriptions.") + (license license:bsd-3)))