Hi, I'm posting another patch to fix searching of /usr/lib64/libpython3.4m.so
See https://bugzilla.redhat.com/show_bug.cgi?id=1144112 Plus it clears out some parts that are not needed and are buggy anyway. Please update generated files accordingly (or remove them from source control). Cheers, Pavel ----- Original Message ----- > From: "W.C.A. Wijngaards" <[email protected]> > To: "Pavel Simerda" <[email protected]> > Sent: Thursday, September 18, 2014 3:33:12 PM > Subject: Re: [Unbound-users] patches to also build with Python 3.x > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi Pavel, > > Thanks! I have committed the two patches. The aclocal.m4 that my > aclocal produces is not changed, but I took the configure.ac and > acx_python updates. (and the .i file updates, of course). > > Best regards, > Wouter > > On 09/17/2014 12:04 PM, Pavel Simerda wrote: > > Hi, > > > > I started working on getting unbound work with Python 3.x and here > > are the first results. With the attached patches, the unbound > > source code still builds with Python 2.x but also builds with > > Python 3.x. > > > > To test it, you need to configure the sources to build all the > > python stuff: > > > > ./configure --with-pythonmodule --with-pyunbound > > > > So far I tested on Gentoo with the exact command above, as > > /usr/bin/python is Python 3.x by default. I also tested it using a > > live Gentoo ebuild[1] and I'm going to build it for Fedora[2] as > > part of the feature to use Python 3.x as the default implementation > > on Fedora[3]. > > > > [1] > > https://github.com/okias/ixit/blob/master/net-dns/unbound/unbound-9999.ebuild > > > > > [2] https://bugzilla.redhat.com/show_bug.cgi?id=1115489 > > [3] https://fedoraproject.org/wiki/Changes/Python_3_as_Default > > > > Note that the two patches represent the minimal changes needed to > > *build* unbound with Python 3.x, that doesn't say whether the > > successful build will also *work* properly, it is just the first > > step for it. Next step will be to identify the issues that arise. > > > > Cheers, > > > > Pavel > > > > > > > > _______________________________________________ Unbound-users > > mailing list [email protected] > > http://unbound.nlnetlabs.nl/mailman/listinfo/unbound-users > > > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1 > > iQIcBAEBAgAGBQJUGt8YAAoJEJ9vHC1+BF+N64wQAKlzhdml/8SH4Zc18EQwmJjg > 3BZ/o4cgpOjqa/e7bTAnZjf4bv7hnJ+gkM1be9H3DvbSyOhw0CTrzGWz8jHsc39B > jZJ2vdthK5H+HcpX6gWFyiM6lHA0dea5KDMwyAyp3MRyRl0zrbVl77AGMRzRQlNn > +ywbJ/b+K02MB1n45bOp5dsFvLSE50MNfhmaPUkyEvSxzoctQ+XtoHGYxB66eD/0 > dWvxQOk32xpjQ8vU0zx9WSduIDe7qeZzXE0p4N7Vv5xaLXKlVtzx2E5YmDYoF2rE > 5oeI8okgEfyGhr1HJknQ2GhKGoSBh0wQKm6KKWBojq2cERnjgA4lOEp6Gym2sDgX > G39Zl72fGihCCsihCrirHtLbaz2tuW/17dEA7EP/BEZLDRnwtuMmQzw1d8UIH0SX > rm020ZvMjQ96a9UDKYmenmJmsEpDRFqMyH7PbAqMMq9wftwlA8aOC5qtVdKcjqfl > W2p8C31uRbEabmWJTEUMeWv9NRLOxe4KYraONgrIb6juYW8I6qn2Max8fRq413qZ > G28apzW13HpYRN8z5s6jnYPRmOsRtQ3kvgRd0FYMyUI2Bn1BYR5KhrdzPujR3g47 > lTKTPxIlWLdWnGFPr0Im6lhwRKChuH6QePeUV1fhnjYz4yEC0r01PJNzLU7bC/WC > nX/C0l9WODk4MTyMLgeE > =Lpk3 > -----END PGP SIGNATURE----- >
commit db79d729b5ee7fc9f3ff0ad599fd9dd68b59192a Author: Pavel Å imerda <[email protected]> Date: Fri Sep 19 11:07:08 2014 +0200 improve python configuration detection to build on Fedora 22 diff --git a/acx_python.m4 b/acx_python.m4 index 8945401..254ff20 100644 --- a/acx_python.m4 +++ b/acx_python.m4 @@ -19,53 +19,6 @@ AC_DEFUN([AC_PYTHON_DEVEL],[ fi # - # Check for a version of Python >= 2.1.0 - # - AC_MSG_CHECKING([for a version of Python >= '2.1.0']) - ac_supports_python_ver=`$PYTHON -c "import sys; \ - ver = sys.version.split()[[0]]; \ - print(ver >= '2.1.0')"` - if test "$ac_supports_python_ver" != "True"; then - if test -z "$PYTHON_NOVERSIONCHECK"; then - AC_MSG_RESULT([no]) - AC_MSG_FAILURE([ -This version of the AC@&t@_PYTHON_DEVEL macro -doesn't work properly with versions of Python before -2.1.0. You may need to re-run configure, setting the -variables PYTHON_CPPFLAGS, PYTHON_LDFLAGS, PYTHON_SITE_PKG, -PYTHON_EXTRA_LIBS and PYTHON_EXTRA_LDFLAGS by hand. -Moreover, to disable this check, set PYTHON_NOVERSIONCHECK -to something else than an empty string. -]) - else - AC_MSG_RESULT([skip at user request]) - fi - else - AC_MSG_RESULT([yes]) - fi - - # - # if the macro parameter ``version'' is set, honour it - # - if test -n "$1"; then - AC_MSG_CHECKING([for a version of Python $1]) - ac_supports_python_ver=`$PYTHON -c "import sys; \ - ver = sys.version.split()[[0]]; \ - print(ver $1)"` - if test "$ac_supports_python_ver" = "True"; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - AC_MSG_ERROR([this package requires Python $1. -If you have it installed, but it isn't the default Python -interpreter in your system path, please pass the PYTHON_VERSION -variable to configure. See ``configure --help'' for reference. -]) - PYTHON_VERSION="" - fi - fi - - # # Check if you have distutils, else fail # AC_MSG_CHECKING([for the distutils Python package]) @@ -100,23 +53,8 @@ $ac_distutils_result]) # AC_MSG_CHECKING([for Python library path]) if test -z "$PYTHON_LDFLAGS"; then - # (makes two attempts to ensure we've got a version number - # from the interpreter) - py_version=`$PYTHON -c "from distutils.sysconfig import *; \ - print(''.join(get_config_vars('VERSION')))"` - if test "$py_version" = "[None]"; then - if test -n "$PYTHON_VERSION"; then - py_version=$PYTHON_VERSION - else - py_version=`$PYTHON -c "import sys; \ - print(sys.version[[:3]])"` - fi - fi - PYTHON_LDFLAGS=`$PYTHON -c "from distutils.sysconfig import *; \ - print('-L' + get_python_lib(0,1) \ - + ' -L' + os.path.dirname(get_python_lib(0,1)) \ - + ' -lpython');"`$py_version + print(get_config_var('BLDLIBRARY'));"` fi AC_MSG_RESULT([$PYTHON_LDFLAGS]) AC_SUBST([PYTHON_LDFLAGS]) @@ -133,30 +71,6 @@ $ac_distutils_result]) AC_SUBST([PYTHON_SITE_PKG]) # - # libraries which must be linked in when embedding - # - AC_MSG_CHECKING(python extra libraries) - if test -z "$PYTHON_EXTRA_LIBS"; then - PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \ - conf = distutils.sysconfig.get_config_var; \ - print(conf('LOCALMODLIBS'), conf('LIBS'))"` - fi - AC_MSG_RESULT([$PYTHON_EXTRA_LIBS]) - AC_SUBST(PYTHON_EXTRA_LIBS) - - # - # linking flags needed when embedding - # - AC_MSG_CHECKING(python extra linking flags) - if test -z "$PYTHON_EXTRA_LDFLAGS"; then - PYTHON_EXTRA_LDFLAGS=`$PYTHON -c "import distutils.sysconfig; \ - conf = distutils.sysconfig.get_config_var; \ - print(conf('LINKFORSHARED'))"` - fi - AC_MSG_RESULT([$PYTHON_EXTRA_LDFLAGS]) - AC_SUBST(PYTHON_EXTRA_LDFLAGS) - - # # final check to see if everything compiles alright # AC_MSG_CHECKING([consistency of all components of python development environment])
_______________________________________________ Unbound-users mailing list [email protected] http://unbound.nlnetlabs.nl/mailman/listinfo/unbound-users
