Bazaar setup.py doesn't handle dev version of pyrex

Bug #1128350 reported by gkb1986
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
New
Undecided
gkb1986

Bug Description

I had trouble installing Bazaar from source. After some digging, I traced the problem to how setup.py handles the dev version of pyrex. When pyrex dev versions have been installed, pyrex_version in the code below has a '-dev' suffix. 'int' doesn't handle this well and throws an uncaught exception.

Here's the change I made to the setup.py file in order to get it to work.

Sorry about the clumsiness. I didn't checkout a repo and couldn't generate a proper patch easily.

Line 205
Old version:
  pyrex_version_info = tuple(map(int, pyrex_version.rstrip("+").split('.'))

This is the output of pyrex_version.restrip("+").split('.'):
  ['0', '19-dev']

My version
  import re
  get_version_info = lambda x: int( re.sub("[^0-9]", "", x ) )
  pyrex_version_info = tuple(map(get_version_info,
    pyrex_version.rstrip("+").split('.'))).

gkb1986 (gajukbhat)
Changed in bzr:
assignee: nobody → gkb1986 (gajukbhat)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.