diff --git a/wrapper/python/wolfssl/setup.py b/wrapper/python/wolfssl/setup.py index 6184e1bff..efe61401f 100755 --- a/wrapper/python/wolfssl/setup.py +++ b/wrapper/python/wolfssl/setup.py @@ -1,6 +1,8 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- # +# setup.py +# # Copyright (C) 2006-2016 wolfSSL Inc. # # This file is part of wolfSSL. (formerly known as CyaSSL) @@ -23,33 +25,33 @@ from __future__ import absolute_import import os import sys -from wolfssl.__about__ import metadata +from wolfssl.__about__ import METADATA from setuptools import setup, find_packages os.chdir(os.path.dirname(sys.argv[0]) or ".") -long_description = open("README.rst", "rt").read().replace( +LONG_DESCRIPTION = open("README.rst", "rt").read().replace( ".. include:: LICENSING.rst\n", open("LICENSING.rst", "rt").read() ) -info = dict( - metadata = {k[2:-2]: metadata[k] for k in metadata}, - contents = { - "long_description": long_description, - "package_data": {"": ["*.txt"]}, - "packages": find_packages(), - "cffi_modules": ["./wolfssl/build_ffi.py:ffi"], +INFO = dict( + metadata={k[2:-2]: METADATA[k] for k in METADATA}, + contents={ + "long_description" : LONG_DESCRIPTION, + "package_data" : {"": ["*.txt"]}, + "packages" : find_packages(), + "cffi_modules" : ["./wolfssl/build_ffi.py:ffi"], }, - requirements = { - "setup_requires": ["cffi>=1.6.0"], - "install_requires": ["cffi>=1.6.0"], + requirements={ + "setup_requires" : ["cffi>=1.6.0"], + "install_requires" : ["cffi>=1.6.0"], }, - scripts = {}, - plugins = {}, - tests = {}, + scripts={}, + plugins={}, + tests={}, ) if __name__ == "__main__": - kwargs = {k:v for dct in info.values() for (k,v) in dct.items()} - setup(**kwargs) + KWARGS = {k:v for dct in INFO.values() for (k, v) in dct.items()} + setup(**KWARGS) diff --git a/wrapper/python/wolfssl/test/test_context.py b/wrapper/python/wolfssl/test/test_context.py index 84e3203d8..821259c1f 100644 --- a/wrapper/python/wolfssl/test/test_context.py +++ b/wrapper/python/wolfssl/test/test_context.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# # test_context.py # # Copyright (C) 2006-2016 wolfSSL Inc. diff --git a/wrapper/python/wolfssl/wolfssl/__about__.py b/wrapper/python/wolfssl/wolfssl/__about__.py index e5d3a9054..7dc0b77b7 100644 --- a/wrapper/python/wolfssl/wolfssl/__about__.py +++ b/wrapper/python/wolfssl/wolfssl/__about__.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# # __about__.py # # Copyright (C) 2006-2016 wolfSSL Inc. @@ -18,28 +20,28 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -metadata = dict( - __name__ = "wolfssl", - __version__ = "0.1.0", - __license__ = "GPLv2 or Commercial License", - __author__ = "wolfSSL Inc.", - __author_email__ = "info@wolfssl.com", - __url__ = "https://wolfssl.github.io/wolfssl-py", - __description__ = \ - u"A Python module that encapsulates wolfSSL's C SSL/TLS library.", - __keywords__ = "security, cryptography, ssl, embedded, embedded ssl", - __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 :: 2.7", - u"Programming Language :: Python :: 3.5", - u"Topic :: Security", - u"Topic :: Security :: Cryptography", - u"Topic :: Software Development" - ] +METADATA = dict( + __name__="wolfssl", + __version__="0.1.0", + __license__="GPLv2 or Commercial License", + __author__="wolfSSL Inc.", + __author_email__="info@wolfssl.com", + __url__="https://wolfssl.github.io/wolfssl-py", + __description__= \ + u"A Python module that encapsulates wolfSSL's C SSL/TLS library.", + __keywords__="security, cryptography, ssl, embedded, embedded ssl", + __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 :: 2.7", + u"Programming Language :: Python :: 3.5", + u"Topic :: Security", + u"Topic :: Security :: Cryptography", + u"Topic :: Software Development" + ] ) -globals().update(metadata) +globals().update(METADATA) -__all__ = list(metadata.keys()) \ No newline at end of file +__all__ = list(METADATA.keys()) diff --git a/wrapper/python/wolfssl/wolfssl/_context.py b/wrapper/python/wolfssl/wolfssl/_context.py index c3ea40aea..41ce3c45f 100644 --- a/wrapper/python/wolfssl/wolfssl/_context.py +++ b/wrapper/python/wolfssl/wolfssl/_context.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# # _context.py # # Copyright (C) 2006-2016 wolfSSL Inc. diff --git a/wrapper/python/wolfssl/wolfssl/_exceptions.py b/wrapper/python/wolfssl/wolfssl/_exceptions.py index 915d76426..1af6a76ba 100644 --- a/wrapper/python/wolfssl/wolfssl/_exceptions.py +++ b/wrapper/python/wolfssl/wolfssl/_exceptions.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# # _exceptions.py # # Copyright (C) 2006-2016 wolfSSL Inc. diff --git a/wrapper/python/wolfssl/wolfssl/_memory.py b/wrapper/python/wolfssl/wolfssl/_memory.py index 809508a4f..7fd541cd3 100644 --- a/wrapper/python/wolfssl/wolfssl/_memory.py +++ b/wrapper/python/wolfssl/wolfssl/_memory.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# # _memory.py # # Copyright (C) 2006-2016 wolfSSL Inc. diff --git a/wrapper/python/wolfssl/wolfssl/_methods.py b/wrapper/python/wolfssl/wolfssl/_methods.py index 0d929aa9d..cc493ea28 100644 --- a/wrapper/python/wolfssl/wolfssl/_methods.py +++ b/wrapper/python/wolfssl/wolfssl/_methods.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# # _methods.py # # Copyright (C) 2006-2016 wolfSSL Inc. diff --git a/wrapper/python/wolfssl/wolfssl/build_ffi.py b/wrapper/python/wolfssl/wolfssl/build_ffi.py index 134562e33..01a5e3666 100644 --- a/wrapper/python/wolfssl/wolfssl/build_ffi.py +++ b/wrapper/python/wolfssl/wolfssl/build_ffi.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# # build_ffi.py # # Copyright (C) 2006-2016 wolfSSL Inc. diff --git a/wrapper/python/wolfssl/wolfssl/utils.py b/wrapper/python/wolfssl/wolfssl/utils.py index 9f7369cb2..2c6232381 100644 --- a/wrapper/python/wolfssl/wolfssl/utils.py +++ b/wrapper/python/wolfssl/wolfssl/utils.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# # utils.py # # Copyright (C) 2006-2016 wolfSSL Inc.