Changeset 3d14829 for python/lib
- Timestamp:
- Dec 2, 2016, 1:03:41 PM (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:
- 473ab11
- Parents:
- bee6e96
- Location:
- python/lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/lib/gen_external.py
rbee6e96 r3d14829 76 76 return cpp_cmd 77 77 78 def get_cpp_objects(header=header ):78 def get_cpp_objects(header=header, usedouble=False): 79 79 cpp_cmd = get_preprocessor() 80 80 81 81 macros = [('AUBIO_UNSTABLE', 1)] 82 if usedouble: 83 macros += [('HAVE_AUBIO_DOUBLE', 1)] 82 84 83 85 if not os.path.isfile(header): … … 177 179 elif not overwrite: return sorted(glob.glob(os.path.join(output_path, '*.c'))) 178 180 179 cpp_output, cpp_objects = get_cpp_objects(header )181 cpp_output, cpp_objects = get_cpp_objects(header, usedouble=usedouble) 180 182 181 183 lib = analyze_cpp_output(cpp_objects, cpp_output) -
python/lib/moresetuptools.py
rbee6e96 r3d14829 152 152 153 153 def build_extension(self, extension): 154 if self.enable_double :154 if self.enable_double or 'HAVE_AUBIO_DOUBLE' in os.environ: 155 155 extension.define_macros += [('HAVE_AUBIO_DOUBLE', 1)] 156 enable_double = True 157 else: 158 enable_double = False 156 159 # seack for aubio headers and lib in PKG_CONFIG_PATH 157 160 add_system_aubio(extension) … … 167 170 else: 168 171 # check for external dependencies 169 add_external_deps(extension, usedouble= self.enable_double)172 add_external_deps(extension, usedouble=enable_double) 170 173 # add libaubio sources and look for optional deps with pkg-config 171 add_local_aubio_sources(extension, usedouble= self.enable_double)174 add_local_aubio_sources(extension, usedouble=enable_double) 172 175 # generate files python/gen/*.c, python/gen/aubio-generated.h 173 176 extension.sources += generate_external(header, output_path, overwrite = False, 174 usedouble= self.enable_double)177 usedouble=enable_double) 175 178 return _build_ext.build_extension(self, extension)
Note: See TracChangeset
for help on using the changeset viewer.