summaryrefslogtreecommitdiff
path: root/security/py-python-pkcs11/files/patch-setup.py
blob: 83b827201bbefadc23ef5014ed742c29316380bd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Revert:		https://github.com/pyauth/python-pkcs11/commit/d45957fd94abfd01b47cbf6a5b96862cf542dfbb

--- setup.py.orig	2025-06-27 14:01:42 UTC
+++ setup.py
@@ -0,0 +1,26 @@
+# Add cython extension module to build configuration.
+#
+# See also: https://setuptools.pypa.io/en/latest/userguide/ext_modules.html
+
+import platform
+
+from setuptools import Extension, setup
+
+libraries = []
+
+# if compiling using MSVC, we need to link against user32 library
+if platform.system() == "Windows":
+    libraries.append("user32")
+
+
+setup(
+    ext_modules=[
+        Extension(
+            name="pkcs11._pkcs11",
+            sources=[
+                "pkcs11/_pkcs11.pyx",
+            ],
+            libraries=libraries,
+        ),
+    ],
+)