Skip to content
Snippets Groups Projects
Commit f954a5a1 authored by Andreas Dedner's avatar Andreas Dedner
Browse files

provide a standard setup.py.in since it the same one is used in all modules

parent 37a1f6ad
Branches
Tags
1 merge request!960refactor the way python is used in dune
......@@ -74,9 +74,13 @@ function(dune_python_install_package)
endforeach()
set(PYINST_FULLPATH ${CMAKE_CURRENT_SOURCE_DIR}/${PYINST_PATH})
if(EXISTS ${PYINST_FULLPATH}/setup.py.in)
configure_file(${PYINST_PATH}/setup.py.in ${PYINST_PATH}/setup.py)
set(PYINST_FULLPATH ${CMAKE_CURRENT_BINARY_DIR}/${PYINST_PATH})
if(EXISTS ${PYINST_FULLPATH})
if(EXISTS ${PYINST_FULLPATH}/setup.py.in)
configure_file(${PYINST_PATH}/setup.py.in ${PYINST_PATH}/setup.py)
else()
configure_file(${scriptdir}/setup.py.in ${PYINST_PATH}/setup.py)
endif()
set(PYINST_FULLPATH ${CMAKE_CURRENT_BINARY_DIR}/${PYINST_PATH})
endif()
# Error out if setup.py is missing
......
......@@ -11,6 +11,7 @@ install(FILES
module_library.cc.in
pyversion.py
RunDoxygen.cmake
setup.py.in
sphinx_cmake_dune.py
WritePythonCMakeMetadata.cmake
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/dune/cmake/scripts)
......
from setuptools import setup, find_namespace_packages
pkg = '${RequiredPythonModules}'.replace(';',' ').split(' ')
setup(name="${ProjectName}",
packages=find_namespace_packages(include=['dune.*']),
description="${ProjectDescription}",
version="${ProjectVersionString}",
author="${ProjectAuthor}",
author_email="${ProjectMaintainerEmail}",
zip_safe = 0,
package_data = {'': ['*.so']},
install_requires = pkg,
include_package_data=True,
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment