automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Supporting multiple python runtimes with automake


From: Yuval Turgeman
Subject: Re: Supporting multiple python runtimes with automake
Date: Tue, 30 Jan 2018 20:51:23 +0200

Because when I want to package an rpm, I have a single %build and %install
in my spec, so my second call to configure will override the first, and
then i will need to run make install.  So the process would be result in
something like

(from %build)
configure PYTHON=/usr/bin/python2
make
configure PYTHON=/usr/bin/python3
make
(from %install)
make install

which wont work (unless we move make install to %build i guess).  With this
patch, a single configure would nail both pythons, and make install would
install the relevant files to their correct location.

(Please dont mind the syntax here, writing from a smartphone...)

On Tue, Jan 30, 2018 at 5:52 PM, Mathieu Lirzin <address@hidden> wrote:

> Hello,
>
> Yuval Turgeman <address@hidden> writes:
>
> > On Tue, Jan 30, 2018 at 2:22 PM, Sandro Bonazzola <address@hidden>
> > wrote:
> >
> >> 2018-01-30 11:26 GMT+01:00 Yuval Turgeman <address@hidden>:
> >>
> >>> I added 2 macros (AM_PATH_PYTHON2 and AM_PATH_PYTHON3) to support both
> >>> python2 and python3 on the same system.  It works in the same way that
> >>> AM_PATH_PYTHON works (just a small wrapper around it).  Please notice
> that
> >>> AM_PATH_PYTHON and AM_PATH_PYTHONx can't be called together.
> >>>
> >>> The motive for doing this is Fedora Packaging Guidelines for Python (
> >>> https://fedoraproject.org/wiki/Packaging:Python) which requires a
> >>> package to be built for both runtimes.
> >>>
> >>
> >> Are you planning to use this for installing python2 and python3
> artifacts
> >> in a single make install call instead of having to go through 2 runs of
> >> configure / make / make install ?
> >>
> >
> > Yes, the alternative to this is to run everything twice with a different
> > `PYTHON=` value, unless I'm missing something and there's an easier way
> > that would make this patch irrelevant.
>
> Could you explain why re-running the configuration phase with different
> ‘PYTHON’ values does not fit your use-case?
>
> --
> Mathieu Lirzin
> GPG: F2A3 8D7E EB2B 6640 5761  070D 0ADE E100 9460 4D37
>
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]