Patch for Python 3.7

This commit is contained in:
Marcel Plch 2018-07-04 18:01:02 +02:00
parent 94c3488a60
commit 00455aeb4a
2 changed files with 42 additions and 1 deletions

View File

@ -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)

View File

@ -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 @@ Patch7: mathgl-2.4.1-no_updatedb.patch
# 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 @@ done
%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 @@ fi
%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