1 # Copyright (C) 2012 Red Hat, Inc.
2 # W. Trevor King <wking@tremily.us>
4 # This file is part of python-kmod.
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.
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
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/>.
18 from distutils.core import setup
19 from distutils.extension import Extension as _Extension
23 from Cython.Distutils import build_ext as _build_ext
28 # read version from local kmod/version.py without pulling in
30 _sys.path.insert(0, package_name)
31 from version import __version__
34 _this_dir = _os.path.dirname(__file__)
37 for filename in sorted(_os.listdir(package_name)):
38 basename,extension = _os.path.splitext(filename)
39 if extension == '.pyx':
42 '{0}.{1}'.format(package_name, basename),
43 [_os.path.join(package_name, filename)],
50 description='Python binding for kmod',
51 packages=[package_name],
52 provides=[package_name],
53 cmdclass = {'build_ext': _build_ext},
54 ext_modules=ext_modules,