You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Kouhei Sutou <ko...@cozmixng.org> on 2005/01/16 15:50:17 UTC

[PATCH] Could you merge Ruby SWIG-based bindings?

Hi,

I'm still writing Ruby SWIG-based bindings.
  http://pub.cozmixng.org/~kou/diff/svn-add-ruby-20050117.diff

Could you merge this to the svn repository?

---- log message
Added Ruby SWIG-based bindings.

* Makefile.in: added SWIG/Ruby related configuration.

* build.conf: added configuration to compile Ruby bindings.

* configure.in: added ruby detecting configuration.

* build/ac-macros/swig.m4: added configuration to compile
  Ruby bindings. Ruby bindings is available only when SWIG
  version is 1.3.24 or newer.

* subversion/bindings/swig/core.i:
  added SWIG/Ruby related codes.
  swap order of %include and #include.
  (%ignore svn_prop_t): didn't ignore svn_prop_t only when
  SWIGRUBY.
  (%apply SWIGTYPE **OUTPARAM): added svn_config_t **.

* subversion/bindings/swig/svn_repos.i:
  added SWIG/Ruby related codes.
  swap order of %include and #include.
  (%apply const char *MAY_BE_NULL): added const char *unused_{1,2}.

* subversion/bindings/swig/svn_ra.i: swap order of %include
  and #include.

* subversion/bindings/swig/svn_string.i:
  added SWIG/Ruby related codes.

* subversion/bindings/swig/svn_client.i: ditto.

* subversion/bindings/swig/apr.i: ditto.

* subversion/bindings/swig/svn_types.i:
  added SWIG/Ruby related codes.
  swap order of %include and #include.

* subversion/bindings/swig/svn_fs.i: ditto.

* subversion/bindings/swig/svn_wc.i: ditto.

* subversion/bindings/swig/svn_delta.i: ditto.

* subversion/bindings/swig/ruby/test/my-assertions.rb: [NEW]
  original assertions for test.

* subversion/bindings/swig/ruby/test/util.rb: [NEW] utility
  methods for test.

* subversion/bindings/swig/ruby/test/test_client.rb: [NEW]
  tests for svn/client.rb.

* subversion/bindings/swig/ruby/test/run-test.rb: [NEW]
  test running script.

* subversion/bindings/swig/ruby/test/test_core.rb: [NEW]
  tests for svn/core.rb.

* subversion/bindings/swig/ruby/test/test_fs.rb: [NEW]
  tests for svn/fs.rb.

* subversion/bindings/swig/ruby/test/test_repos.rb: [NEW]
  tests for svn/repos.rb.

* subversion/bindings/swig/ruby/test/test_delta.rb: [NEW]
  tests for svn/delta.rb.

* subversion/bindings/swig/ruby/test/test_info.rb: [NEW]
  tests for svn/info.rb.

* subversion/bindings/swig/ruby/test/test_util.rb: [NEW]
  tests for svn/util.rb.

