Marcin Sobczyk <[email protected]> writes:

> I've posted a series of patches:
> https://gerrit.ovirt.org/#/q/topic:py3-rpm-packages+(status:open+OR+status:merged)
>
> They do a couple of things:
>
>  * add an '--enable-python3-build' argument to 'autogen.sh'
>  * modify 'Makefile.am' so it uses either 'vdsm.spec.in' or
>    'vdsm-py3.spec.in' file to build RPMs
>  * preserve the 'vdsm.spec[.in]' filename in dist archives for both py2
>    and py3 packaging
>  * fix shebang lines in a dist-hook, so that py3 packages will contain
>    only '#!/usr/bin/python3' shebangs
>  * prepare the CI for building py3 packages on fc28

Hi Marcin, cool, thank you!

> So actually, if we replace the dummy 'vdsm-py3.spec.in' file in
> https://gerrit.ovirt.org/#/c/98119/ with something useful (be it the
> nasty, hacky one, or the shiny, new one), we're ready to build py3
> packages.

I've made a dirty one: https://gerrit.ovirt.org/98150 (you can simply
cherry pick the to wherever you need).

However, it doesn't work, it's still built with Python 2 on my Fedora
28.  I can see a lot of warning such as

  DEPRECATION WARNING: python2 invoked with /usr/bin/python.
      Use /usr/bin/python3 or /usr/bin/python2
      /usr/bin/python will be removed or switched to Python 3 in the future.

I can see that configure.ac in your patches still uses Python 2.  Here
is what I used in my private hacks to change that.  Something similar
should be done, depending on --enable-python3-build presence, and with
properly detected Python versions.

Would you like to make the necessary changes or should I make them
myself?

modified   configure.ac
@@ -48,7 +48,7 @@ AM_INIT_AUTOMAKE([-Wno-portability])
 
 # Checking for build tools
 AC_PROG_LN_S
-AM_PATH_PYTHON([2.6])
+AM_PATH_PYTHON([3.6])
 
 AC_ARG_ENABLE(
     [hooks],
@@ -349,13 +349,13 @@ if test "$PYTHON3_SUPPORT" = "1"; then
 fi
 
 # Checking for python-devel
-AC_PATH_PROG([PYTHON_CONFIG], [python-config])
+AC_PATH_PROG([PYTHON_CONFIG], [python3-config])
 if test "x$PYTHON_CONFIG" = "x"; then
-  AC_MSG_ERROR([python-devel not found, please install it.])
+  AC_MSG_ERROR([python3-devel not found, please install it.])
 fi
 
 # Checking for python modules (sorted, please keep in order)
-AX_PYTHON_MODULE([six], [fatal], python2)
+AX_PYTHON_MODULE([six], [fatal], python3)
 
 # External programs (sorted, please keep in order)
 AC_PATH_PROG([CAT_PATH], [cat], [/bin/cat])
_______________________________________________
Devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/[email protected]/message/6J5CUSUP5S4F2ACULYPDQ35L6PIXCOCC/

Reply via email to