muodov / kociemba

A pure Python and pure C ports of Kociemba's algorithm for solving Rubik's cube
GNU General Public License v2.0
561 stars 126 forks source link

fix pip installing the library in python 3 #37

Closed RobertLucian closed 5 years ago

RobertLucian commented 5 years ago

This fixes the installation process for Python3. This is what I was getting before this fix:

    ERROR: Complete output from command python setup.py egg_info:
    ERROR: Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-xogkhbdz/kociemba/setup.py", line 5, in <module>
        long_description = open(os.path.join(os.path.dirname(__file__), 'README.md')).read()
      File "/home/pi/.venv/lib/python3.5/encodings/ascii.py", line 26, in decode
        return codecs.ascii_decode(input, self.errors)[0]
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 4166: ordinal not in range(128)
    ----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-xogkhbdz/kociemba/

Also, I had to use the io module to make it compatible with Python 2.x too.

muodov commented 5 years ago

Thanks for this @RobertLucian ! Sounds like this might fix https://github.com/muodov/kociemba/issues/34 as well

muodov commented 5 years ago

The tests passed https://travis-ci.org/muodov/kociemba/builds/549636732

RobertLucian commented 5 years ago

Great! Does this mean there's going to be a 1.2.1 out there?

noetejaxun commented 2 years ago

:(