From 93a9c60e588ce94d6f949124e52454494846bc06 Mon Sep 17 00:00:00 2001 From: Denis Bobrovskiy Date: Thu, 16 Jan 2025 16:46:14 +0000 Subject: [PATCH] Re-generated cython .cpp handler for brute_force_cython_ext.cpp with cython==0.29.34 to avoid the no member 'ob_digit' error as mentioned here: https://github.com/cython/cython/issues/5426, updated README and setup.py accordingly --- README.md | 2 +- .../search/brute_force_cython_ext.cpp | 19 +++---------------- requirements.txt | 2 +- 3 files changed, 5 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 78a69898..a12cf639 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ pip install imagededup ```bash git clone https://github.com/idealo/imagededup.git cd imagededup -pip install "cython>=0.29" +pip install "cython>=0.29.34" python setup.py install ``` diff --git a/imagededup/handlers/search/brute_force_cython_ext.cpp b/imagededup/handlers/search/brute_force_cython_ext.cpp index d74105c0..b6b1045b 100644 --- a/imagededup/handlers/search/brute_force_cython_ext.cpp +++ b/imagededup/handlers/search/brute_force_cython_ext.cpp @@ -4,20 +4,7 @@ { "distutils": { "depends": [ - "imagededup/handlers/search/builtin/builtin.h" - ], - "extra_compile_args": [ - "-O3", - "-march=native", - "-mtune=native", - "-stdlib=libc++" - ], - "extra_link_args": [ - "-O3", - "-march=native", - "-mtune=native", - "-lc++", - "-nodefaultlibs" + "imagededup\\handlers\\search\\builtin\\builtin.h" ], "include_dirs": [ "imagededup/handlers/search" @@ -1004,7 +991,7 @@ static const char *__pyx_filename; static const char *__pyx_f[] = { - "imagededup/handlers/search/brute_force_cython_ext.pyx", + "imagededup\\handlers\\search\\brute_force_cython_ext.pyx", "stringsource", }; @@ -1324,7 +1311,7 @@ static const char __pyx_k_all_filenames[] = "all_filenames"; static const char __pyx_k_query_hash_val[] = "query_hash_val"; static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; static const char __pyx_k_brute_force_cython_ext[] = "brute_force_cython_ext"; -static const char __pyx_k_imagededup_handlers_search_brute[] = "imagededup/handlers/search/brute_force_cython_ext.pyx"; +static const char __pyx_k_imagededup_handlers_search_brute[] = "imagededup\\handlers\\search\\brute_force_cython_ext.pyx"; static PyObject *__pyx_n_s_all_filenames; static PyObject *__pyx_n_s_all_hashes; static PyObject *__pyx_n_s_brute_force_cython_ext; diff --git a/requirements.txt b/requirements.txt index b6692704..d56f0d3a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,4 +7,4 @@ scikit-learn PyWavelets matplotlib # Development dependencies -cython>=0.29 \ No newline at end of file +cython>=0.29.34 \ No newline at end of file