Infineon / BlockchainSecurity2Go-Python-Library

Python library for the Blockchain Security 2Go starter kit
https://infineon.com/blockchain
MIT License
16 stars 8 forks source link

Failed to build pyscard #25

Closed gam3t3chelectronicshobbyhouse closed 4 years ago

gam3t3chelectronicshobbyhouse commented 4 years ago

`Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting blocksec2go Downloading https://files.pythonhosted.org/packages/cb/47/be984de8f49f90bde338202ec3c73fb0a3bd34370c2e6e0987be0dacc283/blocksec2go-1.2-py3-none-any.whl Collecting pyscard (from blocksec2go) Downloading https://files.pythonhosted.org/packages/ed/dd/c575bb75122c250cbed3f70440cb8e25582bf991855bb4eb27371fb8d962/pyscard-1.9.9.tar.gz (145kB) 100% |████████████████████████████████| 153kB 1.6MB/s Requirement already satisfied: cryptography in /usr/lib/python3/dist-packages (from blocksec2go) (2.6.1) Building wheels for collected packages: pyscard Running setup.py bdist_wheel for pyscard ... error Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-install-0tfw7sv3/pyscard/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d /tmp/pip-wheel-3bxusnzn --python-tag cp37: running bdist_wheel running build running build_py running build_ext building 'smartcard.scard._scard' extension swigging smartcard/scard/scard.i to smartcard/scard/scard_wrap.c swig -python -outdir smartcard/scard -DPCSCLITE -o smartcard/scard/scard_wrap.c smartcard/scard/scard.i creating build creating build/temp.linux-armv7l-3.7 creating build/temp.linux-armv7l-3.7/smartcard creating build/temp.linux-armv7l-3.7/smartcard/scard arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DVER_PRODUCTVERSION=1,9,9,0000 -DVER_PRODUCTVERSION_STR=1.9.9 -DPCSCLITE=1 -Ismartcard/scard/ -I/usr/include/PCSC -I/usr/local/include/PCSC -I/usr/include/python3.7m -c smartcard/scard/helpers.c -o build/temp.linux-armv7l-3.7/smartcard/scard/helpers.o smartcard/scard/helpers.c:28:10: fatal error: winscard.h: No such file or directory

include

        ^~~~~~~~~~~~

compilation terminated. error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1


Failed building wheel for pyscard Running setup.py clean for pyscard Failed to build pyscard Installing collected packages: pyscard, blocksec2go Running setup.py install for pyscard ... error Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-install-0tfw7sv3/pyscard/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-9uk_rv2o/install-record.txt --single-version-externally-managed --compile: running install running build running build_py running build_ext building 'smartcard.scard._scard' extension swigging smartcard/scard/scard.i to smartcard/scard/scard_wrap.c swig -python -outdir smartcard/scard -DPCSCLITE -o smartcard/scard/scard_wrap.c smartcard/scard/scard.i creating build creating build/temp.linux-armv7l-3.7 creating build/temp.linux-armv7l-3.7/smartcard creating build/temp.linux-armv7l-3.7/smartcard/scard arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DVER_PRODUCTVERSION=1,9,9,0000 -DVER_PRODUCTVERSION_STR=1.9.9 -DPCSCLITE=1 -Ismartcard/scard/ -I/usr/include/PCSC -I/usr/local/include/PCSC -I/usr/include/python3.7m -c smartcard/scard/helpers.c -o build/temp.linux-armv7l-3.7/smartcard/scard/helpers.o smartcard/scard/helpers.c:28:10: fatal error: winscard.h: No such file or directory

include

          ^~~~~~~~~~~~
compilation terminated.
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

----------------------------------------

Command "/usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-install-0tfw7sv3/pyscard/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-9uk_rv2o/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-0tfw7sv3/pyscard/ `

Any info to resolve would be great.

Thanks! :)

gam3t3chelectronicshobbyhouse commented 4 years ago

was resolved with

sudo apt-get install libusb-dev pcscd libpcsclite-dev libccid

cabiamdos commented 2 years ago

In my case my output looks like this: (sudo) pip install pyscard Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting pyscard Downloading https://files.pythonhosted.org/packages/57/aa/aa2610e7929fac90509eecac0f3de1049db07a6c889e3a99008e215cb665/pyscard-2.0.2.tar.gz (149kB) 100% |████████████████████████████████| 153kB 1.4MB/s Building wheels for collected packages: pyscard Running setup.py bdist_wheel for pyscard ... error Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-install-kWzdIx/pyscard/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d /tmp/pip-wheel-zyyaqS --python-tag cp27: running bdist_wheel running build running build_py running build_ext building 'smartcard.scard._scard' extension swigging smartcard/scard/scard.i to smartcard/scard/scard_wrap.c swig -python -outdir smartcard/scard -DPCSCLITE -o smartcard/scard/scard_wrap.c smartcard/scard/scard.i unable to execute 'swig': No such file or directory error: command 'swig' failed with exit status 1


Failed building wheel for pyscard Running setup.py clean for pyscard Failed to build pyscard Installing collected packages: pyscard Running setup.py install for pyscard ... error Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-install-kWzdIx/pyscard/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-IS11n6/install-record.txt --single-version-externally-managed --compile: running install running build running build_py running build_ext building 'smartcard.scard._scard' extension swigging smartcard/scard/scard.i to smartcard/scard/scard_wrap.c swig -python -outdir smartcard/scard -DPCSCLITE -o smartcard/scard/scard_wrap.c smartcard/scard/scard.i unable to execute 'swig': No such file or directory error: command 'swig' failed with exit status 1

----------------------------------------

Command "/usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-install-kWzdIx/pyscard/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-IS11n6/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-kWzdIx/pyscard