test: Move python build from distutils to setuptools

This commit is contained in:
Antoine SOULIER
2022-07-25 12:44:35 +02:00
parent 079d45fd65
commit c3071e0a29

View File

@@ -15,13 +15,12 @@
# limitations under the License.
#
from distutils.core import setup, Extension
from setuptools import setup, Extension
import os, sys, glob
if len(sys.argv) <= 1:
sys.argv = sys.argv + [
'build', '--build-base', os.getcwd() + os.sep + 'build',
'install', '--install-lib', os.getcwd() + os.sep + 'build' ]
'build', '--build-platlib', os.getcwd() + os.sep + 'build' ]
INC_DIR = '..' + os.sep + 'include'
SRC_DIR = '..' + os.sep + 'src'
@@ -37,7 +36,7 @@ depends = [ 'ctypes.h' ] + \
includes = [ SRC_DIR, INC_DIR ]
ctiming = Extension('lc3',
extension = Extension('lc3',
extra_compile_args = ['-std=c11'],
define_macros = [ ('NPY_NO_DEPRECATED_API', 'NPY_1_7_API_VERSION') ],
sources = sources,
@@ -47,4 +46,4 @@ ctiming = Extension('lc3',
setup(name = 'LC3',
version = '1.0',
description = 'LC3 Test Python Module',
ext_modules = [ctiming])
ext_modules = [ extension ])