Re: Why is python(abi) generated? (Re: Rawhide python-rpm-generators news)

2020-04-07 Thread Miro Hrončok

On 07. 04. 20 14:25, Petr Viktorin wrote:

On 2020-04-07 12:40, Miro Hrončok wrote:

On 07. 04. 20 11:06, Petr Viktorin wrote:

On 2020-04-03 20:44, Miro Hrončok wrote:

Hello Python packagers.

I have just updated python-rpm-generators to python-rpm-generators-11-1.fc33 
in Rawhide. It uses some fresh stuff from RPM 4.16 and will not be 
backported to older releases.



The python(abi) requirement is now added from a RPM Lua macro, instead of by 
executing a Shell script. This is a bit faster especially for packages with 
a lot of files. For 10 000 files in one package, the speedup is roughly from 
~80 to ~2 seconds (time of the entire package build incl. creating the files 
from a Python script). That is a lot, but most of the real packages have 
much less files, so I am afraid you won't feel it.


Hi,
One thing I'm wondering about is: why is python(abi) provided by a generator, 
anyway?
It's provided by a very small set of packages (python2 and python3 in 
Fedora). Couldn't it just be listed in those specfiles?


Just to put this into more context: The time overhead is for the requires. The 
provides are filtered on a certain path and even if we are automating stuff 
for 2 packages which indeed might not be needed, it doesn't really hurt anything.


See also 
https://lists.fedoraproject.org/archives/list/packag...@lists.fedoraproject.org/thread/UFKUM5UKCTNGIT3KJVYEI5VXPI23QMBN/ 
for me trying to figure out when this provides are useful -- depending on the 
answer there, we might want to keep the automated provides of python(abi) only 
and remove the manual ones.


The part I don't get is: why keep the automated provides over manual ones. 
Compared to a line in the relevant spec files, the macro looks like it adds 
complexity for no benefit.


I get the automatic *requires* on python(abi) -- that's used by thousands of 
packages and easy to forget. But the provides will only ever be in CPython.


I see your point and I don't disagree necessarily. I was just trying to provide 
more context.


One reason to keep this is robustness. Once the python(abi) generator is 
enabled, it makes sure that both provides and requires are present.


--
Miro Hrončok
--
Phone: +420777974800
IRC: mhroncok
___
python-devel mailing list -- python-devel@lists.fedoraproject.org
To unsubscribe send an email to python-devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org


Re: Why is python(abi) generated? (Re: Rawhide python-rpm-generators news)

2020-04-07 Thread Neal Gompa
On Tue, Apr 7, 2020 at 8:26 AM Petr Viktorin  wrote:
>
> On 2020-04-07 12:40, Miro Hrončok wrote:
> > On 07. 04. 20 11:06, Petr Viktorin wrote:
> >> On 2020-04-03 20:44, Miro Hrončok wrote:
> >>> Hello Python packagers.
> >>>
> >>> I have just updated python-rpm-generators to
> >>> python-rpm-generators-11-1.fc33 in Rawhide. It uses some fresh stuff
> >>> from RPM 4.16 and will not be backported to older releases.
> >>>
> >>>
> >>> The python(abi) requirement is now added from a RPM Lua macro,
> >>> instead of by executing a Shell script. This is a bit faster
> >>> especially for packages with a lot of files. For 10 000 files in one
> >>> package, the speedup is roughly from ~80 to ~2 seconds (time of the
> >>> entire package build incl. creating the files from a Python script).
> >>> That is a lot, but most of the real packages have much less files, so
> >>> I am afraid you won't feel it.
> >>
> >> Hi,
> >> One thing I'm wondering about is: why is python(abi) provided by a
> >> generator, anyway?
> >> It's provided by a very small set of packages (python2 and python3 in
> >> Fedora). Couldn't it just be listed in those specfiles?
> >
> > Just to put this into more context: The time overhead is for the
> > requires. The provides are filtered on a certain path and even if we are
> > automating stuff for 2 packages which indeed might not be needed, it
> > doesn't really hurt anything.
> >
> > See also
> > https://lists.fedoraproject.org/archives/list/packag...@lists.fedoraproject.org/thread/UFKUM5UKCTNGIT3KJVYEI5VXPI23QMBN/
> > for me trying to figure out when this provides are useful -- depending
> > on the answer there, we might want to keep the automated provides of
> > python(abi) only and remove the manual ones.
>
> The part I don't get is: why keep the automated provides over manual
> ones. Compared to a line in the relevant spec files, the macro looks
> like it adds complexity for no benefit.
>
> I get the automatic *requires* on python(abi) -- that's used by
> thousands of packages and easy to forget. But the provides will only
> ever be in CPython.

I'd use the same argument to get rid of the manual Provides, but the
reason for why they exist in both manual and generated form is simple:
to prevent human error.

There have been cases in the past where the python RPM was being built
in places where generators are disabled or not going to work properly
(e.g. in this multi-python case), then the manual Provides would
ensure things came out as intended. The automatic Provides generation
is used to ensure that if things are using the generator, that
everything is _ensured_ to be consistent. It's a very bad idea to have
generated requires without generated provides, because you cannot
guarantee the names will match up.



-- 
真実はいつも一つ!/ Always, there's only one truth!
___
python-devel mailing list -- python-devel@lists.fedoraproject.org
To unsubscribe send an email to python-devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org


Re: Why is python(abi) generated? (Re: Rawhide python-rpm-generators news)

2020-04-07 Thread Petr Viktorin

