Bug 2210427 - python-rapidfuzz packages contain pre-generated Cython files
Summary: python-rapidfuzz packages contain pre-generated Cython files
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-rapidfuzz
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Tomáš Hrnčiar
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-05-27 13:35 UTC by Troy Curtis
Modified: 2023-08-02 12:24 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-08-02 12:24:02 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Patch to allow rapidfuzz-2.13.7 to build against Cython 0.29 (21.93 KB, patch)
2023-05-27 13:38 UTC, Troy Curtis
no flags Details | Diff

Description Troy Curtis 2023-05-27 13:35:37 UTC
The python-rapidfuzz package contains pre-generated Cython files [1]. 

❯ find -name "*.cxx" -print -exec head -n 1 '{}' \;
./src/rapidfuzz/distance/_initialize_cpp.cxx
/* Generated by Cython 3.0.0a11 */
./src/rapidfuzz/distance/metrics_cpp.cxx
/* Generated by Cython 3.0.0a11 */
./src/rapidfuzz/fuzz_cpp.cxx
/* Generated by Cython 3.0.0a11 */
./src/rapidfuzz/process_cpp_impl.cxx
/* Generated by Cython 3.0.0a11 */
./src/rapidfuzz/utils_cpp.cxx
/* Generated by Cython 3.0.0a11 */

I only know this because I went through getting this setup for packaging it last December [2], but didn't get reviews and I didn't get around to pleading on devel to swap. I'm glad it is packaged now so I can proceed with my python-Levenshtien upgrade!

The unfortunate thing is the Cython generation requires Cython >3.0.0, which isn't packaged for Fedora yet. I did manage to patch python-rapidfuzz to successfully build and run on 0.29 version packaged in Fedora, I'll attach the patch to the ticket. It is against python-rapidfuzz 2.13.7, so should work fine with the current packaged version, but I haven't looked at the latest releases from upstream yet.


1: https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_using_cython
2: https://bugzilla.redhat.com/show_bug.cgi?id=2156257



Reproducible: Always

Steps to Reproduce:
1. Download and extract the sources then run:

find -name "*.cxx" -print -exec head -n 1 '{}' \;
Actual Results:  
Found pre-generated files

Expected Results:  
No pre-generated files

Comment 1 Troy Curtis 2023-05-27 13:38:11 UTC
Created attachment 1967280 [details]
Patch to allow rapidfuzz-2.13.7 to build against Cython 0.29

This is the patch to get python-rapidfuzz-2.13.7 to build against Cython 0.29.

Comment 2 Tomáš Hrnčiar 2023-06-01 07:11:33 UTC
Hello Troy, 

thank you for opening the bugzilla and proposing the patch. I've opened PR[0] to incorporate your changes into the package. Would you like to help with co-maintaining the package?

[0] https://src.fedoraproject.org/rpms/python-rapidfuzz/pull-request/1

Comment 3 Troy Curtis 2023-06-03 03:14:57 UTC
Sure, I'd be happy to help out. My FAS is troycurtisjr

Comment 4 Tomáš Hrnčiar 2023-06-05 09:19:28 UTC
Thank you, you have commit access now.

Comment 5 Tomas Orsava 2023-08-02 12:24:02 UTC
PR merged, closing.


Note You need to log in before you can comment on or make changes to this bug.