Blame SOURCES/0003-Python3.patch

0c025a
diff -urNp a/configure b/configure
0c025a
--- a/configure	2018-04-17 08:47:58.528284066 +0200
0c025a
+++ b/configure	2018-04-17 10:00:24.091372864 +0200
0c025a
@@ -13406,7 +13406,7 @@ if test "x$pythoncflags" = "x" -o "x$pyt
0c025a
    pythonprog=
0c025a
    if test "x$trypython" != "xno"; then
0c025a
       # Extract the first word of "python", so it can be a program name with args.
0c025a
-set dummy python; ac_word=$2
0c025a
+set dummy python3; ac_word=$2
0c025a
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
0c025a
 $as_echo_n "checking for $ac_word... " >&6; }
0c025a
 if ${ac_cv_path_pythonprog+:} false; then :
0c025a
@@ -13500,12 +13500,12 @@ if test "x$pythonprog" != "x"; then
0c025a
    if test "x$pythonusepthreads" = "x"; then
0c025a
       cat - <<_ACEOF >conftest.py
0c025a
 try:
0c025a
-  import thread
0c025a
+  import threading
0c025a
   print('yes')
0c025a
 except:
0c025a
   print('no')
0c025a
 _ACEOF
0c025a
-      pythonusepthreads=`python conftest.py`
0c025a
+      pythonusepthreads=`python3 conftest.py`
0c025a
       rm -f conftest.py
0c025a
    fi
0c025a
    echo "checking for python threads... $pythonusepthreads"
0c025a
@@ -13537,7 +13537,7 @@ try:
0c025a
 except:
0c025a
   print('no')
0c025a
 _ACEOF
0c025a
-      tkinter=`python conftest.py`
0c025a
+      tkinter=`python3 conftest.py`
0c025a
       rm -f conftest.py
0c025a
    fi
0c025a
 fi
0c025a
diff -urNp a/configure.ac b/configure.ac
0c025a
--- a/configure.ac	2018-04-17 08:47:58.529284062 +0200
0c025a
+++ b/configure.ac	2018-04-17 10:01:02.115576922 +0200
0c025a
@@ -526,7 +526,7 @@ AC_SUBST(PERL_POSIX_SO)
0c025a
 if test "x$pythoncflags" = "x" -o "x$pythoninstalldir" = "x"; then
0c025a
    pythonprog=
0c025a
    if test "x$trypython" != "xno"; then
0c025a
-      AC_PATH_PROG(pythonprog, python)
0c025a
+      AC_PATH_PROG(pythonprog, python3)
0c025a
    fi
0c025a
    if test "x$pythonprog" != "x"; then
0c025a
       # Now find a proper installation location.
0c025a
@@ -578,12 +578,12 @@ if test "x$pythonprog" != "x"; then
0c025a
    if test "x$pythonusepthreads" = "x"; then
0c025a
       cat - <<_ACEOF >conftest.py
0c025a
 try:
0c025a
-  import thread
0c025a
+  import threading
0c025a
   print('yes')
0c025a
 except:
0c025a
   print('no')
0c025a
 _ACEOF
0c025a
-      pythonusepthreads=`python conftest.py`
0c025a
+      pythonusepthreads=`python3 conftest.py`
0c025a
       rm -f conftest.py
0c025a
    fi
0c025a
    echo "checking for python threads... $pythonusepthreads"
0c025a
@@ -615,7 +615,7 @@ try:
0c025a
 except:
0c025a
   print('no')
0c025a
 _ACEOF
0c025a
-      tkinter=`python conftest.py`
0c025a
+      tkinter=`python3 conftest.py`
0c025a
       rm -f conftest.py
0c025a
    fi
0c025a
 fi
0c025a
diff -urNp a/swig/python/Makefile.am b/swig/python/Makefile.am
0c025a
--- a/swig/python/Makefile.am	2018-04-17 08:47:58.547283986 +0200
0c025a
+++ b/swig/python/Makefile.am	2018-04-17 14:43:01.703963727 +0200
0c025a
@@ -22,19 +22,14 @@ EXTRA_DIST = OpenIPMI_lang.i OpenIPMI.h
0c025a
 OpenIPMI.pyc: OpenIPMI.py _OpenIPMI.la
0c025a
 	-PYTHONPATH=$(PYPATH) $(pythonprog) -c 'import OpenIPMI.py'
0c025a
 
0c025a
-OpenIPMI.pyo: OpenIPMI.py _OpenIPMI.la
0c025a
-	-PYTHONPATH=$(PYPATH) $(pythonprog) -O -c 'import OpenIPMI.py'
0c025a
-
0c025a
 OpenIPMI_wrap.c OpenIPMI.py: $(top_srcdir)/swig/OpenIPMI.i OpenIPMI_lang.i
0c025a
	$(SWIG) $(DEFS) -python -o OpenIPMI_wrap.c -I$(top_srcdir)/swig/python $<
0c025a
 
0c025a
-CLEANFILES = OpenIPMI_wrap.c OpenIPMI.py OpenIPMI.pyo OpenIPMI.pyc
0c025a
+CLEANFILES = OpenIPMI_wrap.c OpenIPMI.py
0c025a
 
0c025a
-install-exec-local: _OpenIPMI.la OpenIPMI.py OpenIPMI.pyc OpenIPMI.pyo
0c025a
+install-exec-local: _OpenIPMI.la OpenIPMI.py
0c025a
 	$(INSTALL) -d $(DESTDIR)$(PYTHON_INSTALL_DIR)
