Plain setup.py uploads
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-... 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
On Wed, May 07, 2014 at 16:39 -0700, Eric Smith wrote:
setup.py rather than 'devpi upload' found here: http://doc.devpi.net/1.2.1/userman/devpi_misc.html#using-plain-setup-py-for-...
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
What is the URL of "myrepo"? holger
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
-- You received this message because you are subscribed to the Google Groups "devpi-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to devpi-dev+...@googlegroups.com. To post to this group, send email to devp...@googlegroups.com. Visit this group at http://groups.google.com/group/devpi-dev. For more options, visit https://groups.google.com/d/optout.
.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-...
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
On 8 May 2014, at 17:32, Eric Smith wrote:
.pypirc looks like (with <replacements>):
[distutils] index-servers= myrepo
[myrepo] repository: http://pi-test:4040/<username here>/stc username: <username here> password: <password here>
Try adding a slash after stc: http://pi-test:4040/<username here>/stc/ Regards, Florian Schulze
The simplest things... Yes that appears to work. Thanks! On Thursday, May 8, 2014 9:40:56 AM UTC-6, Florian Schulze wrote:
On 8 May 2014, at 17:32, Eric Smith wrote:
.pypirc looks like (with <replacements>):
[distutils] index-servers= myrepo
[myrepo] repository: http://pi-test:4040/<username here>/stc username: <username here> password: <password here>
Try adding a slash after stc: http://pi-test:4040/<username here>/stc/
Regards, Florian Schulze
hi Eric, On Thu, May 08, 2014 at 09:58 -0700, Eric Smith wrote:
The simplest things... Yes that appears to work. Thanks!
We are working on some URL routing and API design cleanup which would hopefully prevent the issue. cheers, holger
On Thursday, May 8, 2014 9:40:56 AM UTC-6, Florian Schulze wrote:
On 8 May 2014, at 17:32, Eric Smith wrote:
.pypirc looks like (with <replacements>):
[distutils] index-servers= myrepo
[myrepo] repository: http://pi-test:4040/<username here>/stc username: <username here> password: <password here>
Try adding a slash after stc: http://pi-test:4040/<username here>/stc/
Regards, Florian Schulze
-- You received this message because you are subscribed to the Google Groups "devpi-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to devpi-dev+...@googlegroups.com. To post to this group, send email to devp...@googlegroups.com. Visit this group at http://groups.google.com/group/devpi-dev. For more options, visit https://groups.google.com/d/optout.
Hi, I have a similar problem, except the trailing slash is not missing. Setup.py says Submitting dist/package.tar.gz to http://devpi:5000/dev/dev/
Upload failed (400): Bad Request
and the logs are not really helping : <IP address> - - [04/Jun/2014 15:54:00] "POST /dev/dev/ HTTP/1.1" 400 790 Setting the app to DEBUG merely yields the line 2014-06-04 16:01:07,311 [DEBUG] devpi_server.views: got auth status u'ok' for user u'dev' before 400'ing me. Note that I have called the user "dev" also, so this is my pypirc entry for "dev" : [dev]
repository: http://devpi:5000/dev/dev/ username: dev password: **********
Any ideas what I'm doing wrong? Is it possibly a clash between the index name and the username? Note that "devpi upload" is working but for various reasons we need the plain setup.py upload to work, too. Thanks, max On Thursday, May 8, 2014 7:18:52 PM UTC+2, holger krekel wrote:
hi Eric,
On Thu, May 08, 2014 at 09:58 -0700, Eric Smith wrote:
The simplest things... Yes that appears to work. Thanks!
We are working on some URL routing and API design cleanup which would hopefully prevent the issue.
cheers, holger
On Thursday, May 8, 2014 9:40:56 AM UTC-6, Florian Schulze wrote:
On 8 May 2014, at 17:32, Eric Smith wrote:
.pypirc looks like (with <replacements>):
[distutils] index-servers= myrepo
[myrepo] repository: http://pi-test:4040/<username here>/stc username: <username here> password: <password here>
Try adding a slash after stc: http://pi-test:4040/<username here>/stc/
Regards, Florian Schulze
-- You received this message because you are subscribed to the Google Groups "devpi-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to devpi-...@googlegroups.com <javascript:>. To post to this group, send email to dev...@googlegroups.com <javascript:>. Visit this group at http://groups.google.com/group/devpi-dev. For more options, visit https://groups.google.com/d/optout.
Hi Maximilien, Florian and me are heavily working on major new devpi releases. I'll post a candidate here hopefully within two weeks so you can test if it fixes your issue. best, holger On Wed, Jun 04, 2014 at 07:03 -0700, Maximilien Riehl wrote:
Hi,
I have a similar problem, except the trailing slash is not missing.
Setup.py says
Submitting dist/package.tar.gz to http://devpi:5000/dev/dev/
Upload failed (400): Bad Request
and the logs are not really helping :
<IP address> - - [04/Jun/2014 15:54:00] "POST /dev/dev/ HTTP/1.1" 400 790
Setting the app to DEBUG merely yields the line
2014-06-04 16:01:07,311 [DEBUG] devpi_server.views: got auth status u'ok' for user u'dev'
before 400'ing me.
Note that I have called the user "dev" also, so this is my pypirc entry for "dev" :
[dev]
repository: http://devpi:5000/dev/dev/ username: dev password: **********
Any ideas what I'm doing wrong? Is it possibly a clash between the index name and the username? Note that "devpi upload" is working but for various reasons we need the plain setup.py upload to work, too.
Thanks, max
On Thursday, May 8, 2014 7:18:52 PM UTC+2, holger krekel wrote:
hi Eric,
On Thu, May 08, 2014 at 09:58 -0700, Eric Smith wrote:
The simplest things... Yes that appears to work. Thanks!
We are working on some URL routing and API design cleanup which would hopefully prevent the issue.
cheers, holger
On Thursday, May 8, 2014 9:40:56 AM UTC-6, Florian Schulze wrote:
On 8 May 2014, at 17:32, Eric Smith wrote:
.pypirc looks like (with <replacements>):
[distutils] index-servers= myrepo
[myrepo] repository: http://pi-test:4040/<username here>/stc username: <username here> password: <password here>
Try adding a slash after stc: http://pi-test:4040/<username here>/stc/
Regards, Florian Schulze
-- You received this message because you are subscribed to the Google Groups "devpi-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to devpi-...@googlegroups.com <javascript:>. To post to this group, send email to dev...@googlegroups.com <javascript:>. Visit this group at http://groups.google.com/group/devpi-dev. For more options, visit https://groups.google.com/d/optout.
-- You received this message because you are subscribed to the Google Groups "devpi-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to devpi-dev+...@googlegroups.com. To post to this group, send email to devp...@googlegroups.com. Visit this group at http://groups.google.com/group/devpi-dev. For more options, visit https://groups.google.com/d/optout.
Hi Holger, Great, thanks a lot for letting me know (and for your work on devpi!) Regards, max On 06/04/2014 04:06 PM, holger krekel wrote:
Hi Maximilien,
Florian and me are heavily working on major new devpi releases. I'll post a candidate here hopefully within two weeks so you can test if it fixes your issue.
best, holger
On Wed, Jun 04, 2014 at 07:03 -0700, Maximilien Riehl wrote:
Hi,
I have a similar problem, except the trailing slash is not missing.
Setup.py says
Submitting dist/package.tar.gz to http://devpi:5000/dev/dev/
Upload failed (400): Bad Request
and the logs are not really helping :
<IP address> - - [04/Jun/2014 15:54:00] "POST /dev/dev/ HTTP/1.1" 400 790
Setting the app to DEBUG merely yields the line
2014-06-04 16:01:07,311 [DEBUG] devpi_server.views: got auth status u'ok' for user u'dev'
before 400'ing me.
Note that I have called the user "dev" also, so this is my pypirc entry for "dev" :
[dev]
repository: http://devpi:5000/dev/dev/ username: dev password: **********
Any ideas what I'm doing wrong? Is it possibly a clash between the index name and the username? Note that "devpi upload" is working but for various reasons we need the plain setup.py upload to work, too.
Thanks, max
On Thursday, May 8, 2014 7:18:52 PM UTC+2, holger krekel wrote:
hi Eric,
On Thu, May 08, 2014 at 09:58 -0700, Eric Smith wrote:
The simplest things... Yes that appears to work. Thanks! We are working on some URL routing and API design cleanup which would hopefully prevent the issue.
cheers, holger
On Thursday, May 8, 2014 9:40:56 AM UTC-6, Florian Schulze wrote:
On 8 May 2014, at 17:32, Eric Smith wrote:
.pypirc looks like (with <replacements>):
[distutils] index-servers= myrepo
[myrepo] repository: http://pi-test:4040/<username here>/stc username: <username here> password: <password here> Try adding a slash after stc: http://pi-test:4040/<username here>/stc/
Regards, Florian Schulze
-- You received this message because you are subscribed to the Google Groups "devpi-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to devpi-...@googlegroups.com <javascript:>. To post to this group, send email to dev...@googlegroups.com <javascript:>. Visit this group at http://groups.google.com/group/devpi-dev. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "devpi-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to devpi-dev+...@googlegroups.com. To post to this group, send email to devp...@googlegroups.com. Visit this group at http://groups.google.com/group/devpi-dev. For more options, visit https://groups.google.com/d/optout.
On Wednesday, June 4, 2014 9:03:07 AM UTC-5, Maximilien Riehl wrote:
Setup.py says
Submitting dist/package.tar.gz to http://devpi:5000/dev/dev/
Upload failed (400): Bad Request
and the logs are not really helping :
I am seeing this same 400 error when using `python setup.py sdist upload`, but through some trials I discovered it seems to only fail on packages that haven't already been successfully uploaded with `devpi upload` at least once prior. I'm thinking there is some metadata or file structure in the index that gets created when going through `devpi upload` that doesn't get created with the plain setup.py approach? Is there a way to 'register' a package initially to an index to prime the index without using `devpi upload` so that subsequent plain setup.py works? Thanks
On Tue, Jun 17, 2014 at 15:20 -0700, Joe Holloway wrote:
On Wednesday, June 4, 2014 9:03:07 AM UTC-5, Maximilien Riehl wrote:
Setup.py says
Submitting dist/package.tar.gz to http://devpi:5000/dev/dev/
Upload failed (400): Bad Request
and the logs are not really helping :
I am seeing this same 400 error when using `python setup.py sdist upload`, but through some trials I discovered it seems to only fail on packages that haven't already been successfully uploaded with `devpi upload` at least once prior. I'm thinking there is some metadata or file structure in the index that gets created when going through `devpi upload` that doesn't get created with the plain setup.py approach?
Is there a way to 'register' a package initially to an index to prime the index without using `devpi upload` so that subsequent plain setup.py works?
Generally, with pypi.python.org and with devpi, you first need to register a package with: python setup.py register The "devpi upload" command does this preliminary step automatically. HTH, holger
Thanks
-- You received this message because you are subscribed to the Google Groups "devpi-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to devpi-dev+...@googlegroups.com. To post to this group, send email to devp...@googlegroups.com. Visit this group at http://groups.google.com/group/devpi-dev. For more options, visit https://groups.google.com/d/optout.
participants (5)
-
Eric Smith
-
Florian Schulze
-
holger krekel
-
Joe Holloway
-
Maximilien Riehl