Kent Karlsson wrote:
> Systemconfig:
> MacOS X 10.2.1, swig 1.3.15, db 4.0.14, subversion r3590, Python 2.2
> I dont have Apache 2 installed, and I took the apr and apr-util
> directories from the r3200 tarball.
>
> subversion is built and installed with following cmdline:
> sh autogen.sh; ./configure --enable-maintainer
> --with-berkeley-db=/usr/local/BerkeleyDB.4.0; make; make install; make
> swig-py-ext; make install-swig-py-ext
>
> I copied the rcsparse.py from the packages/rpm/redhat-8.x/ to
> tools/cvs2svn and tried to run it. I get this result, but Ive no idea
> what to do about it.
>
> [kent:subversion/tools/cvs2svn] kent% ./cvs2svn.py
> Traceback (most recent call last):
> File "./cvs2svn.py", line 17, in ?
> from svn import fs, util, _delta, _repos
> File "/usr/local/lib/python2.2/site-packages/svn/fs.py", line 20, in ?
> import _util
> ImportError: Failure linking new module
>
> Ive never used either swig nor python before.
>
> Anyone with any good ideas?
I ran into the same problem with the newest version of swig. Try this
patch.
Index: subversion/subversion/bindings/swig/apr.i
===================================================================
--- subversion/subversion/bindings/swig/apr.i (revision 3580)
+++ subversion/subversion/bindings/swig/apr.i (working copy)
@@ -56,7 +56,7 @@
%apply long long { apr_time_t };
/* 'apr_time_t *' will always be an OUTPUT parameter */
-%typemap(ignore) apr_time_t * (apr_time_t temp) {
+%typemap(in,num_inputs=0) apr_time_t * (apr_time_t temp) {
$1 = &temp;
}
%typemap(python,argout,fragment="t_output_helper") apr_time_t * {
@@ -78,7 +78,7 @@
create an OUTPUT argument typemap for an apr_hash_t **
*/
-%typemap(ignore) apr_hash_t **OUTPUT (apr_hash_t *temp) {
+%typemap(in,num_inputs=0) apr_hash_t **OUTPUT (apr_hash_t *temp) {
$1 = &temp;
}
@@ -87,7 +87,7 @@
property values
*/
-%typemap(ignore) apr_hash_t **PROPHASH = apr_hash_t **OUTPUT;
+%typemap(in,num_inputs=0) apr_hash_t **PROPHASH = apr_hash_t **OUTPUT;
%typemap(python,argout) apr_hash_t **PROPHASH {
/* toss prior result, get new result from the hash */
Py_DECREF($result);
@@ -106,7 +106,7 @@
apr_file_t ** is always an OUT param
*/
-%typemap(ignore) apr_file_t ** (apr_file_t *temp) {
+%typemap(in,num_inputs=0) apr_file_t ** (apr_file_t *temp) {
$1 = &temp;
}
%typemap(python,argout,fragment="t_output_helper") apr_file_t ** {
Index: subversion/subversion/bindings/swig/svn_client.i
===================================================================
--- subversion/subversion/bindings/swig/svn_client.i (revision 3580)
+++ subversion/subversion/bindings/swig/svn_client.i (working copy)
@@ -16,7 +16,7 @@
* ====================================================================
*/
-%module _client
+%module client
%include typemaps.i
%import apr.i
@@ -82,7 +82,7 @@
handle the return value for svn_client_proplist()
*/
-%typemap(ignore) apr_array_header_t ** (apr_array_header_t *temp) {
+%typemap(in,num_inputs=0) apr_array_header_t ** (apr_array_header_t
*temp) {
$1 = &temp;
}
%typemap(python,argout,fragment="t_output_helper") apr_array_header_t ** {
@@ -138,7 +138,7 @@
/* -----------------------------------------------------------------------
handle the "statushash" OUTPUT param for svn_client_status()
*/
-%typemap(ignore) apr_hash_t **statushash = apr_hash_t **OUTPUT;
+%typemap(in,num_inputs=0) apr_hash_t **statushash = apr_hash_t **OUTPUT;
%typemap(python,argout,fragment="t_output_helper") apr_hash_t
**statushash {
$result = t_output_helper(
$result,
Index: subversion/subversion/bindings/swig/svn_delta.i
===================================================================
--- subversion/subversion/bindings/swig/svn_delta.i (revision 3580)
+++ subversion/subversion/bindings/swig/svn_delta.i (working copy)
@@ -16,7 +16,7 @@
* ====================================================================
*/
-%module _delta
+%module delta
%include "typemaps.i"
Index: subversion/subversion/bindings/swig/svn_fs.i
===================================================================
--- subversion/subversion/bindings/swig/svn_fs.i (revision 3580)
+++ subversion/subversion/bindings/swig/svn_fs.i (working copy)
@@ -16,7 +16,7 @@
* ====================================================================
*/
-%module _fs
+%module fs
%include typemaps.i
%import apr.i
@@ -95,7 +95,7 @@
except for svn_fs_dir_entries, which returns svn_fs_dirent_t structures
*/
-%typemap(ignore) apr_hash_t **entries_p = apr_hash_t **OUTPUT;
+%typemap(in,num_inputs=0) apr_hash_t **entries_p = apr_hash_t **OUTPUT;
%typemap(python,argout,fragment="t_output_helper") apr_hash_t **entries_p {
$result = t_output_helper(
$result,
Index: subversion/subversion/bindings/swig/svn_ra.i
===================================================================
--- subversion/subversion/bindings/swig/svn_ra.i (revision 3580)
+++ subversion/subversion/bindings/swig/svn_ra.i (working copy)
@@ -16,7 +16,7 @@
* ====================================================================
*/
-%module _ra
+%module ra
%include typemaps.i
%import apr.i
Index: subversion/subversion/bindings/swig/svn_repos.i
===================================================================
--- subversion/subversion/bindings/swig/svn_repos.i (revision 3580)
+++ subversion/subversion/bindings/swig/svn_repos.i (working copy)
@@ -16,7 +16,7 @@
* ====================================================================
*/
-%module _repos
+%module repos
%include typemaps.i
%import apr.i
Index: subversion/subversion/bindings/swig/svn_string.i
===================================================================
--- subversion/subversion/bindings/swig/svn_string.i (revision 3580)
+++ subversion/subversion/bindings/swig/svn_string.i (working copy)
@@ -63,7 +63,7 @@
}
/* svn_stringbuf_t ** is always an output parameter */
-%typemap(ignore) svn_stringbuf_t ** (svn_stringbuf_t *temp) {
+%typemap(in,num_inputs=0) svn_stringbuf_t ** (svn_stringbuf_t *temp) {
$1 = &temp;
}
%apply RET_STRING { svn_stringbuf_t ** };
@@ -99,7 +99,7 @@
}
/* svn_string_t ** is always an output parameter */
-%typemap(ignore) svn_string_t ** (svn_string_t *temp) {
+%typemap(in,num_inputs=0) svn_string_t ** (svn_string_t *temp) {
$1 = &temp;
}
%apply RET_STRING { svn_string_t ** };
Index: subversion/subversion/bindings/swig/svn_types.i
===================================================================
--- subversion/subversion/bindings/swig/svn_types.i (revision 3580)
+++ subversion/subversion/bindings/swig/svn_types.i (working copy)
@@ -28,7 +28,7 @@
typemap will be applied onto a "real" type.
*/
-%typemap(ignore) SWIGTYPE **OUTPARAM ($*1_type temp) {
+%typemap(in,num_inputs=0) SWIGTYPE **OUTPARAM ($*1_type temp) {
$1 = ($1_ltype)&temp;
}
%typemap(python, argout, fragment="t_output_helper") SWIGTYPE **OUTPARAM {
Index: subversion/subversion/bindings/swig/svn_wc.i
===================================================================
--- subversion/subversion/bindings/swig/svn_wc.i (revision 3580)
+++ subversion/subversion/bindings/swig/svn_wc.i (working copy)
@@ -16,7 +16,7 @@
* ====================================================================
*/
-%module _wc
+%module wc
%include typemaps.i
%import apr.i
Index: subversion/subversion/bindings/swig/util.i
===================================================================
--- subversion/subversion/bindings/swig/util.i (revision 3580)
+++ subversion/subversion/bindings/swig/util.i (working copy)
@@ -16,7 +16,7 @@
* ====================================================================
*/
-%module _util
+%module util
%include typemaps.i
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Oct 31 18:51:27 2002