From 56091e267f3c47a0a495dd17476b17adca75c104 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moise=CC=81s=20Guimara=CC=83es?= Date: Thu, 12 Jan 2017 18:55:00 -0200 Subject: [PATCH] moving source code into src --- wrapper/python/wolfssl/setup.py | 12 +++++++++--- .../python/wolfssl/{ => src}/wolfssl/__about__.py | 0 wrapper/python/wolfssl/{ => src}/wolfssl/__init__.py | 0 wrapper/python/wolfssl/{ => src}/wolfssl/_memory.py | 0 wrapper/python/wolfssl/{ => src}/wolfssl/_methods.py | 0 .../python/wolfssl/{ => src}/wolfssl/build_ffi.py | 0 .../python/wolfssl/{ => src}/wolfssl/exceptions.py | 0 wrapper/python/wolfssl/{ => src}/wolfssl/utils.py | 0 8 files changed, 9 insertions(+), 3 deletions(-) rename wrapper/python/wolfssl/{ => src}/wolfssl/__about__.py (100%) rename wrapper/python/wolfssl/{ => src}/wolfssl/__init__.py (100%) rename wrapper/python/wolfssl/{ => src}/wolfssl/_memory.py (100%) rename wrapper/python/wolfssl/{ => src}/wolfssl/_methods.py (100%) rename wrapper/python/wolfssl/{ => src}/wolfssl/build_ffi.py (100%) rename wrapper/python/wolfssl/{ => src}/wolfssl/exceptions.py (100%) rename wrapper/python/wolfssl/{ => src}/wolfssl/utils.py (100%) diff --git a/wrapper/python/wolfssl/setup.py b/wrapper/python/wolfssl/setup.py index efe61401f..a89cb2425 100755 --- a/wrapper/python/wolfssl/setup.py +++ b/wrapper/python/wolfssl/setup.py @@ -22,12 +22,17 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA # Python 2.7 Standard Library + +# pylint: disable=import-error, wrong-import-position + from __future__ import absolute_import import os import sys -from wolfssl.__about__ import METADATA from setuptools import setup, find_packages +sys.path.insert(0, 'src') +from wolfssl.__about__ import METADATA + os.chdir(os.path.dirname(sys.argv[0]) or ".") LONG_DESCRIPTION = open("README.rst", "rt").read().replace( @@ -40,8 +45,9 @@ INFO = dict( contents={ "long_description" : LONG_DESCRIPTION, "package_data" : {"": ["*.txt"]}, - "packages" : find_packages(), - "cffi_modules" : ["./wolfssl/build_ffi.py:ffi"], + "packages" : find_packages("src"), + "package_dir" : {"": "src"}, + "cffi_modules" : ["./src/wolfssl/build_ffi.py:ffi"], }, requirements={ "setup_requires" : ["cffi>=1.6.0"], diff --git a/wrapper/python/wolfssl/wolfssl/__about__.py b/wrapper/python/wolfssl/src/wolfssl/__about__.py similarity index 100% rename from wrapper/python/wolfssl/wolfssl/__about__.py rename to wrapper/python/wolfssl/src/wolfssl/__about__.py diff --git a/wrapper/python/wolfssl/wolfssl/__init__.py b/wrapper/python/wolfssl/src/wolfssl/__init__.py similarity index 100% rename from wrapper/python/wolfssl/wolfssl/__init__.py rename to wrapper/python/wolfssl/src/wolfssl/__init__.py diff --git a/wrapper/python/wolfssl/wolfssl/_memory.py b/wrapper/python/wolfssl/src/wolfssl/_memory.py similarity index 100% rename from wrapper/python/wolfssl/wolfssl/_memory.py rename to wrapper/python/wolfssl/src/wolfssl/_memory.py diff --git a/wrapper/python/wolfssl/wolfssl/_methods.py b/wrapper/python/wolfssl/src/wolfssl/_methods.py similarity index 100% rename from wrapper/python/wolfssl/wolfssl/_methods.py rename to wrapper/python/wolfssl/src/wolfssl/_methods.py diff --git a/wrapper/python/wolfssl/wolfssl/build_ffi.py b/wrapper/python/wolfssl/src/wolfssl/build_ffi.py similarity index 100% rename from wrapper/python/wolfssl/wolfssl/build_ffi.py rename to wrapper/python/wolfssl/src/wolfssl/build_ffi.py diff --git a/wrapper/python/wolfssl/wolfssl/exceptions.py b/wrapper/python/wolfssl/src/wolfssl/exceptions.py similarity index 100% rename from wrapper/python/wolfssl/wolfssl/exceptions.py rename to wrapper/python/wolfssl/src/wolfssl/exceptions.py diff --git a/wrapper/python/wolfssl/wolfssl/utils.py b/wrapper/python/wolfssl/src/wolfssl/utils.py similarity index 100% rename from wrapper/python/wolfssl/wolfssl/utils.py rename to wrapper/python/wolfssl/src/wolfssl/utils.py