moves 'lib' dir to root

pull/1/head
Moisés Guimarães 2017-12-12 17:12:16 -03:00
parent f9f3a190dd
commit 5283bdc4f9
4 changed files with 12 additions and 11 deletions

View File

@ -53,15 +53,13 @@ test_requirements = _parse_requirements('requirements/test.txt')
# wolfssl C library
class wolfsslBuilder(Command):
description = 'Compile wolfSSL C library'
user_options = [
]
user_options = []
def initialize_options(self):
"""Set default values for options."""
def finalize_options(self):
"""Post-process options."""
pass
def run(self):
build_wolfssl(wolfcrypt.__wolfssl_version__)
@ -69,7 +67,7 @@ class wolfsslBuilder(Command):
class cffiBuilder(build_ext, object):
def build_extension(self, ext):
""" Compile manually the py_mini_racer extension, bypass setuptools
""" Compile manually the wolfcrypt-py extension, bypass setuptools
"""
self.run_command('build_lib')
@ -107,7 +105,7 @@ setup(
test_suite='tests',
tests_require=test_requirements,
cmdclass={
'build_lib': wolfsslBuilder,
'build_lib' : wolfsslBuilder,
'build_ext' : cffiBuilder
}
)

View File

@ -21,6 +21,7 @@
from cffi import FFI
from wolfcrypt import __wolfssl_version__ as version
from wolfcrypt._build_wolfssl import local_path
from distutils.util import get_platform
ffi = FFI()
@ -44,7 +45,8 @@ ffi.set_source(
#include <wolfssl/wolfcrypt/rsa.h>
""",
include_dirs=[local_path("lib/wolfssl/src")],
library_dirs=[local_path("lib/wolfssl/{}/lib".format(version))],
library_dirs=[local_path("lib/wolfssl/{}/{}/lib".format(
get_platform(), version))],
libraries=["wolfssl"],
)

View File

@ -26,10 +26,11 @@ from distutils.util import get_platform
def local_path(path):
""" Return path relative to this file
""" Return path relative to the root of this project
"""
current_path = os.path.dirname(__file__)
return os.path.abspath(os.path.join(current_path, path))
current = os.path.dirname(__file__)
gparent = os.path.dirname(os.path.dirname(current))
return os.path.abspath(os.path.join(gparent, path))
WOLFSSL_GIT_ADDR = "https://github.com/wolfssl/wolfssl.git"
@ -168,7 +169,8 @@ def make(configure_flags):
def build_wolfssl(version="master"):
prefix = local_path("lib/wolfssl/{}".format(version))
prefix = local_path("lib/wolfssl/{}/{}".format(
get_platform(), version))
libfile = os.path.join(prefix, 'lib/libwolfssl.la')
rebuild = ensure_wolfssl_src(version)

@ -1 +0,0 @@
Subproject commit 182028819d5d1b3beeea15a3f3117a06608b62b0