Re: RPM 4.19: Dynamic subpackages with Python extras

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

 



Hi Miro,

On March 31, 2023 10:06:14 AM UTC, "Miro Hrončok" <mhroncok@xxxxxxxxxx> 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
_______________________________________________
packaging mailing list -- packaging@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to packaging-leave@xxxxxxxxxxxxxxxxxxxxxxx
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/packaging@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Forum]     [KDE Users]

  Powered by Linux