Bug 32874

Summary: upgrade/update python-orange-canvas-core and switch to pyproject
Product: Mageia Reporter: Aurelian R <arusanu>
Component: RPM PackagesAssignee: Mageia Bug Squad <bugsquad>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Normal CC: jani.valimaa
Version: Cauldron   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: python-orange-canvas-core-1.2.0.mga9.src.rpm CVE:
Status comment:
Attachments: python orange-canvas-core spec patch
spec for pypi bson
spec patch for requests-cache

Description Aurelian R 2024-02-20 22:01:04 CET
Created attachment 14402 [details]
python orange-canvas-core spec patch

orange-canvas-core could be updated to 2.0.0 and its spec file switched to pyproject format.

N.B. Importing orange-canvas-core module or running its tests would need a fork of pymongo bson module (https://pypi.org/project/bson/). I will upload also a spec for it, just for completeness,  but the project seems dead/stalled.
Comment 1 Aurelian R 2024-02-20 22:08:02 CET
Created attachment 14403 [details]
spec for pypi bson
Comment 2 Aurelian R 2024-02-21 00:29:42 CET
Created attachment 14406 [details]
spec patch for requests-cache

I forgot that requests-cache need an update also.
Comment 3 Jani Välimaa 2024-02-21 13:54:59 CET
Thanks for the patches. I've updated requests-cache partially based on the patch from comment 2.

FYI, the idea of %generate_buildrequires step is to pull BRs automatic during the build without a need to list python module BRs in .spec. There might be some special cases where BRs needs to be added manually, though.

I've updated and modified pymongo a little bit to add pydist() provides. Thus we don't need to import separate bson module.

CC: (none) => jani.valimaa

Comment 4 Aurelian R 2024-02-21 15:50:40 CET
(In reply to Jani Välimaa from comment #3)
> FYI, the idea of %generate_buildrequires step is to pull BRs automatic
> during the build without a need to list python module BRs in .spec. There
> might be some special cases where BRs needs to be added manually, though.

Yep, I've realized that and it is quite a clever and convenient thing to do :). However, as you may have noticed in my patches I try to have the %pyproject_check_import enabled and if possible/reasonable the self testing of the module.
The check for importing of module usually asks for more than the basic requirements and this, I think, may also help with figuring out the Requires/Recommends for the package, at least for more complex packages.

> I've updated and modified pymongo a little bit to add pydist() provides.
> Thus we don't need to import separate bson module.

I also don't think forked bson is needed for Mageia.
However, the forked bson version mentioned has a feature that's not available in pymongo's bson and because of that and the old version of requests-cache the self tests of open-canvas fails. If those are satisfied then the open-canvas self testing is successful.

Regards
Comment 5 Aurelian R 2024-02-21 16:28:07 CET
This "%pyproject_extras_subpkg" in your "requests-cache" spec is neat.
:)
Comment 6 Aurelian R 2024-02-21 17:50:02 CET
David fixed it.

Resolution: (none) => FIXED
Status: NEW => RESOLVED