Skip to content
This repository was archived by the owner on Jun 30, 2025. It is now read-only.
This repository was archived by the owner on Jun 30, 2025. It is now read-only.

editdistance Wheel Fails To Build on Python 3.11 #94

@narolski

Description

@narolski

editdistance==0.6.1 fails to build on Python 3.11:

  Command ['/Users/narolski/Library/Caches/pypoetry/virtualenvs/documentknowledge-DIbTc0Ty-py3.11/bin/python', '-m', 'pip', 'install', '--use-pep517', '--disable-pip-version-check', '--prefix', '/Users/narolski/Library/Caches/pypoetry/virtualenvs/documentknowledge-DIbTc0Ty-py3.11', '--no-deps', '/Users/narolski/Library/Caches/pypoetry/artifacts/28/98/f6/7ed6f4eb639b58674ef44f7011c4dd5b5323046689653ef73f70250466/editdistance-0.6.1.tar.gz'] errored with the following return code 1, and output: 
  Processing /Users/narolski/Library/Caches/pypoetry/artifacts/28/98/f6/7ed6f4eb639b58674ef44f7011c4dd5b5323046689653ef73f70250466/editdistance-0.6.1.tar.gz
    Installing build dependencies: started
    Installing build dependencies: finished with status 'done'
    Getting requirements to build wheel: started
    Getting requirements to build wheel: finished with status 'done'
    Preparing metadata (pyproject.toml): started
    Preparing metadata (pyproject.toml): finished with status 'done'
  Building wheels for collected packages: editdistance
    Building wheel for editdistance (pyproject.toml): started
    Building wheel for editdistance (pyproject.toml): finished with status 'error'
    error: subprocess-exited-with-error
    
    × Building wheel for editdistance (pyproject.toml) did not run successfully.
    │ exit code: 1
    ╰─> [135 lines of output]
        running bdist_wheel
        running build
        running build_py
        creating build
        creating build/lib.macosx-13-arm64-cpython-311
        creating build/lib.macosx-13-arm64-cpython-311/editdistance
        copying editdistance/__init__.py -> build/lib.macosx-13-arm64-cpython-311/editdistance
        copying editdistance/_editdistance.h -> build/lib.macosx-13-arm64-cpython-311/editdistance
        copying editdistance/def.h -> build/lib.macosx-13-arm64-cpython-311/editdistance
        running build_ext
        building 'editdistance.bycython' extension
        creating build/temp.macosx-13-arm64-cpython-311
        creating build/temp.macosx-13-arm64-cpython-311/editdistance
        clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -I./editdistance -I/Users/narolski/Library/Caches/pypoetry/virtualenvs/documentknowledge-DIbTc0Ty-py3.11/include -I/Users/narolski/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c editdistance/_editdistance.cpp -o build/temp.macosx-13-arm64-cpython-311/editdistance/_editdistance.o
        editdistance/_editdistance.cpp:44:26: warning: comparison of integers of different signs: 'int' and 'const unsigned int' [-Wsign-compare]
                for(int r = 0; r <= tmax; ++r) {
                               ~ ^  ~~~~
        editdistance/_editdistance.cpp:70:23: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
            for (int i = 0; i < size2 + 1; i++) d[0][i] = i;
                            ~ ^ ~~~~~~~~~
        editdistance/_editdistance.cpp:71:23: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
            for (int i = 1; i < size1 + 1; i++) {
                            ~ ^ ~~~~~~~~~
        editdistance/_editdistance.cpp:72:27: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
                for (int j = 1; j < size2 + 1; j++) {
                                ~ ^ ~~~~~~~~~
        editdistance/_editdistance.cpp:44:26: warning: comparison of integers of different signs: 'int' and 'const unsigned int' [-Wsign-compare]
                for(int r = 0; r <= tmax; ++r) {
                               ~ ^  ~~~~
        editdistance/_editdistance.cpp:98:12: note: in instantiation of function template specialization 'edit_distance_bpv<std::map<long long, varr<1> >, varr<1> >' requested here
            return edit_distance_bpv<cmap_v, typename cmap_v::mapped_type>(cmap, b, bsize, tmax, tlen);
                   ^
        editdistance/_editdistance.cpp:120:27: note: in instantiation of function template specialization 'edit_distance_map_<1UL>' requested here
            if(vsize == 1) return edit_distance_map_<1>(ap, *asizep, bp, *bsizep);
                                  ^
        editdistance/_editdistance.cpp:44:26: warning: comparison of integers of different signs: 'int' and 'const unsigned int' [-Wsign-compare]
                for(int r = 0; r <= tmax; ++r) {
                               ~ ^  ~~~~
        editdistance/_editdistance.cpp:98:12: note: in instantiation of function template specialization 'edit_distance_bpv<std::map<long long, varr<2> >, varr<2> >' requested here
            return edit_distance_bpv<cmap_v, typename cmap_v::mapped_type>(cmap, b, bsize, tmax, tlen);
                   ^
        editdistance/_editdistance.cpp:121:32: note: in instantiation of function template specialization 'edit_distance_map_<2UL>' requested here
            else if(vsize == 2) return edit_distance_map_<2>(ap, *asizep, bp, *bsizep);
                                       ^
        editdistance/_editdistance.cpp:44:26: warning: comparison of integers of different signs: 'int' and 'const unsigned int' [-Wsign-compare]
                for(int r = 0; r <= tmax; ++r) {
                               ~ ^  ~~~~
        editdistance/_editdistance.cpp:98:12: note: in instantiation of function template specialization 'edit_distance_bpv<std::map<long long, varr<3> >, varr<3> >' requested here
            return edit_distance_bpv<cmap_v, typename cmap_v::mapped_type>(cmap, b, bsize, tmax, tlen);
                   ^
        editdistance/_editdistance.cpp:122:32: note: in instantiation of function template specialization 'edit_distance_map_<3UL>' requested here
            else if(vsize == 3) return edit_distance_map_<3>(ap, *asizep, bp, *bsizep);
                                       ^
        editdistance/_editdistance.cpp:44:26: warning: comparison of integers of different signs: 'int' and 'const unsigned int' [-Wsign-compare]
                for(int r = 0; r <= tmax; ++r) {
                               ~ ^  ~~~~
        editdistance/_editdistance.cpp:98:12: note: in instantiation of function template specialization 'edit_distance_bpv<std::map<long long, varr<4> >, varr<4> >' requested here
            return edit_distance_bpv<cmap_v, typename cmap_v::mapped_type>(cmap, b, bsize, tmax, tlen);
                   ^
        editdistance/_editdistance.cpp:123:32: note: in instantiation of function template specialization 'edit_distance_map_<4UL>' requested here
            else if(vsize == 4) return edit_distance_map_<4>(ap, *asizep, bp, *bsizep);
                                       ^
        editdistance/_editdistance.cpp:44:26: warning: comparison of integers of different signs: 'int' and 'const unsigned int' [-Wsign-compare]
                for(int r = 0; r <= tmax; ++r) {
                               ~ ^  ~~~~
        editdistance/_editdistance.cpp:98:12: note: in instantiation of function template specialization 'edit_distance_bpv<std::map<long long, varr<5> >, varr<5> >' requested here
            return edit_distance_bpv<cmap_v, typename cmap_v::mapped_type>(cmap, b, bsize, tmax, tlen);
                   ^
        editdistance/_editdistance.cpp:124:32: note: in instantiation of function template specialization 'edit_distance_map_<5UL>' requested here
            else if(vsize == 5) return edit_distance_map_<5>(ap, *asizep, bp, *bsizep);
                                       ^
        editdistance/_editdistance.cpp:44:26: warning: comparison of integers of different signs: 'int' and 'const unsigned int' [-Wsign-compare]
                for(int r = 0; r <= tmax; ++r) {
                               ~ ^  ~~~~
        editdistance/_editdistance.cpp:98:12: note: in instantiation of function template specialization 'edit_distance_bpv<std::map<long long, varr<6> >, varr<6> >' requested here
            return edit_distance_bpv<cmap_v, typename cmap_v::mapped_type>(cmap, b, bsize, tmax, tlen);
                   ^
        editdistance/_editdistance.cpp:125:32: note: in instantiation of function template specialization 'edit_distance_map_<6UL>' requested here
            else if(vsize == 6) return edit_distance_map_<6>(ap, *asizep, bp, *bsizep);
                                       ^
        editdistance/_editdistance.cpp:44:26: warning: comparison of integers of different signs: 'int' and 'const unsigned int' [-Wsign-compare]
                for(int r = 0; r <= tmax; ++r) {
                               ~ ^  ~~~~
        editdistance/_editdistance.cpp:98:12: note: in instantiation of function template specialization 'edit_distance_bpv<std::map<long long, varr<7> >, varr<7> >' requested here
            return edit_distance_bpv<cmap_v, typename cmap_v::mapped_type>(cmap, b, bsize, tmax, tlen);
                   ^
        editdistance/_editdistance.cpp:126:32: note: in instantiation of function template specialization 'edit_distance_map_<7UL>' requested here
            else if(vsize == 7) return edit_distance_map_<7>(ap, *asizep, bp, *bsizep);
                                       ^
        editdistance/_editdistance.cpp:44:26: warning: comparison of integers of different signs: 'int' and 'const unsigned int' [-Wsign-compare]
                for(int r = 0; r <= tmax; ++r) {
                               ~ ^  ~~~~
        editdistance/_editdistance.cpp:98:12: note: in instantiation of function template specialization 'edit_distance_bpv<std::map<long long, varr<8> >, varr<8> >' requested here
            return edit_distance_bpv<cmap_v, typename cmap_v::mapped_type>(cmap, b, bsize, tmax, tlen);
                   ^
        editdistance/_editdistance.cpp:127:32: note: in instantiation of function template specialization 'edit_distance_map_<8UL>' requested here
            else if(vsize == 8) return edit_distance_map_<8>(ap, *asizep, bp, *bsizep);
                                       ^
        editdistance/_editdistance.cpp:44:26: warning: comparison of integers of different signs: 'int' and 'const unsigned int' [-Wsign-compare]
                for(int r = 0; r <= tmax; ++r) {
                               ~ ^  ~~~~
        editdistance/_editdistance.cpp:98:12: note: in instantiation of function template specialization 'edit_distance_bpv<std::map<long long, varr<9> >, varr<9> >' requested here
            return edit_distance_bpv<cmap_v, typename cmap_v::mapped_type>(cmap, b, bsize, tmax, tlen);
                   ^
        editdistance/_editdistance.cpp:128:32: note: in instantiation of function template specialization 'edit_distance_map_<9UL>' requested here
            else if(vsize == 9) return edit_distance_map_<9>(ap, *asizep, bp, *bsizep);
                                       ^
        editdistance/_editdistance.cpp:44:26: warning: comparison of integers of different signs: 'int' and 'const unsigned int' [-Wsign-compare]
                for(int r = 0; r <= tmax; ++r) {
                               ~ ^  ~~~~
        editdistance/_editdistance.cpp:98:12: note: in instantiation of function template specialization 'edit_distance_bpv<std::map<long long, varr<10> >, varr<10> >' requested here
            return edit_distance_bpv<cmap_v, typename cmap_v::mapped_type>(cmap, b, bsize, tmax, tlen);
                   ^
        editdistance/_editdistance.cpp:129:33: note: in instantiation of function template specialization 'edit_distance_map_<10UL>' requested here
            else if(vsize == 10) return edit_distance_map_<10>(ap, *asizep, bp, *bsizep);
                                        ^
        editdistance/_editdistance.cpp:70:23: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
            for (int i = 0; i < size2 + 1; i++) d[0][i] = i;
                            ~ ^ ~~~~~~~~~
        editdistance/_editdistance.cpp:130:12: note: in instantiation of function template specialization 'edit_distance_dp<long long>' requested here
            return edit_distance_dp<int64_t>(ap, *asizep, bp, *bsizep);  // dynamic programmingに任せる
                   ^
        editdistance/_editdistance.cpp:71:23: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
            for (int i = 1; i < size1 + 1; i++) {
                            ~ ^ ~~~~~~~~~
        editdistance/_editdistance.cpp:72:27: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
                for (int j = 1; j < size2 + 1; j++) {
                                ~ ^ ~~~~~~~~~
        17 warnings generated.
        clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -I./editdistance -I/Users/narolski/Library/Caches/pypoetry/virtualenvs/documentknowledge-DIbTc0Ty-py3.11/include -I/Users/narolski/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c editdistance/bycython.cpp -o build/temp.macosx-13-arm64-cpython-311/editdistance/bycython.o
        editdistance/bycython.cpp:216:12: fatal error: 'longintrepr.h' file not found
          #include "longintrepr.h"
                   ^~~~~~~~~~~~~~~
        1 error generated.
        error: command '/usr/bin/clang' failed with exit code 1
        [end of output]
    
    note: This error originates from a subprocess, and is likely not a problem with pip.
    ERROR: Failed building wheel for editdistance
  Failed to build editdistance

This issue has been noted to occur for other libraries, as well: aio-libs/aiohttp#6600.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions