summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/flann/package.py
diff options
context:
space:
mode:
Diffstat (limited to 'var/spack/repos/builtin/packages/flann/package.py')
-rw-r--r--var/spack/repos/builtin/packages/flann/package.py78
1 files changed, 36 insertions, 42 deletions
diff --git a/var/spack/repos/builtin/packages/flann/package.py b/var/spack/repos/builtin/packages/flann/package.py
index 17fbaec932..d1172f9bd8 100644
--- a/var/spack/repos/builtin/packages/flann/package.py
+++ b/var/spack/repos/builtin/packages/flann/package.py
@@ -19,53 +19,53 @@ class Flann(CMakePackage):
"""
homepage = "https://github.com/mariusmuja/flann"
- url = "https://github.com/mariusmuja/flann/archive/1.9.1.tar.gz"
+ url = "https://github.com/mariusmuja/flann/archive/1.9.1.tar.gz"
- version('1.9.1', sha256='b23b5f4e71139faa3bcb39e6bbcc76967fbaf308c4ee9d4f5bfbeceaa76cc5d3')
- version('1.8.5', sha256='59a9925dac0705b281496ae52b5dfd79d6b69316d37015e3d3b38c859bac4f2f')
- version('1.8.4', sha256='ed5843113150b3d6bc4c325fecb51337838a9fc09ad64bdb6aea79d6e610ee13')
- version('1.8.1', sha256='82ff80709ca25365bca3367e87ffb4e0395fab068487314d02271bc3034591c1')
- version('1.8.0', sha256='8a3eef79512870dec20b3a3e481e5e5e6da00d524b810a22ee186f13732f0fa1')
+ version("1.9.1", sha256="b23b5f4e71139faa3bcb39e6bbcc76967fbaf308c4ee9d4f5bfbeceaa76cc5d3")
+ version("1.8.5", sha256="59a9925dac0705b281496ae52b5dfd79d6b69316d37015e3d3b38c859bac4f2f")
+ version("1.8.4", sha256="ed5843113150b3d6bc4c325fecb51337838a9fc09ad64bdb6aea79d6e610ee13")
+ version("1.8.1", sha256="82ff80709ca25365bca3367e87ffb4e0395fab068487314d02271bc3034591c1")
+ version("1.8.0", sha256="8a3eef79512870dec20b3a3e481e5e5e6da00d524b810a22ee186f13732f0fa1")
def url_for_version(self, version):
- if version > Version('1.8.1'):
+ if version > Version("1.8.1"):
return "https://github.com/mariusmuja/flann/archive/{0}.tar.gz".format(version)
else:
return "https://github.com/mariusmuja/flann/archive/{0}-src.tar.gz".format(version)
# Options available in the CMakeLists.txt
# Language bindings
- variant("python", default=False,
- description="Build the Python bindings. "
- "Module: pyflann.")
- extends('python', when='+python')
- variant("matlab", default=False, description="Build the Matlab bindings.")
+ variant("python", default=False, description="Build the Python bindings. " "Module: pyflann.")
+ extends("python", when="+python")
+ variant("matlab", default=False, description="Build the Matlab bindings.")
# default to true for C because it's a C++ library, nothing extra needed
- variant("c", default=True, description="Build the C bindings.")
+ variant("c", default=True, description="Build the C bindings.")
# Must build C bindings for Python / Matlab
conflicts("+python", when="~c")
conflicts("+matlab", when="~c")
# Additional options
- variant("cuda", default=False, description="Build the CUDA library.")
+ variant("cuda", default=False, description="Build the CUDA library.")
variant("examples", default=False, description="Build the examples.")
- variant("doc", default=False, description="Build the documentation.")
- variant("openmp", default=True, description="Use OpenMP multi-threading.")
+ variant("doc", default=False, description="Build the documentation.")
+ variant("openmp", default=True, description="Use OpenMP multi-threading.")
# mpi and hdf5 are the bread and butter of this library, use 'em
- variant("mpi", default=True, description="Use MPI.")
- variant("hdf5", default=True, description="Enable HDF5 support.")
+ variant("mpi", default=True, description="Use MPI.")
+ variant("hdf5", default=True, description="Enable HDF5 support.")
# Dependencies
- extends("python", when="+python")
+ extends("python", when="+python")
depends_on("py-numpy", when="+python", type=("build", "run"))
- depends_on("matlab", when="+matlab", type=("build", "run"))
- depends_on("cuda", when="+cuda")
- depends_on("mpi", when="+mpi")
- depends_on("hdf5", when="+hdf5")
+ depends_on("matlab", when="+matlab", type=("build", "run"))
+ depends_on("cuda", when="+cuda")
+ depends_on("mpi", when="+mpi")
+ depends_on("hdf5", when="+hdf5")
# HDF5_IS_PARALLEL actually comes from hdf5+mpi
# https://github.com/mariusmuja/flann/blob/06a49513138009d19a1f4e0ace67fbff13270c69/CMakeLists.txt#L108-L112
- depends_on("boost+mpi+system+serialization+thread+regex+graph+chrono+exception", when="+mpi ^hdf5+mpi")
+ depends_on(
+ "boost+mpi+system+serialization+thread+regex+graph+chrono+exception", when="+mpi ^hdf5+mpi"
+ )
# Doc deps
depends_on("texlive", when="+doc")
@@ -73,28 +73,24 @@ class Flann(CMakePackage):
# Example uses hdf5.
depends_on("hdf5", when="+examples")
- depends_on('hdf5', type='test')
- depends_on('googletest', type='test')
+ depends_on("hdf5", type="test")
+ depends_on("googletest", type="test")
# See: https://github.com/mariusmuja/flann/issues/369
- patch('linux-gcc-cmakev3.11-plus.patch', when='%gcc^cmake@3.11:')
+ patch("linux-gcc-cmakev3.11-plus.patch", when="%gcc^cmake@3.11:")
def patch(self):
# Fix up the python setup.py call inside the install(CODE
- filter_file("setup.py install",
- 'setup.py --no-user-cfg install --prefix=\\"{0}\\"'.format(
- self.prefix
- ),
- "src/python/CMakeLists.txt")
+ filter_file(
+ "setup.py install",
+ 'setup.py --no-user-cfg install --prefix=\\"{0}\\"'.format(self.prefix),
+ "src/python/CMakeLists.txt",
+ )
# Fix the install location so that spack activate works
- if '+python' in self.spec:
- filter_file("share/flann/python",
- python_platlib,
- "src/python/CMakeLists.txt")
+ if "+python" in self.spec:
+ filter_file("share/flann/python", python_platlib, "src/python/CMakeLists.txt")
# Hack. Don't install setup.py
- filter_file("install( FILES",
- "# install( FILES",
- "src/python/CMakeLists.txt", string=True)
+ filter_file("install( FILES", "# install( FILES", "src/python/CMakeLists.txt", string=True)
def cmake_args(self):
spec = self.spec
@@ -125,8 +121,6 @@ class Flann(CMakePackage):
# Configure the proper python executable
if "+python" in spec:
- args.append(
- "-DPYTHON_EXECUTABLE={0}".format(spec["python"].command.path)
- )
+ args.append("-DPYTHON_EXECUTABLE={0}".format(spec["python"].command.path))
return args