projects
/
python-kmod.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d336f7d
)
Issue #15 Cython is now a dependency
author
Guy Rozendorn
<guy@rzn.co.il>
Tue, 2 Apr 2013 08:00:22 +0000
(11:00 +0300)
committer
Guy Rozendorn
<guy@rzn.co.il>
Tue, 2 Apr 2013 08:00:22 +0000
(11:00 +0300)
setup.py
patch
|
blob
|
history
diff --git
a/setup.py
b/setup.py
index 090e5d573d871738742ac5e56df80dd985858ec7..2e15d033da25c0e38c5553beb61899a980f0f14a 100644
(file)
--- a/
setup.py
+++ b/
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/>.
#
# 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 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'
package_name = 'kmod'
@@
-54,6
+59,7
@@
setup(
provides=[package_name],
maintainer="Andy Grover",
maintainer_email="agrover@redhat.com",
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,
ext_modules=ext_modules,
+ install_requires=["Cython"],
)
)