尝试上传到devpi-4.1.0
时,无论我选择什么选项,都会出现相同的错误。解决方法是构建包并将其作为文件上传,但我无法上传任何文档。
(tstenv) [root@master workspace]# devpi upload --formats sdist
detected devpi:upload section in /var/lib/jenkins/jobs/myproject-deploy-release/workspace/setup.cfg
using workdir /tmp/devpi29
pre-build: cleaning /var/lib/jenkins/jobs/myproject-deploy-release/workspace/dist
--> /var/lib/jenkins/jobs/myproject-deploy-release/workspace$ tstenv/bin/python setup.py sdist
warning: sdist: standard file not found: should have one of README, README.rst, README.txt
built: /var/lib/jenkins/jobs/myproject-deploy-release/workspace/dist/myproject-1.0.0.dev0.tar.gz [SDIST] 2642.98kb
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: no commands supplied
Traceback (most recent call last):
File "/var/lib/jenkins/jobs/myproject-deploy-release/workspace/tstenv/bin/devpi", line 11, in <module>
sys.exit(main())
File "/var/lib/jenkins/jobs/myproject-deploy-release/workspace/tstenv/lib/python3.5/site-packages/devpi/main.py", line 30, in main
return method(hub, hub.args)
File "/var/lib/jenkins/jobs/myproject-deploy-release/workspace/tstenv/lib/python3.5/site-packages/devpi/upload.py", line 48, in main
name_version = exported.setup_name_and_version()
File "/var/lib/jenkins/jobs/myproject-deploy-release/workspace/tstenv/lib/python3.5/site-packages/devpi/upload.py", line 311, in setup_name_and_version
report=False).splitlines()[-1].strip()
File "/var/lib/jenkins/jobs/myproject-deploy-release/workspace/tstenv/lib/python3.5/site-packages/devpi/main.py", line 214, in popen_output
return check_output(args, cwd=str(cwd))
File "/var/lib/jenkins/jobs/myproject-deploy-release/workspace/tstenv/lib/python3.5/site-packages/devpi_common/proc.py", line 18, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['/var/lib/jenkins/jobs/myproject-deploy-release/workspace/tstenv/bin/python', '/var/lib/jenkins/jobs/myproject-deploy-release/workspace/setup.py', '--name']' returned non-zero exit status 1
根据答案中的要求,这里是输出devpi sdist upload
:
(tstenv) [root@master workspace]# devpi sdist upload
usage: /var/lib/jenkins/jobs/myproject-deploy-release/workspace/tstenv/bin/devpi
[-h] [--version] [--debug] [-y] [-v] [--clientdir DIR]
{quickstart,use,getjson,patchjson,list,remove,user,login,logoff,index,upload,test,push,install,refresh}
...
/var/lib/jenkins/jobs/myproject-deploy-release/workspace/tstenv/bin/devpi: error: argument command: invalid choice: 'sdist' (choose from 'quickstart', 'use', 'getjson', 'patchjson', 'list', 'remove', 'user', 'login', 'logoff', 'index', 'upload', 'test', 'push', 'install', 'refresh')