fhirschmann / rdp

Python/Numpy implementation of the Ramer-Douglas-Peucker algorithm
https://pypi.python.org/pypi/rdp
MIT License
244 stars 117 forks source link

Update setup.py #2

Closed zippy1981 closed 9 years ago

zippy1981 commented 9 years ago

Needed to explicitly declare encoding on windows python 3.4.2.

fhirschmann commented 9 years ago

Hi Justin,

Thanks for the fix! Would you mind adding

from io import open

to setup.py for python2 compatibility to this pull request?

zippy1981 commented 9 years ago

Apparently this isn't enough for the module to work with python 3.4.2 yet, I'll need to work on the module itself. its complaining about xrange().

Expect more pull requests.

fhirschmann commented 9 years ago

Thanks Justin.

xrange has become range in Python 3. One simple solution I could think of is something like

import sys
if sys.version_info.major >= 3:
    xrange = range
zippy1981 commented 9 years ago

See my other pull request.