This repository has been archived by the owner on Jan 3, 2025. It is now read-only.
forked from pyauth/python-pkcs11
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
66 lines (59 loc) · 2.3 KB
/
setup.py
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
"""
setup.py
"""
from setuptools import setup, find_packages
from setuptools.extension import Extension
if __name__ == '__main__':
with \
open('requirements.in') as requirements, \
open('README.rst') as readme:
ext_modules = [
Extension('pkcs11._loader',
sources=[
'pkcs11/_loader.pyx',
],
),
Extension('pkcs11._pkcs11',
sources=[
'pkcs11/_pkcs11.pyx',
],
define_macros=[
# These are required to build the PKCS11 headers
#
# They vary based on OS. See extern/pkcs11.h
('CK_PTR', '*'),
('CK_DEFINE_FUNCTION(returnType, name)', 'returnType name'),
('CK_DECLARE_FUNCTION(returnType, name)', 'returnType name'),
('CK_DECLARE_FUNCTION_POINTER(returnType, name)', 'returnType (* name)'),
('CK_CALLBACK_FUNCTION(returnType, name)', 'returnType (* name)'),
],
),
]
setup(
name='python-pkcs11',
description='PKCS#11 (Cryptoki) support for Python',
use_scm_version=True,
author='Danielle Madeley',
author_email='[email protected]',
url='https://github.com/danni/python-pkcs11',
long_description=readme.read(),
classifiers=[
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Topic :: Security :: Cryptography',
],
packages=find_packages(exclude=['tests']),
include_package_data=True,
ext_modules=ext_modules,
install_requires=requirements.readlines(),
setup_requires=[
'cython',
'setuptools >= 18.0',
'setuptools_scm',
],
test_suite='tests',
)