Wrap ra module.
authorJelmer Vernooij <jelmer@samba.org>
Sun, 16 Nov 2008 16:45:29 +0000 (17:45 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Sun, 16 Nov 2008 16:45:29 +0000 (17:45 +0100)
setup.py
subvertpy/__init__.py
subvertpy/_ra.c [moved from subvertpy/ra.c with 99% similarity]
subvertpy/ra.py [new file with mode: 0644]

index 5b885f46d23963966581260a89a35ad953fa3638..0f629d54efebfd8d5332eb18eb93e561942f7cec 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -295,8 +295,8 @@ def source_path(filename):
 
 def subvertpy_modules(basemodule):
     return [
-        SvnExtension("%s.client" % basemodule, [source_path(n) for n in "client.c", "editor.c", "util.c", "ra.c", "wc.c"], libraries=["svn_client-1", "svn_subr-1"]), 
-        SvnExtension("%s.ra" % basemodule, [source_path(n) for n in "ra.c", "util.c", "editor.c"], libraries=["svn_ra-1", "svn_delta-1", "svn_subr-1"]),
+        SvnExtension("%s.client" % basemodule, [source_path(n) for n in "client.c", "editor.c", "util.c", "_ra.c", "wc.c"], libraries=["svn_client-1", "svn_subr-1"]), 
+        SvnExtension("%s._ra" % basemodule, [source_path(n) for n in "_ra.c", "util.c", "editor.c"], libraries=["svn_ra-1", "svn_delta-1", "svn_subr-1"]),
         SvnExtension("%s.repos" % basemodule, [source_path(n) for n in "repos.c", "util.c"], libraries=["svn_repos-1", "svn_subr-1"]),
         SvnExtension("%s.wc" % basemodule, [source_path(n) for n in "wc.c", "util.c", "editor.c"], libraries=["svn_wc-1", "svn_subr-1"])
         ]
index bb3e3300e724dfc423a22fcdcb7a313253a56d1e..de9ac318d346fd826e8e4f92f2975dca699dbfff 100644 (file)
@@ -74,8 +74,8 @@ def _check_mtime(m):
     return True
 
 try:
-    import client, ra, repos, wc
-    for x in client, ra, repos, wc:
+    import client, _ra, repos, wc
+    for x in client, _ra, repos, wc:
         if not _check_mtime(x):
             warn("subvertpy extensions are outdated and need to be rebuilt")
             break
similarity index 99%
rename from subvertpy/ra.c
rename to subvertpy/_ra.c
index 1e6b2c0667c9fccf577ea2471e2e0f0fc3fc1e7d..dd8a238f0337d62b3475c88099d0d69f39b721b4 100644 (file)
@@ -2822,7 +2822,7 @@ static PyMethodDef ra_module_methods[] = {
        { NULL, }
 };
 
-void initra(void)
+void init_ra(void)
 {
        static apr_pool_t *pool;
        PyObject *mod;
@@ -2862,7 +2862,7 @@ void initra(void)
                return;
        svn_ra_initialize(pool);
 
-       mod = Py_InitModule3("ra", ra_module_methods, "Remote Access");
+       mod = Py_InitModule3("_ra", ra_module_methods, "Remote Access");
        if (mod == NULL)
                return;
 
diff --git a/subvertpy/ra.py b/subvertpy/ra.py
new file mode 100644 (file)
index 0000000..ed90dcc
--- /dev/null
@@ -0,0 +1,20 @@
+# Copyright (C) 2006-2008 Jelmer Vernooij <jelmer@samba.org>
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+"""Python bindings for Subversion."""
+
+__author__ = "Jelmer Vernooij <jelmer@samba.org>"
+
+from _ra import *