作为连续集成管道的一部分,我尝试从存储库构建Python轮询文件,将其上传到定制的devpi服务器,然后从那里对轮询文件进行测试。
我尝试过的一种方法是使用setuptools在一行中构建和上传轮盘文件,但这会返回404 Not消息。
在Windows上工作,我的.pypirc在C:\Users\buildbot.pypirc
[distutils]
index-servers =
staging
[staging]
repository: http://pypi/root/staging
username: buildbot
password: 12345678从我的项目回购的根开始,我尝试用以下方式构建和上传:
python.exe .\setup.py bdist_wheel upload --repository http://pypi/root/staging但是,虽然轮子放置在dist\proj-20141216.2.dev0-py2-none-any.whl中很好,但是上传步骤的结果是:
运行上传将C:\var\buildminion\build_proj-dev\build\dist\proj-20141216.2.dev0-py2-none-any.whl提交给
http://pypi/root/staging上传失败(404):未找到
运行setuptools register会产生类似的结果:
向
http://pypi/root/staging注册蜗牛 服务器响应(404):未找到
我知道devpi服务器运行正常,因为我可以用
devpi use http://pypi/root/staging
devpi login buildbot --password 12345678
devpi upload dist\proj-20141216.2.dev0-py2-none-any.whl知道为什么setuptools upload不能工作吗?
另外,在没有.pypirc的情况下使用此上载功能(或者自动填充该文件)是否有呢?在未来,我希望能够自动提供buildbot仆从,这是一个额外的配置,如果我可以避免。
如果没有办法做到这一点,我可以脚本手动上传使用devpi。我希望相同的CI代码适用于多个项目的多个版本,所以如果我不需要编写代码来匹配轮式文件名,就更容易了。这就是为什么我更喜欢使用setuptools upload。pip有任何上传功能吗?
发布于 2015-01-13 23:22:42
问题是url,对于setup.py,您需要后面的'/‘,所以将配置更改为:
[distutils]
index-servers =
staging
[staging]
repository: http://pypi/root/staging/
username: buildbot
password: 12345678你可能要注册projec,这对我来说是个转折点:
python.exe .\setup.py bdist_wheel register -r staging
python.exe .\setup.py bdist_wheel upload -r staginghttps://stackoverflow.com/questions/27820265
复制相似问题