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))
13 macros.append(("HAVE_ACL_COPY_EXT", None))
15 elif u_sysname == "GNU/kFreeBSD":
16 macros.append(("HAVE_LINUX", None))
17 macros.append(("HAVE_LEVEL2", None))
18 macros.append(("HAVE_ACL_COPY_EXT", None))
20 elif u_sysname == "FreeBSD":
21 macros.append(("HAVE_FREEBSD", None))
22 if int(u_release.split(".", 1)[0]) >= 7:
23 macros.append(("HAVE_LEVEL2", None))
24 elif u_sysname == "Darwin":
25 libs.append("pthread")
27 raise ValueError("I don't know your system '%s'."
28 " Please contact the author" % u_sysname)
30 long_desc = """This is a C extension module for Python which
31 implements POSIX ACLs manipulation. It is a wrapper on top
32 of the systems's acl C library - see acl(5)."""
36 setup(name="pylibacl",
38 description="POSIX.1e ACLs for python",
39 long_description=long_desc,
41 author_email="iustin@k1024.org",
42 url="http://pylibacl.k1024.org/",
44 ext_modules=[Extension("posix1e", ["acl.c"],
48 python_requires = ">=3.4",
50 "Bug Tracker": "https://github.com/iustin/pylibacl/issues",
53 "Development Status :: 5 - Production/Stable",
54 "Intended Audience :: Developers",
55 "License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)",
56 "Programming Language :: Python :: 3 :: Only",
57 "Programming Language :: Python :: Implementation :: CPython",
58 "Programming Language :: Python :: Implementation :: PyPy",
59 "Operating System :: POSIX :: BSD :: FreeBSD",
60 "Operating System :: POSIX :: Linux",
61 "Topic :: Software Development :: Libraries :: Python Modules",
62 "Topic :: System :: Filesystems",