blob: 91d106a4bdcb1596b365566c5d11e86a353225b2 [file] [log] [blame]
Tor Norbye3a2425a2013-11-04 10:16:08 -08001"""distutils.jythoncompiler
2
3Jython does not support extension libraries. This CCompiler simply
4raises CCompiler exceptions.
5"""
6
7from distutils.ccompiler import CCompiler
8from distutils.errors import CCompilerError
9
10class JythonCompiler(CCompiler):
11
12 """Refuses to compile C extensions on Jython"""
13
14 compiler_type = 'jython'
15 executables = {}
16
17 def refuse_compilation(self, *args, **kwargs):
18 """Refuse compilation"""
19 raise CCompilerError('Compiling extensions is not supported on Jython')
20
21 preprocess = compile = create_static_lib = link = refuse_compilation