2 from distutils
.core
import setup
3 from distutils
.extension
import Extension
6 def pkgconfig(*packages
, **kw
):
7 flag_map
= {'-I': 'include_dirs', '-L': 'library_dirs', '-l': 'libraries'}
8 for token
in commands
.getoutput("pkg-config --libs --cflags %s" % ' '.join(packages
)).split():
9 kw
.setdefault(flag_map
.get(token
[:2]), []).append(token
[2:])
12 ebb_ffi
= Extension( "ebb_ffi"
13 , ["src/ebb_python.c", "src/ebb.c", "src/parser.c"]
14 , **pkgconfig('glib-2.0', include_dirs
= ['libev'])
18 , description
= "a WSGI web server"
21 , author_email
= "ry at tiny clouds dot org"
22 , url
= "http://ebb.rubyforge.org/"
24 , package_dir
= {'ebb': 'python_lib'}
25 , ext_modules
= [ebb_ffi
]