LudovicRousseau / pyscard

pyscard smartcard library for python
http://pyscard.sourceforge.net/
GNU Lesser General Public License v2.1
403 stars 115 forks source link

pipx install pyscard fails on Fedora 41 #218

Closed bocekm closed 1 month ago

bocekm commented 1 month ago

Your system information

Please describe your issue in as much detail as possible:

Installing pyscard using pipx fails.

Steps for reproducing this issue:

  1. $ pipx install pyscard
  2. 
    PIP STDOUT
    ----------
    Collecting pyscard
    Using cached pyscard-2.2.0.tar.gz (154 kB)
    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: pyscard
    Building wheel for pyscard (pyproject.toml): started
    Building wheel for pyscard (pyproject.toml): finished with status 'error'
    Failed to build pyscard

PIP STDERR

error: subprocess-exited-with-error

× Building wheel for pyscard (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [18 lines of output] Package libpcsclite was not found in the pkg-config search path. Perhaps you should add the directory containing `libpcsclite.pc' to the PKG_CONFIG_PATH environment variable Package 'libpcsclite' not found running bdist_wheel running build running build_py running build_ext building 'smartcard.scard._scard' extension swigging src/smartcard/scard/scard.i to src/smartcard/scard/scard_wrap.c swig -python -outdir src/smartcard/scard -DPCSCLITE -o src/smartcard/scard/scard_wrap.c src/smartcard/scard/scard.i creating build/temp.linux-x86_64-cpython-313/src/smartcard/scard gcc -fno-strict-overflow -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -fexceptions -fcf-protection -fexceptions -fcf-protection -fexceptions -fcf-protection -O3 -fPIC -DVER_PRODUCTVERSION=2,2,0,0000 -DVER_PRODUCTVERSION_STR=2.2.0 -DPCSCLITE=1 -Isrc/smartcard/scard/ -I/usr/include/PCSC -I/usr/local/include/PCSC -I/home/mbocek/.local/share/pipx/venvs/pyscard/include -I/usr/include/python3.13 -c src/smartcard/scard/helpers.c -o build/temp.linux-x86_64-cpython-313/src/smartcard/scard/helpers.o src/smartcard/scard/helpers.c:28:10: fatal error: winscard.h: No such file or directory 28 | #include | ^~~~ compilation terminated. error: command '/usr/lib64/ccache/gcc' 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 pyscard ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (pyscard)

bocekm commented 1 month ago

Resolved by installing pcsc-lite-devel ($ sudo dnf install pcsc-lite-devel).