skywind3000 / emake

你见过的最简单的 GCC/CLANG 项目构建工具,定义式构建,比命令式更简单
GNU General Public License v2.0
684 stars 111 forks source link

update to python3 ,已经同时支持Python2 和Python3 #16

Closed redpower1998 closed 2 years ago

redpower1998 commented 2 years ago

I noticed that emake still uses python2, and now python3 is mainstream, so I modified the code to upgrade to python3.

skywind3000 commented 2 years ago

非常感谢,我本来也想升级一下,只是一直没空弄,刚好你已经做了,能否更进一步做一个 py2/py3 的兼容版本,比如头部:

from __future__ import print_function, unicode_literals
import sys
...

# python 2/3 compatible
if sys.version_info[0] >= 3:
    long = int
    unicode = str
    xrange = range

之类的,因为我偶尔还需要再只有 py2 的环境下工作一下,比如我一台老旧的路由器,上面就只有 py2。

还有是 py2.5 支持 psyco,能够让程序运行快很多。

redpower1998 commented 2 years ago

已经同时支持Python2 和Python3 ,please review it.

从 Windows 版邮件https://go.microsoft.com/fwlink/?LinkId=550986发送


发件人: Linwei @.> 发送时间: Tuesday, April 5, 2022 10:15:47 AM 收件人: skywind3000/emake @.> 抄送: redpower @.>; Author @.> 主题: Re: [skywind3000/emake] update to python3 (PR #16)

非常感谢,我本来也想升级一下,只是一直没空弄,刚好你已经做了,能否更进一步做一个 py2/py3 的兼容版本,比如头部:

from future import print_function, unicode_literals

import sys

...

python 2/3 compatible

if sys.version_info[0] >= 3:

long = int

unicode = str

xrange = range

之类的,因为我偶尔还需要再只有 py2 的环境下工作一下,比如我一台老旧的路由器,上面就只有 py2。

还有是 py2.5 支持 psyco,能够让程序运行快很多。

― Reply to this email directly, view it on GitHubhttps://github.com/skywind3000/emake/pull/16#issuecomment-1088199340, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACRM7FKHRXKWNYM6K2B254DVDOO5HANCNFSM5SN7FRXA. You are receiving this because you authored the thread.Message ID: @.***>

skywind3000 commented 2 years ago

多谢