Hi Miro,
On March 31, 2023 10:06:14 AM UTC, "Miro Hrončok" <mhroncok(a)redhat.com>
wrote:
On 30. 03. 23 23:55, Miro Hrončok wrote:
> Hello Python packagers.
>
> RPM 4.19 introduces this feature:
>
>
https://rpm-software-management.github.io/rpm/manual/dynamic_specs.html
>
> I decided to write this email to gather my thoughts. I believe that with this, we can
turn manual Python extras subpackages like this:
>
> %package -n python3-...
> Summary: %{summary}
>
> %description -n python3-... %_description
>
> %pyproject_extras_subpkg -n python3-xxx extra1 extra2
>
> (See
https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#Extras for
what that means.)
>
> Into something like this:
>
> %package -n python3-...
> Summary: %{summary}
>
> %description -n python3-... %_description
> ...
>
> %install
> %pyproject_install
> ...
> %pyproject_generate_extras_subpkgs -n python3-xxx
>
>
> The %pyproject_generate_extras_subpkgs macro would parse the installed .dist-info
directory to find out what extras are available and generate subpackages for all of them.
One challenge: When an extra is removed upstream, the packager might not notice that it
needs to be provided/obsole>
That is indeed a problem. What if we made the macro require the list of subpackages (e.g.
as a comma separated string) as an argument? The if the packager wouldn't notice the
removal, they'd get a build error.
Cheers,
Dan