Commit e5e8377c authored by dedner's avatar dedner Committed by Praetorius, Simon
Browse files

adapt to new python cmake setup

comment out CMP0087 NEW cmake policy because it fails on some CI runners

Fix CI yml file - the 2.7 test will not work anymore
parent 0a1aad4d
......@@ -29,7 +29,6 @@ add_subdirectory(cmake/modules)
# if Python bindings are enabled, include necessary sub directories.
if( DUNE_ENABLE_PYTHONBINDINGS )
add_subdirectory(python)
dune_python_install_package(PATH python)
endif()
# finalize the dune project, e.g. generating config.h etc.
......
add_subdirectory(dune)
configure_file(setup.py.in setup.py)
dune_python_install_package(
PATH "." # relative path containing the package
DEPENDS _vtk
CMAKE_METADATA_FILE dune/vtk/metadata.cmake # metadata file to generate
CMAKE_METADATA_FLAGS DUNE_OPTS_FILE
)
# cmake_policy(SET CMP0087 NEW)
__import__('pkg_resources').declare_namespace(__name__)
......@@ -3,3 +3,6 @@ add_python_targets(vtk
)
dune_add_pybind11_module(NAME _vtk)
set_property(TARGET _vtk PROPERTY LINK_LIBRARIES dunecommon dunegeometry dunegrid dunevtk APPEND)
if(SKBUILD)
install(TARGETS _vtk LIBRARY DESTINATION python/dune/vtk)
endif()
from setuptools import setup, find_packages
pkg = [m for m in "${ProjectPythonRequires}".split(' ') if "dune" not in m]
setup(name="${ProjectName}",
namespace_packages=['dune'],
description="${ProjectDescription}",
version="${ProjectVersionString}",
author="${ProjectAuthor}",
author_email="${ProjectMaintainerEmail}",
packages = find_packages(),
zip_safe = 0,
package_data = {'': ['*.so']},
install_requires = pkg
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment