From 436dc04232ce41ed14461abbbd90ba84f3d6e5b5 Mon Sep 17 00:00:00 2001
From: Massimiliano Adamo <maxadamo@gmail.com>
Date: Fri, 14 Feb 2025 14:38:12 +0100
Subject: [PATCH] fix: add UTF-8 encoding to file reads in setup.py for better
 compatibility

---
 setup.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/setup.py b/setup.py
index 7426b98..36abb93 100644
--- a/setup.py
+++ b/setup.py
@@ -12,7 +12,7 @@ DESC = """ this tool is used in conjunction with certbot to leverage
  the lifecycle of the certificates on the key store"""
 requirements = [
     x.strip() for x in
-    open("requirements.txt").readlines() if not x.startswith('#') and x != '\n']
+    open("requirements.txt", encoding='utf-8').readlines() if not x.startswith('#') and x != '\n']
 
 rmtree('dist', ignore_errors=True)
 rmtree('deb_dist', ignore_errors=True)
@@ -20,7 +20,7 @@ rmtree('deb_dist', ignore_errors=True)
 
 def read(fname):
     """ get file name """
-    return open(os.path.join(os.path.dirname(__file__), fname)).read()
+    return open(os.path.join(os.path.dirname(__file__), fname), encoding='utf-8').read()
 
 
 setup(
-- 
GitLab