1 # Copyright (C) 2012 Red Hat, Inc. All rights reserved.
4 # This copyrighted material is made available to anyone wishing to use,
5 # modify, copy, or redistribute it subject to the terms and conditions
6 # of the GNU Lesser General Public License v.2.1.
8 # You should have received a copy of the GNU Lesser General Public License
9 # along with this program; if not, write to the Free Software Foundation,
10 # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
12 from distutils.core import setup
13 from distutils.extension import Extension as _Extension
17 from Cython.Distutils import build_ext as _build_ext
22 # read version from local kmod/version.py without pulling in
24 _sys.path.insert(0, package_name)
25 from version import __version__
28 _this_dir = _os.path.dirname(__file__)
31 for filename in sorted(_os.listdir(package_name)):
32 basename,extension = _os.path.splitext(filename)
33 if extension == '.pyx':
36 '{}.{}'.format(package_name, basename),
37 [_os.path.join(package_name, filename)],
44 description='Python binding for kmod',
45 packages=[package_name],
46 provides=[package_name],
47 cmdclass = {'build_ext': _build_ext},
48 ext_modules=ext_modules,