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",
49 # Note: doesn't work since it's not a package. Sigh.
51 '': ['py.typed', 'posix1e.pyi'],
55 "Bug Tracker": "https://github.com/iustin/pylibacl/issues",
58 "Development Status :: 5 - Production/Stable",
59 "Intended Audience :: Developers",
60 "License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)",
61 "Programming Language :: Python :: 3 :: Only",
62 "Programming Language :: Python :: Implementation :: CPython",
63 "Programming Language :: Python :: Implementation :: PyPy",
64 "Operating System :: POSIX :: BSD :: FreeBSD",
65 "Operating System :: POSIX :: Linux",
66 "Topic :: Software Development :: Libraries :: Python Modules",
67 "Topic :: System :: Filesystems",