代码拉取完成,页面将自动刷新
""" File unrelated to the package, except for convenience in deploying """
import re
import sh
import os
commit_count = sh.git("rev-list", ["--all"]).count("\n")
with open("setup.py") as f:
setup = f.read()
setup = re.sub("MICRO_VERSION = '[0-9]+'", "MICRO_VERSION = '{}'".format(commit_count), setup)
major = re.search("MAJOR_VERSION = '([0-9]+)'", setup).groups()[0]
minor = re.search("MINOR_VERSION = '([0-9]+)'", setup).groups()[0]
micro = re.search("MICRO_VERSION = '([0-9]+)'", setup).groups()[0]
version = "{}.{}.{}".format(major, minor, micro)
with open("setup.py", "w") as f:
f.write(setup)
with open("yagmail/__init__.py") as f:
init = f.read()
with open("yagmail/__init__.py", "w") as f:
f.write(re.sub('__version__ = "[0-9.]+"', '__version__ = "{}"'.format(version), init))
py_version = "python"
os.system("rm -rf dist/")
os.system("{} setup.py sdist bdist_wheel".format(py_version))
os.system("twine upload dist/*")
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。