feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change
on this file since fe738f1 was
cb89e51,
checked in by Paul Brossier <piem@piem.org>, 9 years ago
|
python/lib/moresetuptools.py: simplify imports
|
-
Property mode set to
100644
|
File size:
1.0 KB
|
Rev | Line | |
---|
[cb89e51] | 1 | import distutils, distutils.command.clean, distutils.dir_util |
---|
[a89ed31] | 2 | |
---|
| 3 | class CleanGenerated(distutils.command.clean.clean): |
---|
| 4 | def run(self): |
---|
[cb89e51] | 5 | distutils.dir_util.remove_tree('gen') |
---|
[a89ed31] | 6 | distutils.command.clean.clean.run(self) |
---|
| 7 | |
---|
| 8 | class GenerateCommand(distutils.cmd.Command): |
---|
| 9 | description = 'generate gen/gen-*.c files from ../src/aubio.h' |
---|
| 10 | user_options = [ |
---|
| 11 | # The format is (long option, short option, description). |
---|
| 12 | ('enable-double', None, 'use HAVE_AUBIO_DOUBLE=1 (default: 0)'), |
---|
| 13 | ] |
---|
| 14 | |
---|
| 15 | def initialize_options(self): |
---|
| 16 | self.enable_double = False |
---|
| 17 | |
---|
| 18 | def finalize_options(self): |
---|
| 19 | if self.enable_double: |
---|
| 20 | self.announce( |
---|
| 21 | 'will generate code for aubio compiled with HAVE_AUBIO_DOUBLE=1', |
---|
| 22 | level=distutils.log.INFO) |
---|
| 23 | |
---|
| 24 | def run(self): |
---|
| 25 | self.announce( 'Generating code', level=distutils.log.INFO) |
---|
| 26 | from .gen_external import generate_external |
---|
| 27 | generated_object_files = generate_external('gen', usedouble = self.enable_double) |
---|
Note: See
TracBrowser
for help on using the repository browser.