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

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

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('.'))).

Revision history for this message
Martin Packman (gz) wrote :

My weak version of the fix for this issue was insufficient given the craziness of pyrex and cython versioning, needs revisiting and making more robust.

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.