Bug 2226327

Summary: python-shapely: FTBFS in Fedora rawhide/f39
Product: [Fedora] Fedora Reporter: Fedora Release Engineering <releng>
Component: python-shapelyAssignee: Ben Beasley <code>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: code, neuro-sig, sanjay.ankur
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-shapely-2.0.1^20230725giteeb51ad-2.fc39 python-shapely-2.0.2-3.fc40 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-07-26 16:24:01 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2168842    
Attachments:
Description Flags
build.log
none
root.log
none
state.log none

Description Fedora Release Engineering 2023-07-25 19:48:38 UTC
python-shapely failed to build from source in Fedora rawhide/f39

https://koji.fedoraproject.org/koji/taskinfo?taskID=103694384


For details on the mass rebuild see:

https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Please fix python-shapely at your earliest convenience and set the bug's status to
ASSIGNED when you start fixing it. If the bug remains in NEW state for 8 weeks,
python-shapely will be orphaned. Before branching of Fedora 40,
python-shapely will be retired, if it still fails to build.

For more details on the FTBFS policy, please visit:
https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/

Comment 1 Fedora Release Engineering 2023-07-25 19:48:42 UTC
Created attachment 1979365 [details]
build.log

Comment 2 Fedora Release Engineering 2023-07-25 19:48:46 UTC
Created attachment 1979366 [details]
root.log

file root.log too big, will only attach last 32768 bytes

Comment 3 Fedora Release Engineering 2023-07-25 19:48:49 UTC
Created attachment 1979367 [details]
state.log

Comment 4 Ben Beasley 2023-07-25 21:52:19 UTC
This package was broken by GEOS 3.12.0.



=================================== FAILURES ===================================
______________ OperationsTestCase.test_parallel_offset_linestring ______________

self = <tests.test_parallel_offset.OperationsTestCase testMethod=test_parallel_offset_linestring>

    def test_parallel_offset_linestring(self):
        line1 = LineString([(0, 0), (10, 0)])
        left = line1.parallel_offset(5, 'left')
        assert_geometries_equal(left, LineString([(0, 5), (10, 5)]))
        right = line1.parallel_offset(5, 'right')
        assert_geometries_equal(right, LineString([(10, -5), (0, -5)]), normalize=True)
        right = line1.parallel_offset(-5, 'left')
        assert_geometries_equal(right, LineString([(10, -5), (0, -5)]), normalize=True)
        left = line1.parallel_offset(-5, 'right')
        assert_geometries_equal(left, LineString([(0, 5), (10, 5)]))

        # by default, parallel_offset is right-handed
        assert_geometries_equal(line1.parallel_offset(5), right)

        line2 = LineString([(0, 0), (5, 0), (5, -5)])
>       assert_geometries_equal(line2.parallel_offset(2, 'left', resolution=1),
                                LineString([(0, 2), (5, 2), (7, 0), (7, -5)]))
E       AssertionError:
E       Geometries are not equal:
E
E       Not equal to tolerance 1e-07
E        x: array(<LINESTRING (0 2, 5 2, 5.39 1.962, 5.765 1.848, 6.111 1.663, 6.414 1.414, 6....>,
E             dtype=object)
E        y: array(<LINESTRING (0 2, 5 2, 7 0, 7 -5)>, dtype=object)

tests/test_parallel_offset.py:32: AssertionError
=========================== short test summary info ============================
FAILED tests/test_parallel_offset.py::OperationsTestCase::test_parallel_offset_linestring
======== 1 failed, 257 passed, 2 skipped, 3 xfailed, 1 xpassed in 0.81s ========


The error resembles https://github.com/shapely/shapely/issues/1436, although that issue is supposed to be fixed.

A recent GEOS-related change was https://github.com/shapely/shapely/pull/1820.

I need to see if this can be fixed by backporting that PR as a patch, or by packaging a snapshot of the upstream maint-2.0 branch (https://github.com/shapely/shapely/compare/2.0.1...maint-2.0).

Hopefully, upstream will issue a release that is compatible with GEOS 3.12.0 soon: https://github.com/shapely/shapely/issues/1852

Comment 5 Ben Beasley 2023-07-25 21:57:17 UTC
Happily, https://github.com/shapely/shapely/pull/1820.patch applies directly to the 2.0.1 release.

Unhappily, it pertains to a different test and does not fix the test failure we are seeing.

Comment 6 Ben Beasley 2023-07-25 22:22:15 UTC
(In reply to Ben Beasley from comment #4)

> I need to see if this can be fixed by backporting that PR as a patch, or by
> packaging a snapshot of the upstream maint-2.0 branch
> (https://github.com/shapely/shapely/compare/2.0.1...maint-2.0).
> 
> Hopefully, upstream will issue a release that is compatible with GEOS 3.12.0
> soon: https://github.com/shapely/shapely/issues/1852

As of https://github.com/shapely/shapely/commit/092319dd2ab18054c43fac4533db8c475a07fa82, packaging a snapshot of the maint-2.0 branch is not a fix either.

Comment 8 Fedora Update System 2023-07-26 16:21:57 UTC
FEDORA-2023-96773c61a4 has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-96773c61a4

Comment 9 Fedora Update System 2023-07-26 16:24:01 UTC
FEDORA-2023-96773c61a4 has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 10 Fedora Update System 2023-10-24 11:23:39 UTC
FEDORA-2023-be06f68d98 has been submitted as an update to Fedora 40. https://bodhi.fedoraproject.org/updates/FEDORA-2023-be06f68d98

Comment 11 Fedora Update System 2023-10-24 11:25:11 UTC
FEDORA-2023-be06f68d98 has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.