Closed tomaarsen closed 4 months ago
version = {} with open(f"{package_name}/version.py", encoding="utf8") as fp: exec(fp.read(), version) version["version"]
Thanks! You are right that exec is not great. I believe import would fail due to how setup.py is designed, but would need to look into it.
Hello!
Pull Request overview
Details
Currently, the
open("README.md")
insetup.py
is complaining on Windows with:due to some unexpected character somewhere. Specifying the encoding as UTF-8 is a standard way to allow Windows users to open files safely.
Unrelated
Another thing, perhaps you can just do:
rather than
Also because I don't like using
exec
, but it's personal preference.