forked from wolfSSL/wolfcrypt-py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·87 lines (76 loc) · 2.94 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2006-2022 wolfSSL Inc.
#
# This file is part of wolfSSL. (formerly known as CyaSSL)
#
# wolfSSL is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# wolfSSL is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
# pylint: disable=wrong-import-position
import os
import sys
from setuptools import setup, find_packages
os.chdir(os.path.dirname(sys.argv[0]) or ".")
import re
VERSIONFILE = "wolfcrypt/_version.py"
verstrline = open(VERSIONFILE, "rt").read()
VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]"
mo = re.search(VSRE, verstrline, re.M)
if mo:
verstr = mo.group(1)
else:
raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,))
VSRE = r"^__wolfssl_version__ = ['\"]([^'\"]*)['\"]"
mo = re.search(VSRE, verstrline, re.M)
if mo:
wolfverstr = mo.group(1)
else:
raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,))
# long_description
with open("README.rst") as readme_file:
long_description = readme_file.read()
with open("LICENSING.rst") as licensing_file:
long_description = long_description.replace(".. include:: LICENSING.rst\n",
licensing_file.read())
setup(
name="wolfcrypt",
version=verstr,
description="Python module that encapsulates wolfSSL's crypto engine API.",
long_description=long_description,
long_description_content_type='text/x-rst',
author="wolfSSL Inc.",
author_email="info@wolfssl.com",
url="https://github.com/wolfssl/wolfcrypt-py",
license="GPLv2 or Commercial License",
packages=find_packages(),
keywords="wolfssl, wolfcrypt, security, cryptography",
classifiers=[
u"License :: OSI Approved :: GNU General Public License v2 (GPLv2)",
u"License :: Other/Proprietary License",
u"Operating System :: OS Independent",
u"Programming Language :: Python :: 3",
u"Programming Language :: Python :: 3.6",
u"Programming Language :: Python :: 3.7",
u"Programming Language :: Python :: 3.8",
u"Programming Language :: Python :: 3.9",
u"Topic :: Security",
u"Topic :: Security :: Cryptography",
u"Topic :: Software Development"
],
setup_requires=["cffi>=1.0.0"],
install_requires=["cffi>=1.0.0"],
cffi_modules=["./scripts/build_ffi.py:ffibuilder"],
package_data={"wolfcrypt": ["*.dll"]}
)