diff options
author | Guy Rozendorn <guy@rzn.co.il> | 2013-04-02 11:00:22 +0300 |
---|---|---|
committer | Lucas De Marchi <lucas.demarchi@intel.com> | 2014-03-25 00:34:16 -0300 |
commit | 1f9c5a04f7c9c3635e8c39ae3c28473fada07ed6 (patch) | |
tree | 837bbcda90979caca1a5195d92c3bb50201cd24e | |
parent | 57a8efdf92849ceb1d964754771afbe6f99d7200 (diff) | |
download | kmod-1f9c5a04f7c9c3635e8c39ae3c28473fada07ed6.tar.gz |
python: Issue #15 Cython is now a dependency
-rw-r--r-- | libkmod/python/setup.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/libkmod/python/setup.py b/libkmod/python/setup.py index 090e5d5..2e15d03 100644 --- a/libkmod/python/setup.py +++ b/libkmod/python/setup.py @@ -14,14 +14,19 @@ # # You should have received a copy of the GNU Lesser General Public License # along with python-kmod. If not, see <http://www.gnu.org/licenses/>. - +from setuptools import setup from distutils.core import setup from distutils.extension import Extension as _Extension import os as _os import sys as _sys import platform -from Cython.Distutils import build_ext as _build_ext + +def build_ext_workaround(*args, **kwargs): + # We want to use Cython to build the ext, but if it is not installed, + # We need to tell easy_instll it is required + from Cython.Distutils import build_ext as _build_ext + return _build_ext(*args, **kwargs) package_name = 'kmod' @@ -54,6 +59,7 @@ setup( provides=[package_name], maintainer="Andy Grover", maintainer_email="agrover@redhat.com", - cmdclass = {'build_ext': _build_ext}, + cmdclass = {'build_ext': build_ext_workaround}, ext_modules=ext_modules, + install_requires=["Cython"], ) |