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