]> git.k1024.org Git - pylibacl.git/blob - setup.py
Fix download link in README
[pylibacl.git] / setup.py
1 #!/usr/bin/env python
2
3 import os
4 from setuptools 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     macros.append(("HAVE_ACL_COPY_EXT", None))
18     libs.append("acl")
19 elif u_sysname == "FreeBSD":
20     macros.append(("HAVE_FREEBSD", None))
21     if u_release.startswith("7."):
22         macros.append(("HAVE_LEVEL2", None))
23 elif u_sysname == "Darwin":
24     libs.append("pthread")
25 else:
26     raise ValueError("I don't know your system '%s'."
27                      " Please contact the author" % u_sysname)
28
29 long_desc = """This is a C extension module for Python which
30 implements POSIX ACLs manipulation. It is a wrapper on top
31 of the systems's acl C library - see acl(5)."""
32
33 version = "0.5.2"
34
35 setup(name="pylibacl",
36       version=version,
37       description="POSIX.1e ACLs for python",
38       long_description=long_desc,
39       author="Iustin Pop",
40       author_email="iusty@k1024.org",
41       url="http://pylibacl.k1024.org/",
42       license="LGPL",
43       ext_modules=[Extension("posix1e", ["acl.c"],
44                              libraries=libs,
45                              define_macros=macros,
46                              )],
47       test_suite="test",
48       )