From ce73f172c50c10152c57dd6857f391be86d8c144 Mon Sep 17 00:00:00 2001 From: arjxn-py Date: Thu, 20 Aug 2026 18:38:33 +0530 Subject: [PATCH] fix: read README.md as UTF-8 in setup.py --- setup.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index f586024..b907e22 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,14 @@ +from pathlib import Path + from setuptools import setup, find_packages +# Read as UTF-8 rather than in whatever the locale encoding happens to be: the +# README contains emoji, which cp1252 (the Windows default) cannot decode, and +# the failure aborts metadata generation for the whole package. Resolving the +# path against this file also keeps it readable when setup.py runs from another +# working directory. +long_description = (Path(__file__).parent / 'README.md').read_text(encoding='utf-8') + setup( name='yprov4wfs', version='0.0.9', @@ -8,7 +17,7 @@ install_requires=[], author='Carolina Sopranzetti', description='A module for tracking the provenance of a workflow using a Workflow Management System.', - long_description=open('README.md').read(), + long_description=long_description, long_description_content_type='text/markdown', url='https://github.com/HPCI-Lab/yProv4WFs', license='GNU General Public License v3 (GPLv3)',