Changeset a89ed31 for python/lib/gen_external.py
- Timestamp:
- Apr 25, 2016, 11:33:11 PM (9 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, pitchshift, sampler, timestretch, yinfft+
- Children:
- c31b589
- Parents:
- 07867cd
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/lib/gen_external.py
r07867cd ra89ed31 1 import os 1 import os, glob 2 2 3 3 header = """// this file is generated! do not modify … … 67 67 return cpp_output, cpp_objects 68 68 69 def generate_external(output_path, usedouble = False ):69 def generate_external(output_path, usedouble = False, overwrite = True): 70 70 if not os.path.isdir(output_path): os.mkdir(output_path) 71 elif overwrite == False: return glob.glob(os.path.join(output_path, '*.c')) 71 72 sources_list = [] 72 73 cpp_output, cpp_objects = get_cpp_objects() … … 161 162 162 163 objlist = "".join(["extern PyTypeObject Py_%sType;\n" % p for p in lib]) 163 out = """ 164 // generated list of objects created with gen_external.py 164 out = """// generated list of objects created with gen_external.py 165 165 166 #include <Python.h> 166 167 """ 168 if usedouble: 169 out += """ 170 #ifndef HAVE_AUBIO_DOUBLE 171 #define HAVE_AUBIO_DOUBLE 1 172 #endif 173 """ 174 out += """ 167 175 {objlist} 168 176 int generated_objects ( void );
Note: See TracChangeset
for help on using the changeset viewer.