Merge pull request #3491 from akva2/backport_PR_3490
Backport #3490: changed: build python wheels using skbuild
This commit is contained in:
commit
0f25bb7386
5
python/CMakeLists.txt
Normal file
5
python/CMakeLists.txt
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
project(install_python_binding)
|
||||||
|
|
||||||
|
cmake_minimum_required(VERSION 3.15)
|
||||||
|
|
||||||
|
install(CODE "message(\"Dummy install\")")
|
@ -25,7 +25,7 @@ do
|
|||||||
rm -rf $tag
|
rm -rf $tag
|
||||||
fi
|
fi
|
||||||
mkdir $tag && pushd $tag
|
mkdir $tag && pushd $tag
|
||||||
cmake3 -DPYTHON_EXECUTABLE=${python_versions[$tag]} -DBOOST_INCLUDEDIR=/usr/include/boost169 -DBOOST_LIBRARYDIR=/usr/lib64/boost169 -DWITH_NATIVE=0 \
|
cmake -DPYTHON_EXECUTABLE=${python_versions[$tag]} -DBOOST_INCLUDEDIR=/usr/include/boost169 -DBOOST_LIBRARYDIR=/usr/lib64/boost169 -DWITH_NATIVE=0 \
|
||||||
-DOPM_ENABLE_PYTHON=ON -DOPM_PYTHON_PACKAGE_VERSION_TAG=${VERSION_TAG} ..
|
-DOPM_ENABLE_PYTHON=ON -DOPM_PYTHON_PACKAGE_VERSION_TAG=${VERSION_TAG} ..
|
||||||
|
|
||||||
# make step is necessary until the generated ParserKeywords/*.hpp are generated in the Python step
|
# make step is necessary until the generated ParserKeywords/*.hpp are generated in the Python step
|
||||||
|
7
python/pyproject.toml
Normal file
7
python/pyproject.toml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
[build-system]
|
||||||
|
requires= [
|
||||||
|
"setuptools>=42",
|
||||||
|
"scikit-build>=0.13",
|
||||||
|
"cmake>=3.15",
|
||||||
|
"ninja"
|
||||||
|
]
|
@ -8,11 +8,11 @@
|
|||||||
|
|
||||||
yum-config-manager --add-repo \
|
yum-config-manager --add-repo \
|
||||||
https://www.opm-project.org/package/opm.repo
|
https://www.opm-project.org/package/opm.repo
|
||||||
yum install -y cmake3 ccache boost169-devel boost169-static tbb-devel
|
yum install -y ccache boost169-devel boost169-static tbb-devel
|
||||||
yum install -y blas-devel suitesparse-devel dune-common-devel
|
yum install -y blas-devel suitesparse-devel dune-common-devel
|
||||||
|
|
||||||
for python_bin in ${python_versions[*]}
|
for python_bin in ${python_versions[*]}
|
||||||
do
|
do
|
||||||
${python_bin} -m pip install pip --upgrade
|
${python_bin} -m pip install pip --upgrade
|
||||||
${python_bin} -m pip install wheel setuptools twine pytest-runner auditwheel
|
${python_bin} -m pip install wheel setuptools twine pytest-runner auditwheel scikit-build cmake
|
||||||
done
|
done
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
from setuptools import setup
|
from skbuild import setup
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
@ -32,7 +32,6 @@ setup(
|
|||||||
package_data={'opm' : ['$<TARGET_FILE_NAME:opmcommon_python>']},
|
package_data={'opm' : ['$<TARGET_FILE_NAME:opmcommon_python>']},
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
license='Open Source',
|
license='Open Source',
|
||||||
zip_safe=False,
|
|
||||||
test_suite='tests',
|
test_suite='tests',
|
||||||
setup_requires=["pytest-runner", 'setuptools_scm'],
|
setup_requires=["pytest-runner", 'setuptools_scm'],
|
||||||
python_requires='>=3.6',
|
python_requires='>=3.6',
|
||||||
|
Loading…
Reference in New Issue
Block a user