Skip to content

Can't compile with Python 3 #26

@plison

Description

@plison

I get an error when trying to compile the library (using Python 3.5):

cythoning zen/algorithms/shortest_path.pyx to zen/algorithms/shortest_path.c

Error compiling Cython file:
------------------------------------------------------------
...
		return distance, predecessor
	else:
		return distance

def dijkstra_cmp(x,y):
	return cmp(x.cost,y.cost)
          ^
------------------------------------------------------------

zen/algorithms/shortest_path.pyx:680:11: undeclared name not builtin: cmp

The error is most likely caused by the removal of the cmp builtin function from Python 3, see https://docs.python.org/3.0/whatsnew/3.0.html#ordering-comparisons

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions