CMSIS-DSP: Corrected PythonWrapper build issue
diff --git a/CMSIS/DSP/PythonWrapper/setup.py b/CMSIS/DSP/PythonWrapper/setup.py
index 142c759..82b8b2a 100644
--- a/CMSIS/DSP/PythonWrapper/setup.py
+++ b/CMSIS/DSP/PythonWrapper/setup.py
@@ -5,6 +5,7 @@
import sys
import os
from config import ROOT
+import re
includes = [os.path.join(ROOT,"Include"),os.path.join(ROOT,"PrivateInclude"),os.path.join("cmsisdsp_pkg","src")]
@@ -53,6 +54,7 @@
common = glob.glob(os.path.join(ROOT,"Source","CommonTables","*.c"))
common.remove(os.path.join(ROOT,"Source","CommonTables","CommonTables.c"))
+common.remove(os.path.join(ROOT,"Source","CommonTables","CommonTablesF16.c"))
interpolation = glob.glob(os.path.join(ROOT,"Source","InterpolationFunctions","*.c"))
interpolation.remove(os.path.join(ROOT,"Source","InterpolationFunctions","InterpolationFunctions.c"))
@@ -62,19 +64,24 @@
modulesrc = []
modulesrc.append(os.path.join("cmsisdsp_pkg","src","cmsismodule.c"))
+allsrcs = support + fastmath + filtering + matrix + statistics + complexf + basic
+allsrcs = allsrcs + controller + transform + modulesrc + common+ interpolation
+
+def notf16(number):
+ if re.match(r'^.*_f16.c$',number):
+ return(False)
+ else:
+ return(True)
+
+# If there are too many files, the linker command in failing on Windows.
+# So f16 functions are removed since they are not currently available in the wrapper.
+# A next version will have to structure this wrapper more cleanly so that the
+# build can work even with more functions
+srcs = list(filter(notf16, allsrcs))
+
+
module1 = Extension(config.extensionName,
- sources = (support
- + fastmath
- + filtering
- + matrix
- + statistics
- + complexf
- + basic
- + controller
- + transform
- + modulesrc
- + common
- + interpolation
+ sources = (srcs
)
,
include_dirs = includes + [numpy.get_include()],
@@ -86,7 +93,7 @@
version = '0.0.1',
description = config.setupDescription,
ext_modules = [module1],
- author = 'Copyright (C) 2010-2019 ARM Limited or its affiliates. All rights reserved.',
+ author = 'Copyright (C) 2010-2020 ARM Limited or its affiliates. All rights reserved.',
url="https://github.com/ARM-software/CMSIS_5",
classifiers=[
"Programming Language :: Python",