Commit 2381cf24 authored by Stefan Behnel's avatar Stefan Behnel

assume that source files without suffix are Python files instead of rejecting them

parent 87a227a1
......@@ -163,15 +163,7 @@ def parse_command_line(args):
sys.stderr.write("Unknown compiler flag: %s\n" % option)
sys.exit(1)
else:
arg = pop_arg()
if arg.endswith(".pyx"):
sources.append(arg)
elif arg.endswith(".py"):
# maybe do some other stuff, but this should work for now
sources.append(arg)
else:
sys.stderr.write(
"cython: %s: Unknown filename suffix\n" % arg)
sources.append(pop_arg())
if options.use_listing_file and len(sources) > 1:
sys.stderr.write(
"cython: Only one source file allowed when using -o\n")
......
......@@ -616,7 +616,7 @@ def run_pipeline(source, options, full_module_name = None):
options.annotate = True
# Get pipeline
if source_ext.lower() == '.py':
if source_ext.lower() == '.py' or not source_ext:
pipeline = context.create_py_pipeline(options, result)
else:
pipeline = context.create_pyx_pipeline(options, result)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment