Philipp von Weitershausen <philipp@weitershausen.de>


Patch
r846084

r846084 | cmpilato | 2003-05-22 16:09:36 +0000 (Thu, 22 May 2003)

Make the SWIG bindings to python as easy to use and as Python-esque as
possible by letting SWIG generate the shadow classes.  

Patch by: Philipp von Weitershausen <philipp@weitershausen.de> 
(Resulting from previous discussion with cmpilato and gstein).
(Tweaked by me.)

     NOTE: Existing python code should still run unless it uses 
     accessor functions.  Instead of using accessor functions, 
     you can now simply acquire the attribute of your struct 
     wrapping object to acquire a struct member -- for example,
     ctx.auth_baton instead of svn_client_ctx_t_auth_baton_get(ctx).

     ANOTHER NOTE: For those of you like cmpilato who are symlinking
     to the 'svn-python/svn' package from your Python site-packages,
     you'll want to now additionally symlink to the 'svn-python/libsvn'.

--

* Makefile.in
    Do not call SWIG with the -noproxy flag: build shadow classes
    instead of accessor functions for structs.  The pure SWIG bindings
    are available as the 'libsvn' package while the 'svn' package
    provides extra auxiliary classes and functions for the python
    programmer.

* build.conf
    Track rename of util.i to core.i.

* subversion/bindings/swig/python
    Add '*.py' to the list of ignores in 'svn:ignore'.

* subversion/bindings/swig/python/__init__.py
* subversion/bindings/swig/python/svn/core.py
    New files.

* subversion/bindings/swig/util.i
* subversion/bindings/swig/core.i
    Renamed the 'util' module to 'core' since it does not provide
    simple utilities but core funtionality. Importing 'util' still
    works for compatibility reasons, but be aware that this is likely
    to go away in the future.

* subversion/bindings/swig/apr.i
* subversion/bindings/swig/svn_client.i
* subversion/bindings/swig/svn_delta.i
* subversion/bindings/swig/svn_fs.i
* subversion/bindings/swig/svn_ra.i
* subversion/bindings/swig/svn_repos.i
* subversion/bindings/swig/svn_wc.i
    Remove leading underscore from module names, and track move of
    util.i to core.i

* tools/examples/blame.py
* tools/examples/dumpprops.py
* tools/examples/getfile.py
* tools/examples/geturl.py
* tools/examples/svnlook.py
* tools/examples/svnshell.py
* tools/hook-scripts/tests/mailer-tweak.py
* subversion/bindings/swig/python/svn/client.py
* subversion/bindings/swig/python/svn/delta.py
* subversion/bindings/swig/python/svn/fs.py
* subversion/bindings/swig/python/svn/ra.py
* subversion/bindings/swig/python/svn/repos.py
* subversion/bindings/swig/python/svn/util.py
* subversion/bindings/swig/python/svn/wc.py
    Use 'core' module instead of 'util'. 'util' is deprecated.
    Also, use attributes instead of accessor functions.

* subversion/bindings/swig/python/fstest.py
* subversion/bindings/swig/python/setup.py
    Removed.