-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathsetup.py
executable file
·40 lines (31 loc) · 1.23 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Distutils installer for PyJack
# Test for Jack2
#---------------------------------------------------#
import os
if os.path.exists("/usr/local/include/jack/jack.h"):
path = "/usr/local/include/jack/jack.h"
elif os.path.exists("/usr/include/jack/jack.h"):
path = "/usr/include/jack/jack.h"
else:
print "You don't seem to have the jack headers installed.\nPlease install them first"
exit(-1)
test = open(path).read()
if ("jack_get_version_string" in test):
os.system("patch -f -s -p0 -r build/jack2.rej < ./patches/enable-jack2.diff > /dev/null")
else:
os.system("patch -R -f -s -p0 -r build/jack2.rej < ./patches/enable-jack2.diff > /dev/null")
#----------------------------------------------------#
from distutils.core import setup, Extension
import numpy.distutils
numpy_include_dirs = numpy.distutils.misc_util.get_numpy_include_dirs()
setup(
name = "pyjack",
version = "0.5.1",
description = "Python bindings for the Jack Audio Server",
author = "Andrew W. Schmeder, falkTX",
author_email = "[email protected]",
url = "http://www.a2hd.com/software",
ext_modules = [Extension("jack", ["pyjack.c"], libraries=["jack", "dl"], include_dirs=numpy_include_dirs)],
)