tr8lina / rpms / OpenIPMI

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