Skip to content

Commit b29585a

Browse files
committed
处理安装脚本setup.py的问题,解决litefs.py中的小错误
1 parent 7322560 commit b29585a

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

litefs.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,7 @@ def _finish(self, content):
704704
else:
705705
rw.write(repr(s))
706706
else:
707-
rw.write(repr(s))
707+
rw.write(repr(content))
708708
try:
709709
rw.close()
710710
except:

setup.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,12 @@
88
from setuptools import setup
99
except ImportError:
1010
from distutils.core import setup
11-
from Cython.Build import cythonize
11+
try:
12+
from Cython.Build import cythonize
13+
except ImportError:
14+
import os
15+
os.system('pip install cython')
16+
from Cython.Build import cythonize
1217

1318
long_description = '''\
1419
使用 Python 从零开始构建一个 Web 服务器框架。 开发 Litefs 的是为了实现一个能快速、安\

0 commit comments

Comments
 (0)