py-pybind11: use PythonPackage install method (#25650)
This commit is contained in:
parent
5d23638fdc
commit
0015f700b7
@ -8,7 +8,7 @@
|
||||
from spack import *
|
||||
|
||||
|
||||
class PyPybind11(CMakePackage):
|
||||
class PyPybind11(CMakePackage, PythonPackage):
|
||||
"""pybind11 -- Seamless operability between C++11 and Python.
|
||||
|
||||
pybind11 is a lightweight header-only library that exposes C++ types in
|
||||
@ -43,13 +43,13 @@ class PyPybind11(CMakePackage):
|
||||
depends_on('py-setuptools', type='build')
|
||||
depends_on('py-pytest', type='test')
|
||||
|
||||
extends('python')
|
||||
|
||||
# compiler support
|
||||
conflicts('%gcc@:4.7')
|
||||
conflicts('%clang@:3.2')
|
||||
conflicts('%intel@:16')
|
||||
|
||||
build_directory = '.'
|
||||
|
||||
def cmake_args(self):
|
||||
args = []
|
||||
args.append('-DPYTHON_EXECUTABLE:FILEPATH=%s'
|
||||
@ -72,9 +72,8 @@ def patch(self):
|
||||
string=True)
|
||||
|
||||
def install(self, spec, prefix):
|
||||
super(PyPybind11, self).install(spec, prefix)
|
||||
setup_py('install', '--single-version-externally-managed', '--root=/',
|
||||
'--prefix={0}'.format(prefix))
|
||||
CMakePackage.install(self, spec, prefix)
|
||||
PythonPackage.install(self, spec, prefix)
|
||||
|
||||
@run_after('install')
|
||||
@on_package_attributes(run_tests=True)
|
||||
|
Loading…
Reference in New Issue
Block a user