Add self as maintainer to setup.py
[python-kmod.git] / setup.py
1 # Copyright (C) 2012 Red Hat, Inc.
2 #                    W. Trevor King <wking@tremily.us>
3 #
4 # This file is part of python-kmod.
5 #
6 # python-kmod is free software: you can redistribute it and/or modify it under
7 # the terms of the GNU Lesser General Public License version 2.1 as published
8 # by the Free Software Foundation.
9 #
10 # python-kmod is distributed in the hope that it will be useful, but WITHOUT
11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 # FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
13 # details.
14 #
15 # You should have received a copy of the GNU Lesser General Public License
16 # along with python-kmod.  If not, see <http://www.gnu.org/licenses/>.
17
18 from distutils.core import setup
19 from distutils.extension import Extension as _Extension
20 import os as _os
21 import sys as _sys
22
23 from Cython.Distutils import build_ext as _build_ext
24
25
26 package_name = 'kmod'
27
28 # read version from local kmod/version.py without pulling in
29 # kmod/__init__.py
30 _sys.path.insert(0, package_name)
31 from version import __version__
32
33
34 _this_dir = _os.path.dirname(__file__)
35
36 ext_modules = []
37 for filename in sorted(_os.listdir(package_name)):
38     basename,extension = _os.path.splitext(filename)
39     if extension == '.pyx':
40         ext_modules.append(
41             _Extension(
42                 '{0}.{1}'.format(package_name, basename),
43                 [_os.path.join(package_name, filename)],
44                 libraries=['kmod'],
45                 ))
46
47 setup(
48     name=package_name,
49     version=__version__,
50     description='Python binding for kmod',
51     packages=[package_name],
52     provides=[package_name],
53     maintainer="Andy Grover",
54     maintainer_email="agrover@redhat.com",
55     cmdclass = {'build_ext': _build_ext},
56     ext_modules=ext_modules,
57     )