Changeset 7faef58
- Timestamp:
- Dec 2, 2016, 3:32:30 AM (8 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, sampler, yinfft+
- Children:
- bee6e96
- Parents:
- 1b2669a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/lib/moresetuptools.py
r1b2669a r7faef58 22 22 23 23 for package in packages: 24 print("checking for {:s}".format(package)) 24 25 cmd = ['pkg-config', '--libs', '--cflags', package] 25 26 try: … … 62 63 aubio_sources += sorted(glob.glob(os.path.join('src', '*', '**.c'))) 63 64 ext.sources += aubio_sources 65 66 def add_local_macros(ext, usedouble = False): 64 67 # define macros (waf puts them in build/src/config.h) 65 68 for define_macro in ['HAVE_STDLIB_H', 'HAVE_STDIO_H', … … 70 73 ext.define_macros += [(define_macro, 1)] 71 74 75 def add_external_deps(ext, usedouble = False): 72 76 # loof for additional packages 73 77 print("Info: looking for *optional* additional packages") … … 127 131 if os.path.isdir(output_path): 128 132 distutils.dir_util.remove_tree(output_path) 129 config = os.path.join('python', 'ext', 'config.h')130 distutils.command.clean.clean.run(self)131 133 132 134 from distutils.command.build_ext import build_ext as _build_ext … … 152 154 if self.enable_double: 153 155 extension.define_macros += [('HAVE_AUBIO_DOUBLE', 1)] 154 if os.path.isfile('src/aubio.h'): 155 # if aubio headers are found in this directory 156 add_local_aubio_header(extension) 157 # was waf used to build the shared lib? 158 if os.path.isdir(os.path.join('build','src')): 159 # link against build/src/libaubio, built with waf 156 # seack for aubio headers and lib in PKG_CONFIG_PATH 157 add_system_aubio(extension) 158 # the lib was not installed on this system 159 if 'aubio' not in extension.libraries: 160 # use local src/aubio.h 161 if os.path.isfile(os.path.join('src', 'aubio.h')): 162 add_local_aubio_header(extension) 163 add_local_macros(extension) 164 # look for a local waf build 165 if os.path.isfile(os.path.join('build','src', 'fvec.c.1.o')): 160 166 add_local_aubio_lib(extension) 161 167 else: 168 # check for external dependencies 169 add_external_deps(extension, usedouble=self.enable_double) 162 170 # add libaubio sources and look for optional deps with pkg-config 163 171 add_local_aubio_sources(extension, usedouble=self.enable_double) 164 else:165 # look for aubio headers and lib using pkg-config166 add_system_aubio(extension)167 172 # generate files python/gen/*.c, python/gen/aubio-generated.h 168 173 extension.sources += generate_external(header, output_path, overwrite = False,
Note: See TracChangeset
for help on using the changeset viewer.