| Tor Norbye | 3a2425a | 2013-11-04 10:16:08 -0800 | [diff] [blame^] | 1 | """distutils.jythoncompiler |
| 2 | |
| 3 | Jython does not support extension libraries. This CCompiler simply |
| 4 | raises CCompiler exceptions. |
| 5 | """ |
| 6 | |
| 7 | from distutils.ccompiler import CCompiler |
| 8 | from distutils.errors import CCompilerError |
| 9 | |
| 10 | class 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 |