Hi, | On 04/17/2018 08:23 AM, Josef Ridky wrote: | > Hi, | > | > thanks a lot for that! | > | > I have pushed new version to Fedora Rawhide and found, that there should be | > done a little more, due I wasn't able to build it with python3 only. | > So I had to have done following changes (some are Fedora specific, but I | > believe, it could help you with improvement): | | Thanks, there were a few improvement I have taken, and I have some more | comments. | | > 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 : | > @@ -13474,7 +13474,7 @@ fi | > | > $as_echo "#define HAVE_PYTHON /**/" >>confdefs.h | > | > - PYTHON_DIR=python | > + PYTHON_DIR=python3.6 | | This is wrong. This sets the directory under "swig" in that will be | processed. It's put into SUBDIRS in swig/Makefile.am. It has no other | purpose. It's to allow python to be disabled.
You're right, my fault, it's leftover from something, that I have tried before, it shouldn't be there. | > print('yes') | > except: | > print('no') | > _ACEOF | > - pythonusepthreads=`python conftest.py` | > + pythonusepthreads=`python3 conftest.py` | | If the default python on the system is python3, why do you need this | change? | For now, I'd prefer that it use the default python on the system for the | release. This change is really Fedora specific, due we don't have it as expected, that python is link to python3. Right now, you can have python2 and python3 at the same time on system, so we have to refer to proper python version. This type of calling should disappear, when python2 will be dropped from system. | > rm -f conftest.py | > fi | > echo "checking for python threads... $pythonusepthreads" | > 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' | > - | | Yeah, installing the pyc and pyo files is a bad idea. I've removed that. | | > 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 $< | > + $(SWIG) $(DEFS) -python -py3 -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 | > | | You do want the pyo and pyc changed removed by CLEANFILES, though, so | clean works properly. Could be, but these files shouldn't be ever created (in python3 these files are under __pycache__ directory) | | > -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 $< | > + $(SWIG) $(DEFS) -python -py3 -o OpenIPMI_wrap.c | > -I$(top_srcdir)/swig/python $< | | Is the -py3 thing required? It make no difference in the generated C | file. The only thing it | does to the generated python file is add return values to functions. | | I can add this, but I will have to add a version detector and only use | it if python3 is the | default python. I don't think, it is required, but swig has this option for python3, so it could brings some advantage. But if the result is the same with or without this option enabled, it could be omitted. Josef | | -corey | | > | > -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: | > | > | > | > | > Regards | > | > Josef Ridky | > Associate Software Engineer | > Core Services Team | > Red Hat Czech, s.r.o. | > | > ----- Original Message ----- | > | From: "Corey Minyard" <miny...@acm.org> | > | To: openipmi-developer@lists.sourceforge.net | > | Sent: Monday, April 16, 2018 8:48:01 PM | > | Subject: [Openipmi-developer] OpenIPMI-2.0.25 released | > | | > | This function fixes a lot of little issues. | > | | > | The big change is python3 support. That was hard. | > | | > | -corey | > | | > | | > | ------------------------------------------------------------------------------ | > | Check out the vibrant tech community on one of the world's most | > | engaging tech sites, Slashdot.org! http://sdm.link/slashdot | > | _______________________________________________ | > | Openipmi-developer mailing list | > | Openipmi-developer@lists.sourceforge.net | > | https://lists.sourceforge.net/lists/listinfo/openipmi-developer | > | | | | ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Openipmi-developer mailing list Openipmi-developer@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openipmi-developer