Hi,
On 10/30/24 12:47, Miro Hrončok via python-devel wrote:
I want to change
that, but I want to consult the API ideas:
1. Allow %pyproject_save_files without arguments
================================================
%pyproject_install
%pyproject_save_files
Simple, easy. Calling %pyproject_save_files without arguments will work
and it will only save the .dist-info for %{pyproject_files}. (This will
allow to use the pyproject RPM declarative BuildSystem without
BuildOption(install) as well.)
Are there any downsides? Even if packages forget to add arguments to
%pyproject_save_files, this will work:
%install
%pyproject_install
%pyproject_save_files
%files -n python3-foo -f %{pyproject_files}
%{python3_sitelib}/foo/
My only worry now is that the "default" behavior of
%pyproject_save_files exists only to accommodate a very niche need.
I'm not the biggest fan of this option. Exactly for the reason you
described: it looks clear and tempting and I suspect this could become a
boilerplate which we'd see in various specfiles in time. If we don't
mind such outcome, then I guess it's alright to make this way.
3. Another +argument
====================
%pyproject_install
%pyproject_save_files +nomodules
We already have +auto, so this would be another +thing. I don't like
this much, but more than 2.
+nomodules is verbose which is a plus. OTOH the other + option is
explicitly forbidden in Fedora, so adding this would mean folks need to
remember that there are some valid and some invalid arguments. Because
of that overhead I'd vote against this approach.
4. Another short option
=======================
%pyproject_install
%pyproject_save_files -M
(The character choice is arbitrary.) We already have -l/-L. This would
be another such option.
I'm in favour of this one. We already have a bunch of, admiteddly,
somewhat cryptic one letter flags, e.g. in %pyproject_buildrequires, so
this is something I'm accustomed to. The meaning of a capital letter is
widely known. It clearly indicates the packager's intention to create
exactly a package without modules and is visible at first glance for any
reader of such spec (as opposed to option 1 which, for an untrained eye,
may be easy to overlook).
--
Karolina Surma (she/her/hers)
Software Engineer
Python Maintenance Team, Red Hat
--
_______________________________________________
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
Do not reply to spam, report it:
https://pagure.io/fedora-infrastructure/new_issue