~ubuntu-branches/ubuntu/trusty/pylucene/trusty

« back to all changes in this revision

Viewing changes to jcc/jcc/__main__.py

  • Committer: Package Import Robot
  • Author(s): Dmitry Nezhevenko
  • Date: 2012-04-23 16:43:55 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20120423164355-grqtepnwtecdjfk2
Tags: 3.5.0-1
* New maintainer (closes: 670179)
* New upstream release
* Switch to dpkg-source 3.0 (quilt) format
* Switch to machine-readable debian/copyright
* Bump debian/compat to 8, drop debian/pycompat
* Switch from cdbs to dh
* Add watch file
* Build for all supported versions of python2 (closes: 581198, 632240)
* Rename binary package to python-lucene (closes: 581197)
* Add -dbg package

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
import sys
 
3
 
 
4
from jcc import cpp
 
5
 
 
6
if len(sys.argv) == 1 or '--help' in sys.argv:
 
7
    help = '''
 
8
  JCC - C++/Python Java Native Interface Code Generator
 
9
 
 
10
  Usage: python -m jcc.__main__ [options] [actions]
 
11
 
 
12
  Input options:
 
13
    --jar JARFILE           - make JCC wrap all public classes found in
 
14
                              JARFILE, add it to the module's CLASSPATH and
 
15
                              include it in the distribution 
 
16
    --include JARFILE       - include JARFILE in the distribution and add
 
17
                              it to the module's CLASSPATH
 
18
    --import MODULE         - link against the wrappers to classes shared
 
19
                              with MODULE instead of generating duplicate
 
20
                              and incompatible wrappers
 
21
    --exclude CLASS         - explicitly don't wrap CLASS
 
22
    --package PACKAGE       - add PACKAGE to the list of packages from
 
23
                              which dependencies are automatically wrapped
 
24
    --classpath [PATH|JAR]  - add [PATH|JAR] to CLASSPATH while generating
 
25
                              wrappers 
 
26
    --libpath [PATH]        - add [PATH] to java.library.path while generating
 
27
                              wrappers 
 
28
    --module MODULE         - include Python MODULE in the distribution
 
29
    --reserved SYMBOL       - mark SYMBOL as a reserved word that will be
 
30
                              mangled in the generated C++ code to avoid
 
31
                              clashes with C/C++ reserved words or header
 
32
                              file definitions
 
33
    --vmarg                 - add extra Java VM initialization parameter
 
34
    --resources             - include resource directory in distribution as
 
35
                              package data
 
36
 
 
37
  Python wrapper generation options:
 
38
    --python NAME           - generate wrappers for use from Python in a module
 
39
                              called NAME
 
40
    --version VERSION       - the generated module's version number
 
41
    --shared                - generate a module that links against a shared
 
42
                              library version of the JCC runtime so that
 
43
                              multiple JCC-wrapped modules can be used within
 
44
                              the same Python runtime
 
45
    --sequence CLASS METHODSIGNATURE
 
46
                            - generate a pythonic sequence protocol wrapper for
 
47
                              CLASS
 
48
    --mapping CLASS METHODSIGNATURE1 METHODSIGNATURE2
 
49
                            - generate a pythonic map protocol wrapper for CLASS
 
50
    --rename CLASS1=NAME1,CLASS2=NAME2,...
 
51
                            - rename one or more Python wrapper classes to
 
52
                              avoid name clashes due to the flattening of
 
53
                              the Java package namespaces as mapped into
 
54
                              Python
 
55
    --no-generics           - disable support for Java generics
 
56
 
 
57
    If you're planning to use pythonic wrappers you should read the relevant
 
58
    documentation first:
 
59
      http://lucene.apache.org/pylucene/jcc/documentation/readme.html#python
 
60
 
 
61
  Output options:
 
62
    --debug                 - generate a module using the C++ compiler's
 
63
                              debug options
 
64
    --output OUTPUTDIR      - the wrapper will be generated in OUTPUTDIR,
 
65
                              'build' by default
 
66
    --files N               - split the generated wrapper file into at least
 
67
                              N files to workaround C++ compiler file size
 
68
                              limitations 
 
69
    --arch                  - Mac OS X only: filter the -arch parameters
 
70
                              Python was configured with to build leaner
 
71
                              binaries, faster
 
72
    --find-jvm-dll          - Windows only: extract the directory containing
 
73
                              jvm.dll from the registry and append it to the
 
74
                              Path at runtime
 
75
 
 
76
  Actions:
 
77
    --build                 - generate the wrapper and compile it
 
78
    --compile               - recompile the (previously generated) module
 
79
    --install               - install the wrapper in the local site-packages
 
80
 
 
81
  Distribution actions:
 
82
    --use-distutils         - use distutils even when setuptools is available
 
83
    --bdist                 - generate a binary distutils-based distribution
 
84
                              or a setuptools-based .egg
 
85
    --wininst               - create an installer application for Microsoft
 
86
                              Windows
 
87
 
 
88
  Other distutils/setuptools options (there are passed right through):
 
89
    --compiler COMPILER     - use COMPILER instead of the platform default
 
90
    --root ROOTDIR
 
91
    --install-dir INSTALLDIR
 
92
    --prefix PREFIX
 
93
    --home HOMEDIR
 
94
'''
 
95
    print help
 
96
    sys.exit(0)
 
97
  
 
98
cpp.jcc(sys.argv)