代码拉取完成,页面将自动刷新
from os.path import exists
from time import time
from setuptools import setup, find_packages
from ail.core.version import AIL_MAIN_VERSION, AIL_SUB_VERSION
_WELCOME_BANNER = \
'''******************************
** **
** AIL Programming Language **
** Powered by Python **
** **
******************************
'''
print(_WELCOME_BANNER)
INSTALL_TIME_PATH = './ail/core/INSTALL_TIME'
try:
with open(INSTALL_TIME_PATH, 'w') as f:
install_time = time()
print('[INFO] Install time: %s' % install_time)
f.write(str(int(install_time * 1000)))
except:
pass
def try_write_commit_id():
try:
import subprocess
if not (exists('AIL_REPO_ROOT') and exists('.git')):
return
commit_id = subprocess.Popen(
['git rev-parse --short HEAD'],
shell=True, stdout=subprocess.PIPE) \
.communicate()[0].decode().replace('\n', '')
branch_name = subprocess.Popen(
['git symbolic-ref --short -q HEAD'],
shell=True, stdout=subprocess.PIPE) \
.communicate()[0].decode().replace('\n', '')
print('[INFO] commit id = %s/%s' % (branch_name, commit_id))
open('./ail/COMMIT_ID', 'w').write('%s/%s' % (branch_name, commit_id))
except Exception:
print('[W]: failed to get commit id')
try_write_commit_id()
setup(
name='ail',
packages=find_packages(),
version='%s.%s' % (AIL_MAIN_VERSION,
'.'.join([str(sv) for sv in AIL_SUB_VERSION])),
entry_points={
'console_scripts': [
'ail = ail.__main__:main_as_entry_point',
]
},
package_data={
'ail': ['lib/*.ail', 'core/INSTALL_TIME', 'COMMIT_ID']
}
)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。