ref: 5f6324e90e6f49d5d412630fdc2774f97f71fbf6
parent: bce913a3eab144502d02349cc2025fd60d633a4f
author: Paul Brossier <piem@piem.org>
date: Sun May 15 11:09:56 EDT 2016
setup.py: do not fail if numpy is not installed yet
--- a/setup.py
+++ b/setup.py
@@ -1,7 +1,6 @@
#! /usr/bin/env python
import sys, os.path, glob
-import numpy
from setuptools import setup, Extension
from python.lib.moresetuptools import *
# function to generate gen/*.{c,h}
@@ -20,7 +19,11 @@
include_dirs += [ 'python/ext' ]
include_dirs += [ output_path ] # aubio-generated.h
-include_dirs += [ numpy.get_include() ]
+try:
+ import numpy
+ include_dirs += [ numpy.get_include() ]
+except ImportError:
+ pass
if sys.platform.startswith('darwin'):
extra_link_args += ['-framework','CoreFoundation', '-framework','AudioToolbox']