#1 Patch for Python 3.7
Merged 4 years ago by churchyard. Opened 4 years ago by dormouse.
rpms/ dormouse/mathgl master  into  master

Patch for Python 3.7
Marcel Plch • 4 years ago  
@@ -0,0 +1,34 @@ 

+ diff -ru mathgl-2.4.1/lang/python3/CMakeLists.txt mathgl-2.4.1_patched/lang/python3/CMakeLists.txt

+ --- mathgl-2.4.1/lang/python3/CMakeLists.txt	2018-07-04 14:53:42.165822142 +0200

+ +++ mathgl-2.4.1_patched/lang/python3/CMakeLists.txt	2018-07-04 14:53:26.941745985 +0200

+ @@ -12,10 +12,10 @@

+  SET_SOURCE_FILES_PROPERTIES(../mathgl.i ../numpy.i PROPERTIES CPLUSPLUS ON)

+  

+  if(enable-python)

+ -	set(Python_ADDITIONAL_VERSIONS 3.6)

+ +	set(Python_ADDITIONAL_VERSIONS 3.7)

+  	unset(PYTHONINTERP_FOUND)

+  	unset(PYTHON_EXECUTABLE CACHE)

+ -	FIND_PACKAGE(PythonInterp 3.6 REQUIRED)

+ +	FIND_PACKAGE(PythonInterp 3.7 REQUIRED)

+  	if(NOT PYTHONINTERP_FOUND)

+  		message(SEND_ERROR "Couldn't find python interpreter.")

+  	endif(NOT PYTHONINTERP_FOUND)

+ @@ -28,7 +28,7 @@

+  	unset(PYTHONLIBS_VERSION_STRING CACHE)

+  	unset(PYTHON_LIBRARY CACHE)

+  	unset(PYTHON_INCLUDE_DIR CACHE)

+ -	FIND_PACKAGE(PythonLibs 3.6)

+ +	FIND_PACKAGE(PythonLibs 3.7)

+  	if(NOT PYTHONLIBS_FOUND)

+  		message(SEND_ERROR "Couldn't find python development libraries.")

+  	endif(NOT PYTHONLIBS_FOUND)

+ @@ -67,7 +67,7 @@

+  

+  	install(FILES ${MathGL2_BINARY_DIR}/lang/python3/mathgl.py DESTINATION ${MGL_PYTHON_SITE_PACKAGES})

+  # harcoded for now. another way is to make glob search on *pyc in __pycache__ dir

+ -	install(FILES ${MathGL2_BINARY_DIR}/lang/python3/__pycache__/mathgl.cpython-36.pyc DESTINATION ${MGL_PYTHON_SITE_PACKAGES}/__pycache__)

+ +	install(FILES ${MathGL2_BINARY_DIR}/lang/python3/__pycache__/mathgl.cpython-37.pyc DESTINATION ${MGL_PYTHON_SITE_PACKAGES}/__pycache__)

+  	install (TARGETS _mathglp3 LIBRARY DESTINATION ${MGL_PYTHON_SITE_PACKAGES})

+  	set(mgl_clean_files ${mgl_clean_files} mathgl.py)

+  endif(enable-python)

file modified
+8 -1
@@ -19,7 +19,7 @@ 

  

  Name:          mathgl

  Version:       2.4.1

- Release:       5%{?dist}

+ Release:       6%{?dist}

  Summary:       Cross-platform library for making high-quality scientific graphics

  Summary(de):   Plattformübergreifende Bibliothek für hochwertige wissenschaftliche Graphiken

  Summary(ru):   Библиотека для осуществления высококачественной визуализации данных
@@ -55,6 +55,9 @@ 

  # Fix overflow (mathgl mailing list, 14/2/18. Fixed upstream

  Patch8:        mathgl-2.4.1-fix_overflow.patch

  

+ # Make mathgl use the 3.7 version of Python

+ Patch9:        mathgl-2.4.1-python37.patch

+ 

  Requires:      %{name}-common = %{version}-%{release}

  

  # mandatory packages
@@ -369,6 +372,7 @@ 

  %patch6 -p1 -b .gcc7

  %patch7 -p1 -b .no_updatedb

  %patch8 -p1 -b .fix_overflow

+ %patch9 -p1 -b .fix_py37

  %if 0%{?with_octave}

  %patch3 -p1 -b .nooctaveinstall

  %else
@@ -685,6 +689,9 @@ 

  %endif

  

  %changelog

+ * Wed Jul 04 2018 Marcel Plch <mplch@redhat.com> - 2.4.1-6

+ - Patch for Python 3.7

+ 

  * Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 2.4.1-5

  - Rebuilt for Python 3.7