0c025a
 	$(INSTALL_DATA) OpenIPMI.py "$(DESTDIR)$(PYTHON_INSTALL_DIR)"
0c025a
-	$(INSTALL_DATA) OpenIPMI.pyc "$(DESTDIR)$(PYTHON_INSTALL_DIR)"
0c025a
-	$(INSTALL_DATA) OpenIPMI.pyo "$(DESTDIR)$(PYTHON_INSTALL_DIR)"
0c025a
 	if test "x$(PYTHON_GUI_DIR)" = "xopenipmigui"; then \
0c025a
 	    $(INSTALL) -d $(DESTDIR)$(bindir); \
0c025a
 	    $(INSTALL_SCRIPT) $(srcdir)/openipmigui.py "$(DESTDIR)$(bindir)/openipmigui";\
0c025a
@@ -43,8 +38,6 @@ install-exec-local: _OpenIPMI.la OpenIPM
0c025a
 uninstall-local:
0c025a
 	$(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(PYTHON_INSTALL_LIB_DIR)/_OpenIPMI.so"
0c025a
 	rm -f "$(DESTDIR)$(PYTHON_INSTALL_DIR)/OpenIPMI.py"
0c025a
-	rm -f "$(DESTDIR)$(PYTHON_INSTALL_DIR)/OpenIPMI.pyc"
0c025a
-	rm -f "$(DESTDIR)$(PYTHON_INSTALL_DIR)/OpenIPMI.pyo"
0c025a
 	rm -f "$(DESTDIR)$(bindir)/openipmigui"
0c025a
 
0c025a
 rungui:
0c025a
diff -urNp a/swig/python/Makefile.in b/swig/python/Makefile.in
0c025a
--- a/swig/python/Makefile.in	2018-04-17 08:47:58.547283986 +0200
0c025a
+++ b/swig/python/Makefile.in	2018-04-17 14:43:28.969899859 +0200
0c025a
@@ -443,7 +443,7 @@ nodist__OpenIPMI_la_SOURCES = OpenIPMI_w
0c025a
 _OpenIPMI_la_LDFLAGS = -module -avoid-version
0c025a
 _OpenIPMI_la_LIBADD = $(OPENIPMI_SWIG_LIBS) $(PYTHON_POSIX_LIB)
0c025a
 EXTRA_DIST = OpenIPMI_lang.i OpenIPMI.h openipmigui.py sample.py sample2.py
0c025a
-CLEANFILES = OpenIPMI_wrap.c OpenIPMI.py OpenIPMI.pyo OpenIPMI.pyc
0c025a
+CLEANFILES = OpenIPMI_wrap.c OpenIPMI.py
0c025a
 all: all-recursive
0c025a
 
0c025a
 .SUFFIXES:
0c025a
@@ -837,20 +837,12 @@ uninstall-am: uninstall-local uninstall-
0c025a
 .PRECIOUS: Makefile
0c025a
 
0c025a
 
0c025a
-OpenIPMI.pyc: OpenIPMI.py _OpenIPMI.la
0c025a
-	-PYTHONPATH=$(PYPATH) $(pythonprog) -c 'import OpenIPMI.py'
0c025a
-
0c025a
-OpenIPMI.pyo: OpenIPMI.py _OpenIPMI.la
0c025a
-	-PYTHONPATH=$(PYPATH) $(pythonprog) -O -c 'import OpenIPMI.py'
0c025a
-
0c025a
 OpenIPMI_wrap.c OpenIPMI.py: $(top_srcdir)/swig/OpenIPMI.i OpenIPMI_lang.i
0c025a
	$(SWIG) $(DEFS) -python -o OpenIPMI_wrap.c -I$(top_srcdir)/swig/python $<
0c025a
 
0c025a
-install-exec-local: _OpenIPMI.la OpenIPMI.py OpenIPMI.pyc OpenIPMI.pyo
0c025a
+install-exec-local: _OpenIPMI.la OpenIPMI.py
0c025a
 	$(INSTALL) -d $(DESTDIR)$(PYTHON_INSTALL_DIR)
0c025a
 	$(INSTALL_DATA) OpenIPMI.py "$(DESTDIR)$(PYTHON_INSTALL_DIR)"
0c025a
-	$(INSTALL_DATA) OpenIPMI.pyc "$(DESTDIR)$(PYTHON_INSTALL_DIR)"
0c025a
-	$(INSTALL_DATA) OpenIPMI.pyo "$(DESTDIR)$(PYTHON_INSTALL_DIR)"
0c025a
 	if test "x$(PYTHON_GUI_DIR)" = "xopenipmigui"; then \
0c025a
 	    $(INSTALL) -d $(DESTDIR)$(bindir); \
0c025a
 	    $(INSTALL_SCRIPT) $(srcdir)/openipmigui.py "$(DESTDIR)$(bindir)/openipmigui";\
0c025a
@@ -859,8 +851,6 @@ install-exec-local: _OpenIPMI.la OpenIPM
0c025a
 uninstall-local:
0c025a
 	$(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(PYTHON_INSTALL_LIB_DIR)/_OpenIPMI.so"
0c025a
 	rm -f "$(DESTDIR)$(PYTHON_INSTALL_DIR)/OpenIPMI.py"
0c025a
-	rm -f "$(DESTDIR)$(PYTHON_INSTALL_DIR)/OpenIPMI.pyc"
0c025a
-	rm -f "$(DESTDIR)$(PYTHON_INSTALL_DIR)/OpenIPMI.pyo"
0c025a
 	rm -f "$(DESTDIR)$(bindir)/openipmigui"
0c025a
 
0c025a
 rungui: