On Wed, Mar 24, 2021 at 12:18 PM Gerhard Sittig <gerhard.sit...@gmx.net>
wrote:

> On Thu, 2020-12-03 at 19:17 +0200, Evangelos Foutras via sigrok-devel
> wrote:
> >
> > This provides some future-proofing against newer Python versions.
> > ---
> >  configure.ac | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/configure.ac b/configure.ac
> > index 2917cb3..f576f2b 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -100,7 +100,7 @@ SR_PKG_CHECK_SUMMARY([srd_pkglibs_summary])
> >  # first, since usually only that variant will add "-lpython3.8".
> >  #
> https://docs.python.org/3/whatsnew/3.8.html#debug-build-uses-the-same-abi-as-release-build
> >  SR_PKG_CHECK([python3], [SRD_PKGLIBS],
> > -     [python-3.9-embed], [python-3.8-embed], [python-3.8 >= 3.8],
> [python-3.7 >= 3.7], [python-3.6 >= 3.6], [python-3.5 >= 3.5], [python-3.4
> >= 3.4], [python-3.3 >= 3.3], [python-3.2 >= 3.2], [python3 >= 3.2])
> > +     [python-3.9-embed], [python-3.8-embed], [python3-embed],
> [python-3.8 >= 3.8], [python-3.7 >= 3.7], [python-3.6 >= 3.6], [python-3.5
> >= 3.5], [python-3.4 >= 3.4], [python-3.3 >= 3.3], [python-3.2 >= 3.2],
> [python3 >= 3.2])
> >  AS_IF([test "x$sr_have_python3" = xno],
> >       [AC_MSG_ERROR([Cannot find Python 3 development headers.])])
>
> Got more information on this approach? A reference to some Python
> project's documentation? Could not find anything useful when I
> searched the 'Net and the python.org site. General embedding but
> nothing on autotools or pkg-config (or my search foo is weak, but
> I'm referring to the python.org references, not stackoverflow or
> the like). Am especially interested in learning what's the Python
> project's preferred and official approach, potential version
> dependency, etc. Or where the sort order originates (3.9 3.8 3
> 3.8 3.7 ... above).
>
> Did see the https://bugs.python.org/issue36721 report but have
> trouble parsing it, or seeing what the outcome is, or where it's
> on record for others to see without sifting throug a lengthy bug
> report discussion. Is there a better document which can be
> referenced?
>

I have hit this issue when building with newer Python versions. It'd be
useful to have the fallback since all Python versions that distinguish
between the embedding and library cases provide python3-embed.pc.

The commit [1] python3.8-embed.pc also introduced a symlink to
python3-embed.pc. This is consistent with the usage described in PEP-394
[2] which recommends that command line tools have a toolX -> toolX.Y
symlink. This PEP doesn't specifically mention pkg-config interactions, but
it does list the script-based tool (pythonX.Y-config) that achieves the
same thing.

Is there any chance we can merge this to avoid constant build issues
whenever there is a new version of Python?

Thanks,
Andreas

[1]
https://github.com/python/cpython/commit/0a8e57248b913851640c64375600f05157c997df
[2] https://www.python.org/dev/peps/pep-0394/
_______________________________________________
sigrok-devel mailing list
sigrok-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to