GNU bug report logs -
#17811
RFE: build against multiple python stacks
Previous Next
Reported by: Pavel Raiskup <praiskup <at> redhat.com>
Date: Thu, 19 Jun 2014 12:39:02 UTC
Severity: wishlist
Tags: confirmed
Done: Karl Berry <karl <at> freefriends.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 17811 in the body.
You can then email your comments to 17811 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-automake <at> gnu.org
:
bug#17811
; Package
automake
.
(Thu, 19 Jun 2014 12:39:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Pavel Raiskup <praiskup <at> redhat.com>
:
New bug report received and forwarded. Copy sent to
bug-automake <at> gnu.org
.
(Thu, 19 Jun 2014 12:39:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hello,
I have been playing a little with Python dual-stack build (as a PoC for
long-term filed issue against RH Bugzilla [1]).
Non-tl;dr version of task regarding this RFE:
There is need to build python plugins against both python2 & python3
with autotools easily.
Current status:
Automake supports python_PYTHON/pkgpython_PYTHON variable definition
which uses variables PYTHON/pythondir/pkgpythondir, etc. It caches the
results among multiple AM_PYTHON_PATH calls, etc. Works as expected in
usual cases.
To workaround problems with ${task}, e.g. abrt package handles this its
own way, see [2].
Proposed solution:
Make the _PYTHON primary support namespaces. PoC patch attached. This
allows us to work with python like:
configure.ac:
AM_PATH_PYTHON([2.7])
AM_PATH_PYTHON([3.3],,,3)
Makefile.am:
both_versions = main.py
python_PYTHON = $(both_versions)
python3_PYTHON = $(both_versions) python3_stuff.py
./configure | grep PYTHON
PYTHON the Python interpreter
PYTHON3 the Python3 interpreter
The fourth parameter of AM_PATH_PYTHON is not arbitrarily limited to
numbers or something like that (so we may use more than two python
stacks). The result of this macro is:
$ cat src/Makefile | grep -i ^python
PYTHON = /usr/bin/python
PYTHON3 = /usr/bin/python3
PYTHON3_EXEC_PREFIX = ${exec_prefix}
PYTHON3_PLATFORM = linux
PYTHON3_PREFIX = ${prefix}
...
python_PYTHON = main.py
python3_PYTHON = main2.py
What do you think about that? Could this be way to go? AM_PATH_PYTHON
would stay backward compatible, current testsuite is OK (log attached).
If that was OK, I would prepare more clean patch (not so much $4s in
python.m4 probably) with testsuite & documenation fixes.
[1] https://bugzilla.redhat.com/533920
[2] https://github.com/abrt/abrt/blob/master/configure.ac#L59
Pavel
[multi-python.patch (text/x-patch, attachment)]
[test-suite.log.xz (application/x-xz, attachment)]
Severity set to 'wishlist' from 'normal'
Request was from
Mike Frysinger <vapier <at> gentoo.org>
to
control <at> debbugs.gnu.org
.
(Mon, 21 Feb 2022 00:41:01 GMT)
Full text and
rfc822 format available.
Added tag(s) confirmed.
Request was from
Mike Frysinger <vapier <at> gentoo.org>
to
control <at> debbugs.gnu.org
.
(Mon, 21 Feb 2022 00:41:01 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-automake <at> gnu.org
:
bug#17811
; Package
automake
.
(Mon, 24 Feb 2025 23:48:01 GMT)
Full text and
rfc822 format available.
Message #12 received at 17811 <at> debbugs.gnu.org (full text, mbox):
Hi Pavel - back in 2014 (!), you suggested supporting python2 and python3
simultaneously: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=17811
Essentially by defining a new "python3" primary to sit alongside
"python".
Agreed that this is desirable in general. It's now being discussed in
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=71672
via a somewhat different approach. I'd worry about making python3 a new
primary, since 3 vs. 2 is not the only distinction needed, as has been
discussed.
I'm closing this one to reduce duplication in the bugdb, but feel free
to reply on 71762 or open a new issue if desired. --thanks, karl.
Reply sent
to
Karl Berry <karl <at> freefriends.org>
:
You have taken responsibility.
(Mon, 24 Feb 2025 23:48:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Pavel Raiskup <praiskup <at> redhat.com>
:
bug acknowledged by developer.
(Mon, 24 Feb 2025 23:48:03 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 25 Mar 2025 11:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 21 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.