Mercurial > hgsubversion
comparison 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 |
comparison
equal
deleted
inserted
replaced
611:b70f7c82b9b8 | 612:2c15e4c50a54 |
---|---|
91 mat = re.findall('.*"(.*)"', open(verfile).read()) | 91 mat = re.findall('.*"(.*)"', open(verfile).read()) |
92 version = mat[0] | 92 version = mat[0] |
93 if not version: | 93 if not version: |
94 version = 'unknown' | 94 version = 'unknown' |
95 | 95 |
96 try: | |
97 from svn import core | |
98 assert core.SVN_VER_MAJOR == 1 | |
99 assert core.SVN_VER_MINOR >= 5 | |
100 except ImportError: | |
101 raise Exception('You need to install the SWIG' | |
102 ' bindings for Subversion to use this package.') | |
103 except AssertionError: | |
104 raise Exception('You need at least Subversion 1.5 to use this package.') | |
105 | |
106 requires = [] | 96 requires = [] |
107 try: | 97 try: |
108 import mercurial | 98 import mercurial |
109 except ImportError: | 99 except ImportError: |
110 requires.append('mercurial') | 100 requires.append('mercurial') |
101 | |
102 # Ensure that the Subversion bindings are present | |
103 sys.path.insert(0, 'hgsubversion') | |
104 import svnwrap | |
111 | 105 |
112 setup( | 106 setup( |
113 name = 'hgsubversion', | 107 name = 'hgsubversion', |
114 version = version, | 108 version = version, |
115 url = 'http://bitbucket.org/durin42/hgsubversion', | 109 url = 'http://bitbucket.org/durin42/hgsubversion', |