I have the same problem as discussed here #133 while trying to install this via pip install python-pkcs11 on these versions: 3.10.8 and 3.11.0.
The installation works on version 3.10.1, to which the fix was implemented in #136
Here is the log (3.11.0): log.txt