From f50bab028dcb6708def6902b00a371f7b63fd961 Mon Sep 17 00:00:00 2001 From: Neil Williams Date: Sun, 8 Jul 2012 17:34:25 -0700 Subject: [PATCH] setup.py: Gracefully handle when Cython is not installed. --- r2/setup.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/r2/setup.py b/r2/setup.py index 12699b613..4d874948d 100644 --- a/r2/setup.py +++ b/r2/setup.py @@ -26,11 +26,23 @@ use_setuptools() from setuptools import find_packages from distutils.core import setup, Extension -from Cython.Distutils import build_ext import os import fnmatch -commands = {"build_ext": build_ext} + +commands = {} + + +try: + from Cython.Distutils import build_ext +except ImportError: + pass +else: + commands.update({ + "build_ext": build_ext + }) + + try: from babel.messages import frontend as babel commands.update({