summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2014-03-10 08:22:09 -0400
committerJason R. Coombs <jaraco@jaraco.com>2014-03-10 08:22:09 -0400
commit79f6bdacd3f45a20b1c59a8fb66ab7d552a6d57f (patch)
tree3e7fa5cf1e529855b84a90265cb6fda078e146af
parentfe8827014623717357c99c5a819a9d1953d5957e (diff)
downloadpython-setuptools-bitbucket-79f6bdacd3f45a20b1c59a8fb66ab7d552a6d57f.tar.gz
self.language could be None (and is None by default)
-rw-r--r--setuptools/extension.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/setuptools/extension.py b/setuptools/extension.py
index 06ec1cec..d8516092 100644
--- a/setuptools/extension.py
+++ b/setuptools/extension.py
@@ -38,7 +38,8 @@ class Extension(_Extension):
# the build has Cython, so allow it to compile the .pyx files
return
def pyx_to_target(source):
- target_ext = '.cpp' if self.language.lower() == 'c++' else '.c'
+ lang = self.language or ''
+ target_ext = '.cpp' if lang.lower() == 'c++' else '.c'
if source.endswith('.pyx'):
source = source[:-4] + target_ext
return source