From 09bfc5afb62319d8d118cdbcd3f66b5339dfd097 Mon Sep 17 00:00:00 2001 From: Bryan Hunt Date: Thu, 3 Dec 2020 09:23:20 -0700 Subject: [PATCH] Update python build for conda packaging --- CMakeLists.txt | 2 +- lib/CMakeLists.txt | 2 +- lib/hal/hal_linux.c | 2 ++ python/MANIFEST.in | 2 +- python/setup.py | 2 +- test/CMakeLists.txt | 2 +- 6 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 00963e5d6..7671101c9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 2.6.4) -project (cryptoauthlib) +project (cryptoauthlib C) # Set the current release version set(VERSION "3.2.5") diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index d788ab57b..57cb39593 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.1.0) -project(cryptoauth) +project(cryptoauth C) include(CMakeDependentOption) include(CheckSymbolExists) diff --git a/lib/hal/hal_linux.c b/lib/hal/hal_linux.c index fecae8669..6aad7adb5 100644 --- a/lib/hal/hal_linux.c +++ b/lib/hal/hal_linux.c @@ -142,7 +142,9 @@ ATCA_STATUS hal_create_mutex(void ** ppMutex, char* pName) pthread_mutexattr_t muattr; pthread_mutexattr_init(&muattr); pthread_mutexattr_settype(&muattr, PTHREAD_MUTEX_ERRORCHECK); +#ifdef PTHREAD_PRIO_INHERIT pthread_mutexattr_setprotocol(&muattr, PTHREAD_PRIO_INHERIT); +#endif pthread_mutexattr_setrobust(&muattr, PTHREAD_MUTEX_ROBUST); if (pName) { diff --git a/python/MANIFEST.in b/python/MANIFEST.in index 5044a4d0e..a23935c9f 100644 --- a/python/MANIFEST.in +++ b/python/MANIFEST.in @@ -1,4 +1,4 @@ recursive-include lib *.c *.h atca_config.h.in CMakeLists.txt 90-cryptohid.rules recursive-include third_party *.c *.h recursive-include app *.c *.h -include MANIFEST.in setup.py setup.cfg README.md VERSION +include MANIFEST.in setup.py setup.cfg README.md VERSION LICENSE.txt diff --git a/python/setup.py b/python/setup.py index 6813d3e00..7b0cd77a2 100644 --- a/python/setup.py +++ b/python/setup.py @@ -65,7 +65,7 @@ lib = cdll.LoadLibrary('libcryptoauth.so') # Test to ensure it has the required features to support the # python wrapper. It may change later to a version check - assert 0 != lib.ATCAIfacecfg_size + assert 0 != lib.ATCAIfaceCfg_size _EXTENSIONS = None except: _EXTENSIONS = [Extension('cryptoauthlib', sources=[])] diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index ae4d3c63d..0ba1bd3ab 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.10) -project (cryptoauth_test) +project (cryptoauth_test C) option (ATCA_TEST_LOCK_ENABLE "Enable device locking functions and tests" OFF)