mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-01-25 00:34:21 +03:00
Fix the error without specified encoding when compiling (#4246)
Fix setup.py error on some platforms
This commit is contained in:
parent
6ff9840bde
commit
b04bd8618c
3
setup.py
3
setup.py
|
@ -4,6 +4,7 @@ import os
|
||||||
import re
|
import re
|
||||||
import shutil
|
import shutil
|
||||||
import sys
|
import sys
|
||||||
|
from io import open
|
||||||
|
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
|
|
||||||
|
@ -16,7 +17,7 @@ except ImportError:
|
||||||
print("warning: pypandoc module not found, could not convert Markdown to RST")
|
print("warning: pypandoc module not found, could not convert Markdown to RST")
|
||||||
|
|
||||||
def read_md(f):
|
def read_md(f):
|
||||||
return open(f, 'r').read()
|
return open(f, 'r', encoding='utf-8').read()
|
||||||
|
|
||||||
|
|
||||||
def get_version(package):
|
def get_version(package):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user