]> git.k1024.org Git - debian-pylibacl.git/blob - setup.py
Merge branch 'upstream'
[debian-pylibacl.git] / setup.py
1 #!/usr/bin/env python
2
3 import distutils, os
4 from distutils.core import setup, Extension
5
6 (u_sysname, u_nodename, u_release, u_version, u_machine) = os.uname()
7
8 macros = []
9 libs = []
10 if u_sysname == "Linux":
11     macros.append(("HAVE_LINUX", None))
12     macros.append(("HAVE_LEVEL2", None))
13     libs.append("acl")
14 elif u_sysname == "GNU/kFreeBSD":
15     macros.append(("HAVE_LINUX", None))
16     macros.append(("HAVE_LEVEL2", None))
17     libs.append("acl")
18 elif u_sysname == "FreeBSD":
19     macros.append(("HAVE_FREEBSD", None))
20 elif u_sysname == "Darwin":
21     libs.append("pthread")
22 else:
23     raise ValueError("I don't know your system '%s'."
24                      " Please contact the author" % u_sysname)
25
26 long_desc = """This is a C extension module for Python which
27 implements POSIX ACLs manipulation. It is a wrapper on top
28 of the systems's acl C library - see acl(5)."""
29
30 version = "0.3.0"
31
32 setup(name="pylibacl",
33       version=version,
34       description="POSIX.1e ACLs for python",
35       long_description=long_desc,
36       author="Iustin Pop",
37       author_email="iusty@k1024.org",
38       url="http://pylibacl.sourceforge.net",
39       license="GPL",
40       ext_modules=[Extension("posix1e", ["acl.c"],
41                              libraries=libs,
42                              define_macros=macros,
43                              )],
44       )