mirror of
https://github.com/OPM/ResInsight.git
synced 2026-09-03 20:53:13 -05:00
Update ecllib from statoil master repo commit a165d636552fa0c0f96219d341f7f2c17c08dc9d
This commit is contained in:
@@ -4,11 +4,17 @@ function(find_python_package_version package)
|
||||
set(PY_VERSION_ACCESSOR "__version__")
|
||||
set(PY_package_name ${package})
|
||||
|
||||
if(${package} MATCHES "PyQt5")
|
||||
set(PY_package_name "PyQt5.Qt")
|
||||
set(PY_VERSION_ACCESSOR "PYQT_VERSION_STR")
|
||||
endif()
|
||||
|
||||
if(${package} MATCHES "PyQt4")
|
||||
set(PY_package_name "PyQt4.Qt")
|
||||
set(PY_VERSION_ACCESSOR "PYQT_VERSION_STR")
|
||||
endif()
|
||||
|
||||
|
||||
execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c" "import os.path; import inspect; import ${PY_package_name} as py_m; print(\"%s;%s\" % (py_m.${PY_VERSION_ACCESSOR} , os.path.dirname(os.path.dirname(inspect.getfile(py_m)))))"
|
||||
RESULT_VARIABLE _${package}_fail# error code 0 if success
|
||||
OUTPUT_VARIABLE stdout_output # major.minor.patch
|
||||
|
||||
Reference in New Issue
Block a user