4 from setuptools import setup, Extension
6 (u_sysname, u_nodename, u_release, u_version, u_machine) = os.uname()
10 if u_sysname == "Linux":
11 macros.append(("HAVE_LINUX", None))
12 macros.append(("HAVE_LEVEL2", None))
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))
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")
26 raise ValueError("I don't know your system '%s'."
27 " Please contact the author" % u_sysname)
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)."""
35 setup(name="pylibacl",
37 description="POSIX.1e ACLs for python",
38 long_description=long_desc,
40 author_email="iusty@k1024.org",
41 url="http://pylibacl.sourceforge.net/",
43 ext_modules=[Extension("posix1e", ["acl.c"],