"""
import optparse
+from os.path import splitext, basename
usage= '%prog [-o outfile] [-p] module [module ...]'
description = 'Create a C file for embedding Cython modules.'
old_stdout = sys.stdout
sys.stdout = open(options.output, 'w')
-def format_modname(name):
- if name.endswith('.pyx'):
- name = name[:-4]
- elif name.endswith('.py'):
- name = name[:-3]
- return name.replace('.','_')
-
-modules = [format_modname(x) for x in args]
+modules = [basename(splitext(x)[0]).replace('.', '_') for x in args]
print """\
#include <Python.h>