On 2020-04-07 12:40, Miro Hrončok wrote:

On 07. 04. 20 11:06, Petr Viktorin wrote:

On 2020-04-03 20:44, Miro Hrončok wrote:

Hello Python packagers.

I have just updated python-rpm-generators to 
python-rpm-generators-11-1.fc33 in Rawhide. It uses some fresh stuff 
from RPM 4.16 and will not be backported to older releases.



The python(abi) requirement is now added from a RPM Lua macro, 
instead of by executing a Shell script. This is a bit faster 
especially for packages with a lot of files. For 10 000 files in one 
package, the speedup is roughly from ~80 to ~2 seconds (time of the 
entire package build incl. creating the files from a Python script). 
That is a lot, but most of the real packages have much less files, so 
I am afraid you won't feel it.


Hi,
One thing I'm wondering about is: why is python(abi) provided by a 
generator, anyway?
It's provided by a very small set of packages (python2 and python3 in 
Fedora). Couldn't it just be listed in those specfiles?


Just to put this into more context: The time overhead is for the 
requires. The provides are filtered on a certain path and even if we are 
automating stuff for 2 packages which indeed might not be needed, it 
doesn't really hurt anything.


See also 
https://lists.fedoraproject.org/archives/list/packag...@lists.fedoraproject.org/thread/UFKUM5UKCTNGIT3KJVYEI5VXPI23QMBN/ 
for me trying to figure out when this provides are useful -- depending 
on the answer there, we might want to keep the automated provides of 
python(abi) only and remove the manual ones.


The part I don't get is: why keep the automated provides over manual 
ones. Compared to a line in the relevant spec files, the macro looks 
like it adds complexity for no benefit.


I get the automatic *requires* on python(abi) -- that's used by 
thousands of packages and easy to forget. But the provides will only 
ever be in CPython.

___
python-devel mailing list -- python-devel@lists.fedoraproject.org
To unsubscribe send an email to python-devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org


Re: Why is python(abi) generated? (Re: Rawhide python-rpm-generators news)

2020-04-07 Thread Miro Hrončok

On 07. 04. 20 11:06, Petr Viktorin wrote:

On 2020-04-03 20:44, Miro Hrončok wrote:

Hello Python packagers.

I have just updated python-rpm-generators to python-rpm-generators-11-1.fc33 
in Rawhide. It uses some fresh stuff from RPM 4.16 and will not be backported 
to older releases.



The python(abi) requirement is now added from a RPM Lua macro, instead of by 
executing a Shell script. This is a bit faster especially for packages with a 
lot of files. For 10 000 files in one package, the speedup is roughly from ~80 
to ~2 seconds (time of the entire package build incl. creating the files from 
a Python script). That is a lot, but most of the real packages have much less 
files, so I am afraid you won't feel it.


Hi,
One thing I'm wondering about is: why is python(abi) provided by a generator, 
anyway?
It's provided by a very small set of packages (python2 and python3 in Fedora). 
Couldn't it just be listed in those specfiles?


Just to put this into more context: The time overhead is for the requires. The 
provides are filtered on a certain path and even if we are automating stuff for 
2 packages which indeed might not be needed, it doesn't really hurt anything.


See also 
https://lists.fedoraproject.org/archives/list/packag...@lists.fedoraproject.org/thread/UFKUM5UKCTNGIT3KJVYEI5VXPI23QMBN/ 
for me trying to figure out when this provides are useful -- depending on the 
answer there, we might want to keep the automated provides of python(abi) only 
and remove the manual ones.


--
Miro Hrončok
--
Phone: +420777974800
IRC: mhroncok
___
python-devel mailing list -- python-devel@lists.fedoraproject.org
To unsubscribe send an email to python-devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org


Re: Why is python(abi) generated? (Re: Rawhide python-rpm-generators news)

2020-04-07 Thread Miro Hrončok

On 07. 04. 20 11:06, Petr Viktorin wrote:

Hi,
One thing I'm wondering about is: why is python(abi) provided by a 
generator, anyway?
It's provided by a very small set of packages (python2 and python3 in 
Fedora). Couldn't it just be listed in those specfiles?


BTW It is redundantly also listed in those specfiles.

--
Miro Hrončok
--
Phone: +420777974800
IRC: mhroncok
___
python-devel mailing list -- python-devel@lists.fedoraproject.org
To unsubscribe send an email to python-devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org


Why is python(abi) generated? (Re: Rawhide python-rpm-generators news)

2020-04-07 Thread Petr Viktorin

On 2020-04-03 20:44, Miro Hrončok wrote:

Hello Python packagers.

I have just updated python-rpm-generators to 
python-rpm-generators-11-1.fc33 in Rawhide. It uses some fresh stuff 
from RPM 4.16 and will not be backported to older releases.



The python(abi) requirement is now added from a RPM Lua macro, instead 
of by executing a Shell script. This is a bit faster especially for 
packages with a lot of files. For 10 000 files in one package, the 
speedup is roughly from ~80 to ~2 seconds (time of the entire package 
build incl. creating the files from a Python script). That is a lot, but 
most of the real packages have much less files, so I am afraid you won't 
feel it.


Hi,
One thing I'm wondering about is: why is python(abi) provided by a 
generator, anyway?
It's provided by a very small set of packages (python2 and python3 in 
Fedora). Couldn't it just be listed in those specfiles?

___
python-devel mailing list -- python-devel@lists.fedoraproject.org
To unsubscribe send an email to python-devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org