Showing the changes to python (1 of 1 file). Show all
Unified · Split
| @@ -116,8 +116,8 @@ def add_external_deps(ext, usedouble = False): · 115 unmodified lines | |||
| 116 | 116 | ||
| 117 | ext.define_macros += [('HAVE_WAVWRITE', 1)] | 117 | ext.define_macros += [('HAVE_WAVWRITE', 1)] |
| 118 | ext.define_macros += [('HAVE_WAVREAD', 1)] | 118 | ext.define_macros += [('HAVE_WAVREAD', 1)] |
| 119 | # TODO: | 119 | |
| 120 | # add cblas | 120 | # TODO: add cblas |
| 121 | if 0: | 121 | if 0: |
| 122 | ext.libraries += ['cblas'] | 122 | ext.libraries += ['cblas'] |
| 123 | ext.define_macros += [('HAVE_ATLAS_CBLAS_H', 1)] | 123 | ext.define_macros += [('HAVE_ATLAS_CBLAS_H', 1)] |
| @@ -131,6 +131,12 @@ def add_system_aubio(ext): · 7 unmodified lines | |||
| 131 | else: | 131 | else: |
| 132 | print("Info: using system aubio " + aubio_version + " found in " + ' '.join(ext.library_dirs)) | 132 | print("Info: using system aubio " + aubio_version + " found in " + ' '.join(ext.library_dirs)) |
| 133 | 133 | ||
| 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 | |||
| 134 | class CleanGenerated(distutils.command.clean.clean): | 140 | class CleanGenerated(distutils.command.clean.clean): |
| 135 | def run(self): | 141 | def run(self): |
| 136 | if os.path.isdir(output_path): | 142 | if os.path.isdir(output_path): |
| @@ -174,6 +180,10 @@ class build_ext(_build_ext): · 37 unmodified lines | |||
| 174 | else: | 180 | else: |
| 175 | # check for external dependencies | 181 | # check for external dependencies |
| 176 | add_external_deps(extension, usedouble=enable_double) | 182 | 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) | ||
| 177 | # add libaubio sources and look for optional deps with pkg-config | 187 | # add libaubio sources and look for optional deps with pkg-config |
| 178 | add_local_aubio_sources(extension) | 188 | add_local_aubio_sources(extension) |
| 179 | # generate files python/gen/*.c, python/gen/aubio-generated.h | 189 | # generate files python/gen/*.c, python/gen/aubio-generated.h |