2 Star 8 Fork 6

Walkline/A Batch Tool

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
upload_to_pypi.py 679 Bytes
一键复制 编辑 原始数据 按行查看 历史
Walkline 提交于 2021-08-08 21:44 . 增加删除文件夹错误捕捉
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os, shutil
REMOVE_DIRS = ['ampy_batch_tool.egg-info', 'build', 'dist']
print('removing build folders...\n')
try:
for dir in REMOVE_DIRS:
shutil.rmtree(dir)
except:
pass
print('building packages...\n')
os.system('python setup.py sdist bdist_wheel')
print('\nchecking packages...\n')
os.system('twine check dist/*')
while True:
try:
result = input('upload packages now? [Y/n]')
assert result in ('', 'Y', 'y', 'n')
if result in ('', 'Y', 'y'):
os.system('twine upload --repository-url https://upload.pypi.org/legacy/ dist/*')
break
except KeyboardInterrupt:
exit(0)
except:
pass
print('\ndone')
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/walkline/a-batch-tool.git
[email protected]:walkline/a-batch-tool.git
walkline
a-batch-tool
A Batch Tool
master

搜索帮助