pleiszenburg / zugbruecke

Calling routines in Windows DLLs from Python scripts running under Linux, MacOS or BSD
https://zugbruecke.readthedocs.io/en/latest/
GNU Lesser General Public License v2.1
108 stars 11 forks source link

setup.py leaves choice of encoding to os / python when reading README.rst #65

Closed s-m-e closed 1 year ago

s-m-e commented 4 years ago

Reported by @jayvdb in #55 although not related.

This is probably the cause of my rpm %check failures at https://build.opensuse.org/package/show/home:jayvdb:py-bridge/python-zugbruecke

If we can get this solved, I can run zugbruecke tests on the openSUSE test grid, which includes arms, ppc, etc, which addresses some of your other outstanding issues.

This line in setup.py opens README.rst without specifying the encoding. On must Unix systems, it defaults to UTF-8. In your case, for your Leap 15.1 build, it apparently defaults to ASCII. Subsequent reading of the file therefore fail. Having said "most Unix systems", I have not seen this before. Appears to be some odd configuration of OBS.

Workaround (until I can publish a fix)

Replace ...

open(os.path.join(os.path.dirname(__file__), 'README.rst'))

... with ...

open(os.path.join(os.path.dirname(__file__), 'README.rst'), encoding = 'utf-8')
s-m-e commented 1 year ago

Fixed as part of v0.1.0 (no more setup.py).