~ubuntu-branches/ubuntu/precise/cython/precise

« back to all changes in this revision

Viewing changes to Cython/Compiler/CmdLine.py

  • Committer: Bazaar Package Importer
  • Author(s): Python Applications Packaging Team, Ryan Kavanagh, Jakub Wilk, Piotr Ożarowski
  • Date: 2009-08-10 23:18:51 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20090810231851-i6f7mr1ij1h2czkp
Tags: 0.11.2-1
[ Ryan Kavanagh ]
* New upstream release (Closes: #525620, #536213)

[ Jakub Wilk ]
* debian/rules: remove generated files.

[ Piotr Ożarowski ]
* Standards-Version bumped to 3.8.2 (no change needed)

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
  -a, --annotate                 Produce a colorized HTML version of the source.
39
39
  --line-directives              Produce #line directives pointing to the .pyx source
40
40
  --cplus                        Output a c++ rather than c file.
41
 
  -X, --directive <name>=<value>[,<name=value,...] Overrides a compiler directive
 
41
  --embed                        Embed the Python interpreter in a main() method.
 
42
  --directive <name>=<value>[,<name=value,...] Overrides a compiler directive
42
43
"""
 
44
 
43
45
#The following experimental options are supported only on MacOSX:
44
46
#  -C, --compile    Compile generated .c file to .o file
45
47
#  -X, --link       Link .o file to produce extension module (implies -C)
80
82
            elif option in ("-C", "--compile"):
81
83
                options.c_only = 0
82
84
            elif option in ("-X", "--link"):
 
85
                if option == "-X":
 
86
                    print >>sys.stderr, "Deprecation warning: The -X command line switch will be changed to a"
 
87
                    print >>sys.stderr, "shorthand for --directive in Cython 0.12. Please use --link instead."
 
88
                    print >>sys.stderr
83
89
                options.c_only = 0
84
90
                options.obj_only = 0
85
91
            elif option in ("-+", "--cplus"):
86
92
                options.cplus = 1
 
93
            elif option == "--embed":
 
94
                Options.embed = True
87
95
            elif option.startswith("-I"):
88
96
                options.include_path.append(get_param(option))
89
97
            elif option == "--include-dir":
145
153
        sys.exit(1)
146
154
    if len(sources) == 0 and not options.show_version:
147
155
        bad_usage()
 
156
    if Options.embed and len(sources) > 1:
 
157
        sys.stderr.write(
 
158
            "cython: Only one source file allowed when using -embed\n")
 
159
        sys.exit(1)
148
160
    return options, sources
149
161