import distutils, distutils.command.clean, distutils.dir_util
from .gen_external import generate_external, header, output_path
+from Version import get_aubio_version
+
# inspired from https://gist.github.com/abergmeier/9488990
def add_packages(packages, ext=None, **kw):
""" use pkg-config to search which of 'packages' are installed """
#'fftw3f',
]
# samplerate only works with float
- if usedouble == False:
+ if usedouble is False:
packages += ['samplerate']
else:
print("Info: not adding libsamplerate in double precision mode")
def add_system_aubio(ext):
# use pkg-config to find aubio's location
- add_packages(['aubio'], ext)
+ aubio_version = get_aubio_version()
+ add_packages(['aubio = ' + aubio_version], ext)
if 'aubio' not in ext.libraries:
- print("Error: libaubio not found")
+ print("Info: aubio " + aubio_version + " was not found by pkg-config")
+ else:
+ print("Info: using system aubio " + aubio_version + " found in " + ' '.join(ext.library_dirs))
class CleanGenerated(distutils.command.clean.clean):
def run(self):