cython-hidapi icon indicating copy to clipboard operation
cython-hidapi copied to clipboard

unknown file type '.pxd' on install

Open ace510 opened this issue 1 year ago • 1 comments

Hello! i'm getting an error when I try to install hidapi

#install log

pip install hidapi Collecting hidapi Using cached hidapi-0.14.0.tar.gz (143 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing metadata (pyproject.toml) ... done Requirement already satisfied: setuptools>=19.0 in c:\users\ianclark\appdata\local\programs\python\python313\lib\site-packages (from hidapi) (69.5.1) Building wheels for collected packages: hidapi Building wheel for hidapi (pyproject.toml) ... error error: subprocess-exited-with-error

× Building wheel for hidapi (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [10 lines of output] pip_system_certs: ERROR: could not register module: No module named 'wrapt' running bdist_wheel running build running build_ext C:\Users\ianclark\AppData\Local\Temp\pip-build-env-1q6u8y6x\normal\Lib\site-packages\Cython\Compiler\Main.py:381: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: C:\Users\ianclark\AppData\Local\Temp\pip-install-rq6dlr2y\hidapi_18afd21725d043609f6ad4508ef43ee1\hid.pyx tree = Parsing.p_module(s, pxd, full_module_name) Compiling hid.pyx because it changed. [1/1] Cythonizing hid.pyx building 'hid' extension error: unknown file type '.pxd' (from 'chid.pxd') [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for hidapi Failed to build hidapi ERROR: Could not build wheels for hidapi, which is required to install pyproject.toml-based projects

Cython output

cython --version Cython version 0.29.37

let me know if there's any other information needed to help troubleshoot

ace510 avatar May 10 '24 22:05 ace510

pip --version pip 24.0 from C:\Users\ianclark\AppData\Local\Programs\Python\Python313\Lib\site-packages\pip (python 3.13)

python --version Python 3.13.0a5

ace510 avatar May 10 '24 23:05 ace510

It looks like this package is not compatible with cython3. If you look at how arch linux build the latest version, they move the the reference of "chid.pxd" to a new file with 5cc527e4.patch

https://gitlab.archlinux.org/archlinux/packaging/packages/python-hidapi/-/commit/5b262627d02043b5214d3ad79b3a3ae7c78af91a

Lem avatar Jul 18 '24 13:07 Lem

hidapi 0.14.0.post1 released with the fixes: https://pypi.org/project/hidapi/0.14.0.post1/#files

Let me know if that works for you

prusnak avatar Jul 23 '24 14:07 prusnak