History

python/lib/moresetuptools.py: force adding libav on window (see conda-forge/pkg-config-feedstock#11)

Paul Brossier committed 9 years ago

Commit 67a30531 parent ede63e31 file · +12 −2Browse files

Showing the changes to python (1 of 1 file). Show all

Unified · Split

python/lib/moresetuptools.py+12−2
@@ -116,8 +116,8 @@ def add_external_deps(ext, usedouble = False): · 115 unmodified lines
116116
117117 ext.define_macros += [('HAVE_WAVWRITE', 1)]
118118 ext.define_macros += [('HAVE_WAVREAD', 1)]
119− # TODO:
120− # add cblas
119+
120+ # TODO: add cblas
121121 if 0:
122122 ext.libraries += ['cblas']
123123 ext.define_macros += [('HAVE_ATLAS_CBLAS_H', 1)]
@@ -131,6 +131,12 @@ def add_system_aubio(ext): · 7 unmodified lines
131131 else:
132132 print("Info: using system aubio " + aubio_version + " found in " + ' '.join(ext.library_dirs))
133133
134+def add_libav_on_win(ext):
135+ """ no pkg-config on windows, simply assume these libs are available """
136+ ext.libraries += ['avformat', 'avutil', 'avcodec', 'swresample']
137+ for define_macro in ['HAVE_LIBAV', 'HAVE_SWRESAMPLE']:
138+ ext.define_macros += [(define_macro, 1)]
139+
134140 class CleanGenerated(distutils.command.clean.clean):
135141 def run(self):
136142 if os.path.isdir(output_path):
@@ -174,6 +180,10 @@ class build_ext(_build_ext): · 37 unmodified lines
174180 else:
175181 # check for external dependencies
176182 add_external_deps(extension, usedouble=enable_double)
183+ # force adding libav on windows
184+ if os.name == 'nt' and ('WITH_LIBAV' in os.environ \
185+ or 'CONDA_PREFIX' in os.environ):
186+ add_libav_on_win(extension)
177187 # add libaubio sources and look for optional deps with pkg-config
178188 add_local_aubio_sources(extension)
179189 # generate files python/gen/*.c, python/gen/aubio-generated.h

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t