3 from distutils
.core
import setup
, Extension
7 packages
= ['glib-2.0', 'jack', 'fluidsynth', 'libusb-1.0', 'smf', 'sndfile']
9 eargs
= os
.popen("pkg-config --cflags %s" % (" ".join(packages
)), "r").read().split()
10 eargs
.append("-std=c99")
11 # Workaround for Python3.4 headers
12 eargs
.append("-Wno-error=declaration-after-statement")
14 libs
= os
.popen("pkg-config --libs %s" % (" ".join(packages
)), "r").read().split()
81 if '#define USE_SSE 1' in open('config.h').read():
83 eargs
.append('-ffast-math')
86 version
="0.04", description
="Assorted music-related code",
87 author
="Krzysztof Foltman", author_email
="wdev@foltman.com",
88 url
="http://repo.or.cz/w/calfbox.git",
90 package_dir
={'calfbox':'py'},
92 Extension('_cbox', csources
,
93 extra_compile_args
= eargs
,
96 define_macros
=[("_GNU_SOURCE","1"),("_POSIX_C_SOURCE", "199309L"),("USE_PYTHON","1"),("CALFBOX_AS_MODULE", "1")],
97 undef_macros
=['NDEBUG'],
98 depends
= ['setup.py']