From patchwork Fri Oct 7 15:22:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Elsing X-Patchwork-Id: 43201 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 8338127BBEA; Fri, 7 Oct 2022 17:16:33 +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=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,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 CBC9C27BBE9 for ; Fri, 7 Oct 2022 17:16:32 +0100 (BST) Received: from localhost ([::1]:50404 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ogq1X-0001Yl-UR for patchwork@mira.cbaines.net; Fri, 07 Oct 2022 12:16:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57160) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogpBq-0002ey-W9 for guix-patches@gnu.org; Fri, 07 Oct 2022 11:23:07 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:38118) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ogpBq-0005r4-Nh for guix-patches@gnu.org; Fri, 07 Oct 2022 11:23:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ogpBq-0005pC-J5 for guix-patches@gnu.org; Fri, 07 Oct 2022 11:23:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58261] [PATCH v2 12/13] gnu: Add ringdecomposerlib. Resent-From: David Elsing Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 07 Oct 2022 15:23:06 +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.166515616022246 (code B ref 58261); Fri, 07 Oct 2022 15:23:06 +0000 Received: (at 58261) by debbugs.gnu.org; 7 Oct 2022 15:22:40 +0000 Received: from localhost ([127.0.0.1]:37181 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogpBP-0005mk-SS for submit@debbugs.gnu.org; Fri, 07 Oct 2022 11:22:40 -0400 Received: from mout02.posteo.de ([185.67.36.66]:36595) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogpBO-0005lp-0M for 58261@debbugs.gnu.org; Fri, 07 Oct 2022 11:22:38 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 7418E240104 for <58261@debbugs.gnu.org>; Fri, 7 Oct 2022 17:22:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1665156152; bh=xvgASLRbXDSfjtdTbobV4JS9ZDc96rJe/74SX55eKkk=; h=From:To:Cc:Subject:Date:From; b=qG4wzsmenGmdG1DPTytmwLNp24CcSd10RZNI4I+HThLBoBpm7O4h5XI8V0cc8AQGU gtPYMqYs04JCiH+CeLq2pJSpMG6JsRmoQfYWA5euZOZCJ1bPeNazaUojS4ERzGrBu3 sfT9IQETHXWX6bVnC5iMCvtpqBs6FE+IgDShACC4vN3dj0ukWujKwFgjK/VZFknHIZ 5namZvqreklsK+TAaWT+7I1FNffZNtJ5Z3zStUj6/lso8+q21lE9xLqQs2KcXIZ2gr R7fSreNpOBhJ58UhUTGVxORK7txpg5MLtMZFxwt50vjLcil9hTr1a+qKcpZ7Xav18G z0ThcYqlXtcJg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MkX9g6zBGz9rxP; Fri, 7 Oct 2022 17:22:31 +0200 (CEST) From: David Elsing Date: Fri, 7 Oct 2022 15:22:25 +0000 Message-Id: <20221007152226.362-1-david.elsing@posteo.net> In-Reply-To: References: 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 | 80 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/gnu/packages/chemistry.scm b/gnu/packages/chemistry.scm index e52dd2f3b6..43953238cd 100644 --- a/gnu/packages/chemistry.scm +++ b/gnu/packages/chemistry.scm @@ -1021,3 +1021,83 @@ (define-public avalontoolkit 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)))