Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion PyPI bdist_wininst upload failing
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Steven Bethard  
View profile  
 More options May 27 2007, 4:20 pm
Newsgroups: comp.lang.python
From: Steven Bethard <steven.beth...@gmail.com>
Date: Sun, 27 May 2007 00:20:46 -0600
Local: Sun, May 27 2007 4:20 pm
Subject: Re: PyPI bdist_wininst upload failing

Steven Bethard wrote:
> I just tried to upload new versions of the argparse module to PyPI, but
> it seems like I can no longer upload Windows installers:

>   $ setup.py sdist bdist_wininst upload
>   ...
>   running upload
>   Submitting dist\argparse-0.8.0.zip to http://www.python.org/pypi
>   Server response (200): OK
>   Submitting dist\argparse-0.8.0.win32.exe to http://www.python.org/pypi
>   Upload failed (400): Bad Request

> Anyone know what I'm doing wrong? (I've always been able to upload
> bdist_wininst packages to PyPI in the past.)

Still haven't figured this out yet, but I discovered that I get a
slightly more informative message if I do the upload manually with the
PyPI form. It then says:

     Error processing form

     invalid distribution file

Looks like this originates from:

     https://svn.python.org/packages/trunk/pypi/webui.py

down near the bottom in the file_upload() method. I can't figure out
which "invalid distribution file" error is being triggered, but in
looking around, I saw that is_distutils_file() in:

     https://svn.python.org/packages/trunk/pypi/verify_filetype.py

says:

     if filename.endswith('.exe'):
         # check for valid exe
         if filetype != 'bdist_wininst':
             return False

         try:
             t = StringIO.StringIO(content)
             t.filename = filename
             z = zipfile.ZipFile(t)
             l = z.namelist()
         except zipfile.error:
             return False

         for zipname in l:
             if not safe_zipnames.match(zipname):
                 return False

That seems a little weird to me. Are the bdist_wininst exe files really
zip files? Or did I just misunderstand what "content" is?

STeVe


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google