source: Makefile @ 7f35041

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change on this file since 7f35041 was 7f35041, checked in by Paul Brossier <piem@piem.org>, 8 years ago

Makefile: back to 1.8.22 for now

  • Property mode set to 100644
File size: 2.6 KB
Line 
1WAFCMD=python waf
2WAFURL=https://waf.io/waf-1.8.22
3
4SOX=sox
5
6ENABLE_DOUBLE := $(shell [ -z $(HAVE_DOUBLE) ] || echo --enable-double )
7TESTSOUNDS := python/tests/sounds
8
9all: build
10
11checkwaf:
12        @[ -f waf ] || make getwaf
13
14getwaf:
15        @( which wget > /dev/null && wget -qO waf $(WAFURL) ) || ( which curl > /dev/null && curl $(WAFURL) > waf )
16        @chmod +x waf
17
18expandwaf:
19        @[ -d wafilb ] || rm -fr waflib
20        @$(WAFCMD) --help > /dev/null
21        @mv .waf*/waflib . && rm -fr .waf*
22        @sed '/^#==>$$/,$$d' waf > waf2 && mv waf2 waf
23        @chmod +x waf
24
25configure: checkwaf
26        $(WAFCMD) configure $(WAFOPTS) $(ENABLE_DOUBLE)
27
28build: configure
29        $(WAFCMD) build $(WAFOPTS)
30
31build_python:
32        python ./setup.py generate $(ENABLE_DOUBLE) build
33
34test_python: export LD_LIBRARY_PATH=$(PWD)/build/src
35test_python:
36        pip install -v -r requirements.txt
37        pip install -v .
38        nose2 --verbose
39        pip uninstall -y -v aubio
40
41test_python_osx:
42        # create links from ~/lib/lib* to build/src/lib*
43        [ -f build/src/libaubio.[0-9].dylib ] && ( mkdir -p ~/lib && cp -prv build/src/libaubio.4.dylib ~/lib ) || true
44        # then run the tests
45        pip install --user -v -r requirements.txt
46        pip install --user -v .
47        nose2 --verbose
48        pip uninstall -y -v aubio
49
50clean_python:
51        ./setup.py clean
52
53test_pure_python:
54        -pip uninstall -v -y aubio
55        -rm -rf build/ python/gen/
56        -rm -f dist/*.egg
57        -pip install -v -r requirements.txt
58        CFLAGS=-Os python setup.py bdist_egg
59        [ "$(TRAVIS_OS_NAME)" == "osx" ] && easy_install --user dist/*.egg || \
60                easy_install dist/*.egg
61        nose2 -N 4
62        pip uninstall -v -y aubio
63
64test_pure_python_wheel:
65        -pip uninstall -v -y aubio
66        -rm -rf build/ python/gen/
67        -rm -f dist/*.whl
68        -pip install -v -r requirements.txt
69        -pip install -v wheel
70        CFLAGS=-Os python setup.py bdist_wheel --universal
71        wheel install dist/*.whl
72        nose2 -N 4
73        pip uninstall -v -y aubio
74
75build_python3:
76        python3 ./setup.py generate $(ENABLE_DOUBLE) build
77
78clean_python3:
79        python3 ./setup.py clean
80
81clean:
82        $(WAFCMD) clean
83
84distcheck: checkwaf
85        $(WAFCMD) distcheck $(WAFOPTS) $(ENABLE_DOUBLE)
86
87help:
88        $(WAFCMD) --help
89
90create_test_sounds:
91        -[ -z `which $(SOX)` ] && ( echo $(SOX) could not be found) || true
92        -mkdir -p $(TESTSOUNDS)
93        -$(SOX) -r 44100 -b 16 -n "$(TESTSOUNDS)/44100Hz_1f_silence.wav"      synth 1s   silence 0
94        -$(SOX) -r 22050 -b 16 -n "$(TESTSOUNDS)/22050Hz_5s_brownnoise.wav"   synth 5    brownnoise      vol 0.9
95        -$(SOX) -r 32000 -b 16 -n "$(TESTSOUNDS)/32000Hz_127f_sine440.wav"    synth 127s sine 440        vol 0.9
96        -$(SOX) -r  8000 -b 16 -n "$(TESTSOUNDS)/8000Hz_30s_silence.wav"      synth 30   silence 0       vol 0.9
97        -$(SOX) -r 48000 -b 32 -n "$(TESTSOUNDS)/48000Hz_60s_sweep.wav"       synth 60   sine 100-20000  vol 0.9
Note: See TracBrowser for help on using the repository browser.