Ensure README is read with utf-8 encoding in setup.py

This commit is contained in:
Claude Paroz 2021-09-24 20:52:26 +02:00
parent 878371e23c
commit 3a98f1723b
1 changed files with 4 additions and 2 deletions

View File

@ -1,15 +1,17 @@
import os
from distutils.core import setup
from pathlib import Path
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
return (Path(__file__).parent / fname).read_text(encoding='utf-8')
setup(
name='xapian-haystack',
version='3.0.0',
description='A Xapian backend for Haystack',
long_description=read('README.rst'),
long_description_content_type='text/x-rst',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',