]> git.k1024.org Git - debian-pylibacl.git/blob - setup.py
Bump changelo for new upstream release
[debian-pylibacl.git] / setup.py
1 #!/usr/bin/env python3
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     macros.append(("HAVE_ACL_COPY_EXT", None))
14     libs.append("acl")
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))
19     libs.append("acl")
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")
26 else:
27     raise ValueError("I don't know your system '%s'."
28                      " Please contact the author" % u_sysname)
29
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)."""
33
34 version = "0.6.0"
35
36 setup(name="pylibacl",
37       version=version,
38       description="POSIX.1e ACLs for python",
39       long_description=long_desc,
40       author="Iustin Pop",
41       author_email="iustin@k1024.org",
42       url="https://pylibacl.k1024.org/",
43       license="LGPL",
44       ext_modules=[Extension("posix1e", ["acl.c"],
45                              libraries=libs,
46                              define_macros=macros,
47                              )],
48       python_requires = ">=3.4",
49       # Note: doesn't work since it's not a package. Sigh.
50       package_data = {
51           '': ['py.typed', 'posix1e.pyi'],
52       },
53       zip_safe=False,
54       project_urls={
55         "Bug Tracker": "https://github.com/iustin/pylibacl/issues",
56       },
57       classifiers = [
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",
68       ]
69       )