aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/extension.py
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
commitc8da4c3399dd564c24a42171e7043d43e0b01659 (patch)
tree7526efe891cd91471dc6d3e350792980c492c422 /setuptools/extension.py
parent261a4ed096f5be63d138eadc31361038b0b515fd (diff)
downloadexternal_python_setuptools-c8da4c3399dd564c24a42171e7043d43e0b01659.tar.gz
external_python_setuptools-c8da4c3399dd564c24a42171e7043d43e0b01659.tar.bz2
external_python_setuptools-c8da4c3399dd564c24a42171e7043d43e0b01659.zip
self.language could be None (and is None by default)
Diffstat (limited to 'setuptools/extension.py')
-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