bsolomon1124 / pycld3

Python3 bindings for the Compact Language Detector v3 (CLD3)
Apache License 2.0
149 stars 6 forks source link

cld3/pycld3.cpp missing from source list. #24

Closed Ursidaeic closed 3 years ago

Ursidaeic commented 3 years ago

As detailed in this post, when trying to install pycld3 on my windows 10 machine it throws up the following error: c1xx: fatal error C1083: Cannot open source file: 'cld3/pycld3.cpp': No such file or directory

phdru commented 3 years ago

cld3/pycld3.cpp must be included in sdist regardless of presence of Cython at the sdist generation time. If the user lacks Cython cld3/pycld3.cpp will be used instead.

bsolomon1124 commented 3 years ago

Thanks for reporting this and leading me to the StackOverflow question. I'll address this bug today.

bsolomon1124 commented 3 years ago

This issue should be resolved in pycld3 release 0.22.

python3 -m pip install -U pycld3

As @phdru points out, this was an error with the distribution upload in 0.21 that neglected to include the intermediate .cpp file. Inclusion of that file in the sdist should not be dependent on the build-time logic of whether a user has or wants to use Cython.

Note that in the 0.22 release, the installation will respect the environment variable USE_CYTHON=1. You must have an existing install of Cython to use this flag. It will force re-compilation from the source .pyx file. This follows the behavior recommended at Distributing Cython Modules.

0.22 also drops support for end-of-life Python 3.5 and no longer passes the unsupported -std=c++11 on Windows MSVC.

Detail: full changelog from 0.21 to 0.22.

Please let me know if any issues and I will re-open.