Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 150549b

Browse files
authored
Merge pull request 0rpc#148 from poke1024/python3.4
fixes encoding problem
2 parents beb8606 + b34abce commit 150549b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

setup.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,12 @@
2222
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2323
# SOFTWARE.
2424

25-
# execfile() doesn't exist in Python 3, this way we are compatible with both.
26-
exec(compile(open('zerorpc/version.py').read(), 'zerorpc/version.py', 'exec'))
27-
2825
import sys
2926

27+
if sys.version_info < (3, 0):
28+
execfile('zerorpc/version.py')
29+
else:
30+
exec(compile(open('zerorpc/version.py', encoding='utf8').read(), 'zerorpc/version.py', 'exec'))
3031

3132
try:
3233
from setuptools import setup

0 commit comments

Comments
 (0)