Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update setup.py #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from setuptools import setup, Extension
import os


with open('README.md') as f:
long_description = f.read()

Expand All @@ -30,18 +29,21 @@
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)
if val is None:
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:
Expand Down Expand Up @@ -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']
Expand All @@ -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',
Expand Down