From b756b596f010d6d0f60320f07fe792a49532b6bd Mon Sep 17 00:00:00 2001 From: Keyvan Hardani Date: Thu, 3 Oct 2024 14:46:53 +0200 Subject: [PATCH] Update setup.py --- setup.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/setup.py b/setup.py index 54021ca..fa72133 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,6 @@ from setuptools import setup, Extension import os - with open('README.md') as f: long_description = f.read() @@ -30,10 +29,14 @@ ap_sources += glob(ap_dir_prefix + '*.c*') ap_dir_prefix += '*/' -# remove files for windows -ap_sources.remove('webrtc-audio-processing/webrtc/system_wrappers/source/rw_lock_generic.cc') -ap_sources.remove('webrtc-audio-processing/webrtc/system_wrappers/source/condition_variable.cc') -ap_sources = [src for src in ap_sources if src.find('_win.') < 0] +rw_lock_generic_path = os.path.join('webrtc-audio-processing', 'webrtc', 'system_wrappers', 'source', 'rw_lock_generic.cc') +condition_variable_path = os.path.join('webrtc-audio-processing', 'webrtc', 'system_wrappers', 'source', 'condition_variable.cc') + +if rw_lock_generic_path in ap_sources: + ap_sources.remove(rw_lock_generic_path) + +if condition_variable_path in ap_sources: + ap_sources.remove(condition_variable_path) def get_yocto_var(var_name): val = os.environ.get(var_name, None) @@ -41,7 +44,6 @@ def get_yocto_var(var_name): raise Exception(f'Bitbake build detected, i.e. BB_CURRENT_TASK is set, but {var_name} is not set. Please do export {var_name} in your bitbake recipe.') return val - def process_arch(arch, set_compile_flags=False): global ap_sources, define_macros if arch.find('arm') >= 0: @@ -71,7 +73,6 @@ def process_arch(arch, set_compile_flags=False): else: process_arch(platform.machine(), set_compile_flags=True) - sources = ( ap_sources + ['src/audio_processing_module.cpp', 'src/webrtc_audio_processing.i'] @@ -82,7 +83,6 @@ def process_arch(arch, set_compile_flags=False): ['-I' + h for h in include_dirs] ) - setup( name='webrtc_audio_processing', version='0.1.3',