diff options
author | Guy Rozendorn <guy@rzn.co.il> | 2013-04-02 17:46:45 +0300 |
---|---|---|
committer | Lucas De Marchi <lucas.demarchi@intel.com> | 2014-03-25 00:34:16 -0300 |
commit | c03dfbd5a7b722032c30fa5b532247b25ae87352 (patch) | |
tree | 07c000c4787304ad239311836b79dff826f4bd0c | |
parent | 60ce23e707e1dde852b25843f3334627f474424c (diff) | |
download | kmod-c03dfbd5a7b722032c30fa5b532247b25ae87352.tar.gz kmod-c03dfbd5a7b722032c30fa5b532247b25ae87352.tar.bz2 kmod-c03dfbd5a7b722032c30fa5b532247b25ae87352.zip |
python: Issue #15: resovled by using setuptools_cython
-rw-r--r-- | libkmod/python/setup.py | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/libkmod/python/setup.py b/libkmod/python/setup.py index f105782..f6e25b7 100644 --- a/libkmod/python/setup.py +++ b/libkmod/python/setup.py @@ -20,13 +20,12 @@ import os as _os import sys as _sys import platform - -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) - +# setuptools DWIM monkey-patch madness +# http://mail.python.org/pipermail/distutils-sig/2007-September/thread.html#8204 +import sys +if 'setuptools.extension' in sys.modules: + m = sys.modules['setuptools.extension'] + m.Extension.__dict__ = m._Extension.__dict__ package_name = 'kmod' @@ -58,8 +57,7 @@ setup( provides=[package_name], maintainer="Andy Grover", maintainer_email="agrover@redhat.com", - cmdclass = {'build_ext': build_ext_workaround}, ext_modules=ext_modules, install_requires=["Cython"], - setup_requires=["Cython"], + setup_requires=["setuptools_cython"], ) |