setup.py: use custom build_ext instead of 'generate' command, define HAVE_AUBIO_DOUBL...
[aubio.git] / Makefile
index c3684d0..07e6bcd 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,5 @@
 WAFCMD=python waf
+WAFURL=https://waf.io/waf-1.8.22
 
 SOX=sox
 
@@ -11,8 +12,7 @@ checkwaf:
        @[ -f waf ] || make getwaf
 
 getwaf:
-       curl https://waf.io/waf-1.8.20 > waf
-       @chmod +x waf
+       @./scripts/get_waf.sh
 
 expandwaf:
        @[ -d wafilb ] || rm -fr waflib
@@ -28,7 +28,7 @@ build: configure
        $(WAFCMD) build $(WAFOPTS)
 
 build_python:
-       python ./setup.py generate $(ENABLE_DOUBLE) build
+       python ./setup.py build_ext $(ENABLE_DOUBLE)
 
 test_python: export LD_LIBRARY_PATH=$(PWD)/build/src
 test_python:
@@ -39,7 +39,7 @@ test_python:
 
 test_python_osx:
        # create links from ~/lib/lib* to build/src/lib*
-       [ -f build/src/libaubio.[0-9].dylib ] && ( mkdir -p ~/lib && cp -prv build/src/libaubio.4.dylib ~/lib ) || true
+       [ -f build/src/libaubio.[0-9].dylib ] && ( mkdir -p ~/lib && cp -prv build/src/libaubio.[0-9].dylib ~/lib ) || true
        # then run the tests
        pip install --user -v -r requirements.txt
        pip install --user -v .
@@ -49,8 +49,30 @@ test_python_osx:
 clean_python:
        ./setup.py clean
 
+test_pure_python:
+       -pip uninstall -v -y aubio
+       -rm -rf build/ python/gen/
+       -rm -f dist/*.egg
+       -pip install -v -r requirements.txt
+       CFLAGS=-Os python setup.py bdist_egg
+       [ "$(TRAVIS_OS_NAME)" == "osx" ] && easy_install --user dist/*.egg || \
+               easy_install dist/*.egg
+       nose2 -N 4
+       pip uninstall -v -y aubio
+
+test_pure_python_wheel:
+       -pip uninstall -v -y aubio
+       -rm -rf build/ python/gen/
+       -rm -f dist/*.whl
+       -pip install -v -r requirements.txt
+       -pip install -v wheel
+       CFLAGS=-Os python setup.py bdist_wheel --universal
+       wheel install dist/*.whl
+       nose2 -N 4
+       pip uninstall -v -y aubio
+
 build_python3:
-       python3 ./setup.py generate $(ENABLE_DOUBLE) build
+       python3 ./setup.py build_ext $(ENABLE_DOUBLE)
 
 clean_python3:
        python3 ./setup.py clean