* subversion/bindings/swig/ruby/svn/util.rb: [NEW]
  utilities for svn/*.rb.

* subversion/bindings/swig/ruby/svn/ext/*.rb: [NEW]
  dummy for svn/ext/_*.so.

* subversion/bindings/swig/ruby/svn/client.rb: [NEW]
  wrapper of svn/ext/_client.so for easy to use.

* subversion/bindings/swig/ruby/svn/ra.rb: [NEW]
  wrapper of svn/ext/_ra.so for easy to use.

* subversion/bindings/swig/ruby/svn/core.rb: [NEW]
  wrapper of svn/ext/_core.so for easy to use.

* subversion/bindings/swig/ruby/svn/fs.rb: [NEW]
  wrapper of svn/ext/_fs.so for easy to use.

* subversion/bindings/swig/ruby/svn/repos.rb: [NEW]
  wrapper of svn/ext/_repos.so for easy to use.

* subversion/bindings/swig/ruby/svn/error.rb: [NEW]
  wrapper of svn_error_t for easy to use.

* subversion/bindings/swig/ruby/svn/delta.rb: [NEW]
  wrapper of svn/ext/_delta.so for easy to use.

* subversion/bindings/swig/ruby/svn/wc.rb: [NEW]
  wrapper of svn/ext/_wc.so.

* subversion/bindings/swig/ruby/svn/info.rb: [NEW]
  utility for getting repository information.

* subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.{c,h}:
  [NEW] utilities for wrapping Subversion C API.

* tools/hook-scripts/commit-email.rb: [NEW]
  hook script like commit-email.pl, but this does *not* use
  svnlook.
  features:
    * RSS output.
    * added SHA256 of committed files to mail header.

* tools/examples/svnlook.rb: [NEW] example script like
  svnlook.py.

* tools/examples/svnshell.rb: [NEW] example script like
  svnshell.py.

--
kou

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Could you merge Ruby SWIG-based bindings?

Posted by Michael W Thelen <mi...@pietdepsi.com>.
Kouhei Sutou wrote:
> I'm still writing Ruby SWIG-based bindings.
>   http://pub.cozmixng.org/~kou/diff/svn-add-ruby-20050117.diff
>
> Could you merge this to the svn repository?

Thank you for the patch, I've filed it as issue #2210:
http://subversion.tigris.org/issues/show_bug.cgi?id=2210

--
Michael W Thelen
It is a mistake to think you can solve any major problems just with
potatoes.       -- Douglas Adams

Re: [PATCH] Could you merge Ruby SWIG-based bindings?

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
Philip Martin wrote:
> Garrett Rooney <ro...@electricjellyfish.net> writes:
> 
> 
>>Also, when I run 'make install-swig-rb' it installs all the bindings
>>into $PREFIX/lib/site_ruby, is this what's desired?  It doesn't seem
>>to be what the perl bindings do, for example.
> 
> 
> All I know about the perl bindings is that the last time I tried to
> install them the installation failed, it appeared to require write
> access outside $PREFIX.  Do they install into some "system default"
> location for perl bindings?  The python bindings install into
> $PREFIX/lib/svn-python.  I seem to remember an old discussion about
> whether the python bindings should install into $PREFIX or the system
> default, I suspect perl and python have done things differently.
> 

The perl bindings use MakeMaker, and thus install into the default 
location for the version of perl you're using.  I don't overly object to 
the Ruby bindings installing somewhere else, but I'd like a way to tell 
it "just install with the rest of the ruby modules so I don't have to 
jump through hoops to make it work".

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Could you merge Ruby SWIG-based bindings?

Posted by Philip Martin <ph...@codematters.co.uk>.
Garrett Rooney <ro...@electricjellyfish.net> writes:

> Also, when I run 'make install-swig-rb' it installs all the bindings
> into $PREFIX/lib/site_ruby, is this what's desired?  It doesn't seem
> to be what the perl bindings do, for example.

All I know about the perl bindings is that the last time I tried to
install them the installation failed, it appeared to require write
access outside $PREFIX.  Do they install into some "system default"
location for perl bindings?  The python bindings install into
$PREFIX/lib/svn-python.  I seem to remember an old discussion about
whether the python bindings should install into $PREFIX or the system
default, I suspect perl and python have done things differently.

-- 
Philip Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Could you merge Ruby SWIG-based bindings?

Posted by Kouhei Sutou <ko...@cozmixng.org>.
Hi,

New version for current trunk:
  http://pub.cozmixng.org/~kou/diff/svn-add-ruby-20050118.diff

In <41...@electricjellyfish.net>
  "Re: [PATCH] Could you merge Ruby SWIG-based bindings?" on Sun, 16 Jan 2005 12:11:31 -0500,
  Garrett Rooney <ro...@electricjellyfish.net> wrote:

> > I'm still writing Ruby SWIG-based bindings.
> >   http://pub.cozmixng.org/~kou/diff/svn-add-ruby-20050117.diff
> > 
> > Could you merge this to the svn repository?
> 
> Could you please include some instructions on how these bindings are 
> supposed to be built and used?

This supposes the following:

  * ruby 1.8.2
  * SWIG >= 1.3.24

And I'm using the followings:

  * ruby 1.8.2 (2005-01-10) [i386-linux]    : ruby -v
  * SWIG Version 1.3.25                     : swig -version |& grep Version
    * CVS HEAD
  * 2.6.8-2-k7 i686 GNU/Linux               : uname -rmo
    * Debian GNU/Linux sid

and

  * ruby 1.8.2 (2004-12-25) [i386-freebsd5] : ruby -v
  * SWIG Version 1.3.25                     : swig -version |& grep Version
    * CVS HEAD
  * FreeBSD 5.3-STABLE i386                 : uname -prs

> Step by step instructions as to what make targets are supposed to be 
> used and what commands used to run the tests would be quite useful.

To configure the bindings:

  % ./configure ... --with-swig-ruby-sitedir=$HOME/local/lib/site_ruby

--with-swig-ruby-sitedir option are explained at below. If
you don't specify the option, the bindings are installed to
ruby's default sitedir.

To make the bindings:

  % make swig-rb

To install the bindings:

  % make install-swig-rb

To run test: (don't need install)

  % cd subversion/bindings/swig/ruby && ruby test/run-test.rb

To run without installing:

  % mkdir -p subversion/bindings/swig/ruby/ext/svn
  % ln -fs ../../.libs subversion/bindings/swig/ruby/ext/svn/ext
  % ruby -I subversion/bindings/swig/ruby \
         -I subversion/bindings/swig/ruby/ext \
         ... (script name, `which irb` and so on)

> So far, when trying to run the tests without installing things I can't 
> get them to work at all, and when trying to run them after 'make 
> install' I get relocation errors complaining about not being able to 
> find the symbol rb_hash_foreach.

I think you are using ruby 1.6.x. rb_hash_foreach is not
available on ruby 1.6.x.

> Also, when I run 'make install-swig-rb' it installs all the bindings 
> into $PREFIX/lib/site_ruby, is this what's desired?  It doesn't seem to 
> be what the perl bindings do, for example.

I wanted to customize installed directory. So I used $PREFIX
to do this. But it wasn't good idea.

I added a new configure option,
--with-swig-ruby-sitedir. Users can customize installed base
directory. If users don't set this, the bindings are
installed system default directory which can be got by the
following:

  % ruby -r rbconfig -e 'puts Config::CONFIG["sitedir"]'

--
kou

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Could you merge Ruby SWIG-based bindings?

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
Kouhei Sutou wrote:
> Hi,
> 
> I'm still writing Ruby SWIG-based bindings.
>   http://pub.cozmixng.org/~kou/diff/svn-add-ruby-20050117.diff
> 
> Could you merge this to the svn repository?

Could you please include some instructions on how these bindings are 
supposed to be built and used?  I'm stumbling along through them, and 
seem to be making some progress, but I can't seem to make them actually 
do anything, even though I'm now using the correct version of Swig. 
Step by step instructions as to what make targets are supposed to be 
used and what commands used to run the tests would be quite useful.

So far, when trying to run the tests without installing things I can't 
get them to work at all, and when trying to run them after 'make 
install' I get relocation errors complaining about not being able to 
find the symbol rb_hash_foreach.

Also, when I run 'make install-swig-rb' it installs all the bindings 
into $PREFIX/lib/site_ruby, is this what's desired?  It doesn't seem to 
be what the perl bindings do, for example.

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org