Skip to content

Commit

Permalink
Continue building even if svn revision detection breaks.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanv committed Jun 17, 2009
1 parent aed9ab9 commit b9a22d7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions setup.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
MICRO = 0 MICRO = 0
ISRELEASED = False ISRELEASED = False
VERSION = '%d.%d.%d' % (MAJOR, MINOR, MICRO) VERSION = '%d.%d.%d' % (MAJOR, MINOR, MICRO)

# Return the svn version as a string, raise a ValueError otherwise # Return the svn version as a string, raise a ValueError otherwise
def svn_version(): def svn_version():
def _minimal_ext_cmd(cmd): def _minimal_ext_cmd(cmd):
Expand All @@ -76,14 +76,15 @@ def _minimal_ext_cmd(cmd):
return "" return ""


r = re.compile('Revision: ([0-9]+)') r = re.compile('Revision: ([0-9]+)')
svnver = None svnver = ""
for line in out.split('\n'): for line in out.split('\n'):
m = r.match(line) m = r.match(line.strip())
if m: if m:
svnver = m.group(1) svnver = m.group(1)


if not svnver: if not svnver:
raise ValueError("Error while parsing svn version ?") print("Error while parsing svn version")

return svnver return svnver


# BEFORE importing distutils, remove MANIFEST. distutils doesn't properly # BEFORE importing distutils, remove MANIFEST. distutils doesn't properly
Expand Down

0 comments on commit b9a22d7

Please sign in to comment.