LudovicRousseau / pyscard

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

pyscard not compatible with macOS App Store #90

Closed dagheyman closed 4 years ago

dagheyman commented 4 years ago

Apple is moving away from 32-bit support, (see https://support.apple.com/en-us/HT2084360), and pure 32bit binaries will not run on the latest version (10.15) of macOS.

In addition to that, only pure 64-bit libraries are allowed in the macOS App Store. Trying to submit an app containing pyscard, which I believe is built as an universal binary, results in an error similar to this:

ERROR ITMS-90240: "Unsupported Architectures. Your executable contained the following disallowed architectures: 

com.yubico.yubioath.pkg/Payload/Yubico Authenticator.app/Contents/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/smartcard/scard/_scard.cpython-37m-darwin.so)]'. 

New apps submitted to the Mac App Store must support 64-bit starting January 2018, and Mac app updates and existing apps must support 64-bit starting June 2018."

Removing the '-arch', 'i386' in setup.py and rebuilding the package from source seems to resolve this, and makes it possible to use pyscard in the app store.

Would you consider a patch that changes this for all new versions of macOS or similar?

LudovicRousseau commented 4 years ago

Good idea. Maybe I could also remove -arch x86_64 as well and only build for the native CPU. And also remove code for Leopard.

LudovicRousseau commented 4 years ago

Fixed in https://github.com/LudovicRousseau/pyscard/commit/10faaae802b50c9c5600e6842f8ec62b1ff1dba7 Thanks