Prepare for release 0.2
[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 == "FreeBSD":
15     macros.append(("HAVE_FREEBSD", None))
16     libs.append("posix1e")
17 else:
18     raise ValueError("I don't know your system. Please contact the author")
19
20 long_desc = """This is a C extension module for Python which
21 implements POSIX ACLs manipulation. It is a wrapper on top
22 of the systems's acl C library - see acl(5)."""
23 version = "0.1"
24 setup(name="pylibacl",
25       version=version,
26       description="POSIX.1e ACLs for python",
27       long_description=long_desc,
28       author="Iustin Pop",
29       author_email="iusty@k1024.org",
30       url="http://pylibacl.sourceforge.net",
31       license="GPL",
32       ext_modules=[Extension("posix1e", ["acl.c"],
33                              libraries=libs,
34                              define_macros=macros,
35                              )],
36       data_files=[("/usr/share/doc/pylibacl-%s" % version,
37                    ["README","IMPLEMENTATION", "PLATFORMS",
38                     "posix1e.html", "posix1e.txt"])],
39       )