Files
mathgl/mathgl-fix-python-module-path.patch
Atri Bhattacharya 22829558de Accepting request 957839 from home:badshah400:branches:science
* Update to version 8.0.1.
* Update mathgl-fix-python-module-path.patch to additionally correct the locations of installed python module files.
* Update shlib naming scheme in keeping with upstream so version changes.
* Build for multiple python versions (while ensuring stuff like docs, etc are only built once -- for the primary flavor).
* Add Requires: libmgl-mpi%{libversion} dependency on -devel package as it is linked to.
* Required version of swig is at least 4.0 to build octave bindings.
* Drop %{name}-rpmlintrc: No longer needed.

OBS-URL: https://build.opensuse.org/request/show/957839
OBS-URL: https://build.opensuse.org/package/show/science/mathgl?expand=0&rev=112
2022-02-26 23:16:46 +00:00

26 lines
1.5 KiB
Diff

Index: mathgl-8.0.1/lang/CMakeLists.txt
===================================================================
--- mathgl-8.0.1.orig/lang/CMakeLists.txt
+++ mathgl-8.0.1/lang/CMakeLists.txt
@@ -39,7 +39,7 @@ if(enable-python)
include_directories(${PYTHON_INCLUDE_DIR} ${NUMPY_INCLUDE_PATH})
execute_process(
- COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib(prefix='${CMAKE_INSTALL_PREFIX}'))"
+ COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib(get_python_lib(1),prefix='${CMAKE_INSTALL_PREFIX}'))"
OUTPUT_VARIABLE MGL_PYTHON_SITE_PACKAGES
OUTPUT_STRIP_TRAILING_WHITESPACE)
set(SWIG_MODULE_mathgl_EXTRA_DEPS numpy.i ${src_imp_dep})
@@ -58,8 +58,9 @@ if(enable-python)
)
add_custom_target(mgl_python_module ALL DEPENDS mathgl mathgl.pyc)
- install(FILES ${MathGL2_BINARY_DIR}/lang/mathgl.py ${MathGL2_BINARY_DIR}/lang/__pycache__/mathgl.cpython-${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}.pyc DESTINATION ${MGL_PYTHON_SITE_PACKAGES}/mathgl/__pycache__)
- install (TARGETS mathgl LIBRARY DESTINATION ${MGL_PYTHON_SITE_PACKAGES}/mathgl)
+ install(FILES ${MathGL2_BINARY_DIR}/lang/__pycache__/mathgl.cpython-${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}.pyc DESTINATION ${MGL_PYTHON_SITE_PACKAGES}/__pycache__)
+ install(FILES ${MathGL2_BINARY_DIR}/lang/mathgl.py DESTINATION ${MGL_PYTHON_SITE_PACKAGES})
+ install(TARGETS mathgl LIBRARY DESTINATION ${MGL_PYTHON_SITE_PACKAGES})
set(mgl_clean_files ${mgl_clean_files} mathgl.py)
endif(enable-python)