gnu: Add python-tbb.
* gnu/packages/tbb.scm (python-tbb): New variable.
parent
7ce9b7e706
commit
8548ba5847
|
@ -1,5 +1,5 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
|
;;; Copyright © 2015, 2016, 2022 Ricardo Wurmus <rekado@elephly.net>
|
||||||
;;; Copyright © 2016 Nikita <nikita@n0.is>
|
;;; Copyright © 2016 Nikita <nikita@n0.is>
|
||||||
;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr>
|
;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||||
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
|
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
|
||||||
|
@ -23,11 +23,14 @@
|
||||||
(define-module (gnu packages tbb)
|
(define-module (gnu packages tbb)
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
#:use-module (guix licenses)
|
#:use-module (guix licenses)
|
||||||
|
#:use-module (guix gexp)
|
||||||
#:use-module (guix git-download)
|
#:use-module (guix git-download)
|
||||||
#:use-module (guix utils)
|
#:use-module (guix utils)
|
||||||
#:use-module (guix build-system cmake)
|
#:use-module (guix build-system cmake)
|
||||||
#:use-module (guix build-system gnu)
|
#:use-module (guix build-system gnu)
|
||||||
#:use-module (gnu packages))
|
#:use-module (gnu packages)
|
||||||
|
#:use-module (gnu packages python)
|
||||||
|
#:use-module (gnu packages swig))
|
||||||
|
|
||||||
(define-public tbb
|
(define-public tbb
|
||||||
(package
|
(package
|
||||||
|
@ -56,6 +59,44 @@ implementation work. It provides parallel loop constructs, asynchronous
|
||||||
tasks, synchronization primitives, atomic operations, and more.")
|
tasks, synchronization primitives, atomic operations, and more.")
|
||||||
(license asl2.0)))
|
(license asl2.0)))
|
||||||
|
|
||||||
|
(define-public python-tbb
|
||||||
|
(package
|
||||||
|
(inherit tbb)
|
||||||
|
(name "python-tbb")
|
||||||
|
(arguments
|
||||||
|
(list
|
||||||
|
#:configure-flags
|
||||||
|
#~(list "-DTBB_STRICT=OFF"
|
||||||
|
"-DTBB4PY_BUILD=ON")
|
||||||
|
#:phases
|
||||||
|
#~(modify-phases %standard-phases
|
||||||
|
(add-after 'unpack 'patch-python-install-directory
|
||||||
|
(lambda _
|
||||||
|
(substitute* "python/CMakeLists.txt"
|
||||||
|
(("\\$\\{PYTHON_BUILD_WORK_DIR\\}/build")
|
||||||
|
#$output))
|
||||||
|
(substitute* "python/setup.py"
|
||||||
|
(("extra_link_args=tbb_flag,")
|
||||||
|
(string-append "extra_link_args=['-Wl,-rpath="
|
||||||
|
#$(this-package-input "tbb") "/lib"
|
||||||
|
"', '-Wl,-rpath=" #$output "/lib'] + tbb_flag,")))))
|
||||||
|
(replace 'build
|
||||||
|
(lambda _
|
||||||
|
(setenv "PYTHONHASHSEED" "0")
|
||||||
|
(setenv "PYTHONDONTWRITEBYTECODE" "1")
|
||||||
|
(invoke "make" "python_build")))
|
||||||
|
;; The 'build phase already installs the modules
|
||||||
|
(replace 'install
|
||||||
|
(lambda _
|
||||||
|
(with-directory-excursion "python/rml"
|
||||||
|
(invoke "make" "install"))))
|
||||||
|
(replace 'check
|
||||||
|
(lambda* (#:key tests? #:allow-other-keys)
|
||||||
|
(when tests?
|
||||||
|
(invoke "ctest" "-R" "python_test" "--output-on-failure")))))))
|
||||||
|
(inputs (list python tbb))
|
||||||
|
(native-inputs (list swig))))
|
||||||
|
|
||||||
(define-public tbb-2020
|
(define-public tbb-2020
|
||||||
(package
|
(package
|
||||||
(name "tbb")
|
(name "tbb")
|
||||||
|
|
Reference in New Issue