.pypirc looks like (with <replacements>):

[distutils]
index-servers=
    myrepo

[myrepo]
repository: http://pi-test:4040/<username here>/stc
username: <username here>
password: <password here>


The HTTP headers look like:

POST http://pi-test:4040/<username here>/stc HTTP/1.1
Accept-Encoding: identity
Content-Length: 44349
Connection: close
User-Agent: Python-urllib/2.7
Host: pi-test:4040
Content-Type: multipart/form-data; boundary=--------------GHSKFJDLGDS7543FJKLFHRE75642756743254
Authorization: Basic <encoded username:password>


HTTP/1.0 405 Method Not Allowed
Date: Wed, 07 May 2014 22:41:39 GMT
Server: WSGIServer/0.1 Python/2.6.6
Content-Length: 746
Allow: DELETE,GET,PATCH,PUT
Content-Type: text/html; charset=UTF-8

Poking around in the server source, views.py does define a route with POST, though:

    @route("/<user>/<index>/", method="POST")
    def submit(self, user, index):

I don't see an obvious place where 405 is returned.

Do I need to be doing a setup.py register as well? When I tried that, it didn't seem to use the .pypirc at all -- went straight to the official PyPI.

I see that the "devpi upload" HTTP request uses some kind of token for the password in the basic auth (created with 'devpi login'?), but I'm not sure how I'd replicate that, or if I'd need to.

Thanks for your help.


On Wednesday, May 7, 2014 5:39:38 PM UTC-6, Eric Smith wrote:
I'm trying to follow the directions for doing uploads to devpi using setup.py rather than 'devpi upload' found here: http://doc.devpi.net/1.2.1/userman/devpi_misc.html#using-plain-setup-py-for-uploading

Things are well enough configured that 'devpi upload' works, but trying a command like 'python setup.py sdist --formats=zip upload --repository=myrepo' results in:

Upload failed (405): Method Not Allowed

Spying on the HTTP traffic, I can see that the request is going to the expected URL and includes an Authorization header with the credentials (encoded for basic auth) from my .pypirc.

Is this known to be working in 1.2.1? Any suggestions for tracking down the problem?

Thanks,
Eric