Nothing to see here.
[xiph/unicode.git] / ao-python / setup.py
blob1c80dbe1714a4c6ba40e5d66d5e69a5be7211aa4
1 #!/usr/bin/env python
3 """Setup script for the Ao module distribution.
4 Configuration in particular could use some work."""
6 import os, sys, re, string
7 from distutils.core import setup
8 from distutils.extension import Extension
9 from distutils.command.config import config
10 from distutils.command.build import build
12 def get_setup():
13 data = {}
14 r = re.compile(r'(\S+)\s*?=\s*(.+)')
16 if not os.path.isfile('Setup'):
17 print "No 'Setup' file. Perhaps you need to run the configure script."
18 sys.exit(1)
20 f = open('Setup', 'r')
22 for line in f.readlines():
23 m = r.search(line)
24 if not m:
25 print "Error in setup file:", line
26 sys.exit(1)
27 key = m.group(1)
28 val = m.group(2)
29 data[key] = val
31 return data
33 data = get_setup()
34 ao_include_dir = data['ao_include_dir']
35 ao_lib_dir = data['ao_lib_dir']
36 ao_libs = string.split(data['ao_libs'])
39 setup (# Distribution meta-data
40 name = "pyao",
41 version = "0.82",
42 description = "A wrapper for the ao library",
43 author = "Andrew Chatham",
44 author_email = "andrew.chatham@duke.edu",
45 url = "http://dulug.duke.edu/~andrew/pyvorbis.html",
46 license = 'GPL',
48 # Description of the modules and packages in the distribution
50 ext_modules = [Extension(
51 name = 'aomodule',
52 sources = ['src/aomodule.c'],
53 include_dirs = [ao_include_dir],
54 library_dirs = [ao_lib_dir],
55 libraries = ao_libs)]