Initial commit of something that builds.
[invirt/packages/python-afs.git] / setup.py
1 #!/usr/bin/python
2
3 from setuptools import setup, find_packages
4 from distutils.extension import Extension
5 from Pyrex.Distutils import build_ext
6 import sys
7 import os
8
9 for root in ['/Library/OpenAFS/Tools',
10              '/usr/local',
11              '/usr/afsws',
12              '/usr']:
13     if os.path.exists('%s/include/afs/afs.h' % root):
14         break
15
16 include_dirs = ['%s/include' % root]
17 library_dirs = ['%s/lib' % root,
18                 '%s/lib/afs' % root]
19
20 setup(
21     name="PyAFS",
22     version="0.0.0",
23     description="PyAFS - Python bindings for AFS",
24     author="Evan Broder",
25     author_email="broder@mit.edu",
26     license="MIT",
27     requires=['Pyrex'],
28     packages=find_packages(),
29     ext_modules=[
30         Extension("afs._pts",
31                   ["afs/_pts.pyx"],
32                   libraries=['bos', 'volser', 'vldb', 'afsrpc', 'afsauthent',
33                              'cmd', 'usd', 'audit'],
34                   include_dirs=include_dirs,
35                   library_dirs=library_dirs)
36         ],
37     cmdclass= {"build_ext": build_ext}
38 )