diff options
author | Kim Liegeois <kimliegeois@ymail.com> | 2023-06-14 13:41:35 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-14 12:41:35 -0700 |
commit | 1485275d0c62dbebc55657006343e317ab584b4c (patch) | |
tree | 403e3298a2f97be1368f80f920a53a2b5f77a20c /var | |
parent | 1afbf72037f8e76a10f609c41c758f54940fa74a (diff) | |
download | spack-1485275d0c62dbebc55657006343e317ab584b4c.tar.gz spack-1485275d0c62dbebc55657006343e317ab584b4c.tar.bz2 spack-1485275d0c62dbebc55657006343e317ab584b4c.tar.xz spack-1485275d0c62dbebc55657006343e317ab584b4c.zip |
Add Binder spackage (#38371)
* Add Binder spackage
* Format binder recipe
* Format binder recipe
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/binder/package.py | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/binder/package.py b/var/spack/repos/builtin/packages/binder/package.py new file mode 100644 index 0000000000..835541e664 --- /dev/null +++ b/var/spack/repos/builtin/packages/binder/package.py @@ -0,0 +1,54 @@ +# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class Binder(CMakePackage): + """ + Binder is a tool for automatic generation of Python bindings + for C++11 projects using Pybind11 and Clang LibTooling libraries. + That is, Binder, takes a C++ project and compiles it into objects + and functions that are all usable within Python. + Binder is different from prior tools in that it handles special + features new in C++11. + """ + + homepage = "https://github.com/RosettaCommons/binder" + git = "https://github.com/RosettaCommons/binder.git" + + maintainers("lyskov", "kliegeois") + + version("master", branch="master") + version("1.3.0", tag="v1.3.0") + version("1.2.0", tag="v1.2.0") + version("1.1.0", tag="v1.0.0") + version("1.0.0", tag="v1.0.0") + + # Add dependencies + depends_on("llvm+clang+llvm_dylib@7.0:9") + + def cmake_args(self): + spec = self.spec + llvm_dir = spec["llvm"].prefix + clang_dir = spec["llvm"].prefix + options = [] + + options.extend( + [ + "-DLLVM_DIR:FILEPATH={0}".format(llvm_dir), + "-DClang_DIR:FILEPATH={0}".format(clang_dir), + "-DCMAKE_CXX_FLAGS=-Wl,--verbose", + "-DBINDER_ENABLE_TEST=OFF", + ] + ) + return options + + def setup_dependent_package(self, module, dependent_spec): + llvm_dir = self.spec["llvm"].prefix + self.spec.clang_include_dirs = llvm_dir.include + self.spec.LibClang_include_dir = llvm_dir.lib.clang.join( + format(self.spec["llvm"].version) + ).include |