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
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."
20 f
= open('Setup', 'r')
22 for line
in f
.readlines():
25 print "Error in setup file:", line
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
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",
48 # Description of the modules and packages in the distribution
50 ext_modules
= [Extension(
52 sources
= ['src/aomodule.c'],
53 include_dirs
= [ao_include_dir
],
54 library_dirs
= [ao_lib_dir
],