Skip to content

Commit 9baee4e

Browse files
committed
解决python3编码问题
1 parent 532f2bb commit 9baee4e

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

python/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ print( Gan[gz.tg], Zhi[gz.dz])
130130
year = lunar.getYearCal(2018)
131131
```
132132

133+
### 懒人下载地址 (只提供Win版本):
134+
135+
https://pan.baidu.com/s/1VR4MtPVV9iP9SSHNDjKZnQ
133136

134137
### 最后
135138

python/setup.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@
33

44
import setuptools
55
from distutils import ccompiler
6-
import os
6+
import os,sys
77
import shutil,os
8+
if sys.version_info < (3, 0):
9+
with open("README.md", "r") as fh:
10+
long_description = fh.read()
11+
else:
12+
with open("README.md", "r", encoding='utf-8') as fh:
13+
long_description = fh.read()
814

9-
with open("README.md", "r") as fh:
10-
long_description = fh.read()
1115

1216
if os.path.isdir("../src"):
1317
if os.path.isdir("src"):

0 commit comments

Comments
 (0)