3
我想打包一個新項目並將其上傳到TestPyPI服務器。由於引入了新的PyPI.org,幾乎所有我發現的指令都過時了,並且試圖上傳到https://testpypi.python.org/pypi現在返回401 Gone
。什麼是測試PyPI服務器的新上傳URL?
The guide for migrating to the new PyPI.org說使用https://test.pypi.org/legacy
作爲TestPyPI的存儲庫。然而,插入此網址時到我.pypirc
文件,並試圖上傳我的包,我收到以下錯誤:
python setup.py sdist upload -r testpypi
[...]
running upload
Submitting dist/<package_name> to https://test.pypi.org/legacy
Upload failed (404): Not Found
error: Upload failed (404): Not Found
這裏是我的~/.pypirc
文件的內容:
[distutils]
index-servers =
pypi
testpypi
[pypi]
repository: https://pypi.python.org/pypi
username: your_username
password: your_password
[testpypi]
repository: https://test.pypi.org/legacy
username: pbaranay
password: my_password