taichino / croniter

croniter is a python module to provide iteration for datetime object.
http://github.com/taichino/croniter
387 stars 105 forks source link

fix missing encoding parameter in setup.py #172

Closed olivierdalang closed 3 years ago

olivierdalang commented 3 years ago

This fixes setup.py on Windows (see log below).

Reference : https://www.python.org/dev/peps/pep-0597/#using-the-default-encoding-is-a-common-mistake

PS C:\Somewhere\croniter> pip install -e .
Obtaining file:///C:/Somewhere/croniter
    ERROR: Command errored out with exit status 1:
     command: 'c:\somewhere\appdata\local\programs\python\python38\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Olivier\\Code\\croniter\\setup.py'"'"'; __file__='"'"'C:\\Users\\Olivier\\Code\\croniter\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Somewhere\AppData\Local\Temp\pip-pip-egg-info-_hgf5n4g'
    Complete output (9 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Somewhere\croniter\setup.py", line 20, in <module>
        read('docs', 'CHANGES.rst'),
      File "C:\Somewhere\croniter\setup.py", line 7, in read
        return open(
      File "c:\somewhere\appdata\local\programs\python\python38\lib\encodings\cp1252.py", line 23, in decode
        return codecs.charmap_decode(input,self.errors,decoding_table)[0]
    UnicodeDecodeError: 'charmap' codec can't decode byte 0x8f in position 4671: character maps to <undefined>
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
kiorky commented 3 years ago

thx

kiorky commented 3 years ago

(its to ease the run on windows, its not a mistake..)

kiorky commented 3 years ago

for next PR, please open a fork against https://github.com/kiorky/croniter see README: "Website: https://github.com/kiorky/croniter"

@taichino abandoned croniter and i cant change official fork...