diff setup.py @ 612:2c15e4c50a54

setup: check for Subversion by importing the `svnwrap' module.
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Fri, 14 May 2010 20:27:14 +0200
parents 09c016174e33
children 55d6697b975a
line wrap: on
line diff
--- a/setup.py
+++ b/setup.py
@@ -93,22 +93,16 @@ if os.path.exists(verfile):
 if not version:
     version = 'unknown'
 
-try:
-    from svn import core
-    assert core.SVN_VER_MAJOR == 1
-    assert core.SVN_VER_MINOR >= 5
-except ImportError:
-    raise Exception('You need to install the SWIG'
-                    ' bindings for Subversion to use this package.')
-except AssertionError:
-    raise Exception('You need at least Subversion 1.5 to use this package.')
-
 requires = []
 try:
     import mercurial
 except ImportError:
     requires.append('mercurial')
 
+# Ensure that the Subversion bindings are present
+sys.path.insert(0, 'hgsubversion')
+import svnwrap
+
 setup(
     name = 'hgsubversion',
     version = version,