aspear / mimeparse

Automatically exported from code.google.com/p/mimeparse
MIT License
0 stars 0 forks source link

setup.py fails on python 3.2 #16

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. run "pip install mimeparse" on python 3.2

What is the expected output? What do you see instead?

mimeparse should install, but it fails instead:

$ python --version
Python 3.2.2
$ pip --version
pip 1.1 from 
/home/vagrant/virtualenv/python3.2/lib/python3.2/site-packages/pip-1.1-py3.2.egg
 (python 3.2)
$ pip install mimeparse --use-mirrors
Downloading/unpacking mimeparse
  Real name of requirement mimeparse is mimeparse
  Downloading mimeparse-0.1.3.tar.gz
  Running setup.py egg_info for package mimeparse
    Traceback (most recent call last):
      File "<string>", line 14, in <module>
      File "/home/vagrant/virtualenv/python3.2/build/mimeparse/setup.py", line 1
        \ufeff# -*- coding: utf-8 -*-
          ^
    SyntaxError: invalid character in identifier
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 14, in <module>

  File "/home/vagrant/virtualenv/python3.2/build/mimeparse/setup.py", line 1

    \ufeff# -*- coding: utf-8 -*-

      ^

SyntaxError: invalid character in identifier

What version of the product are you using? On what operating system?

mimeparse 0.1.3 on a travis CI build machine. full output is here: 
http://travis-ci.org/#!/martinblech/mimerender/jobs/1773477

Please provide any additional information below.

Original issue reported on code.google.com by martinblech@gmail.com on 4 Jul 2012 at 4:36

GoogleCodeExporter commented 8 years ago
I ported mimeparse into py3k in
https://github.com/dbtsai/python-mimeparse , and I used travis-ci to
do the unittest in order to make sure that mimeparse can run on all
different python versions. See the following, it now runs on py27,
py32, py33, and pypy. http://travis-ci.org/#!/dbtsai/python-mimeparse

Original comment by dbt...@dbtsai.com on 23 Aug 2012 at 12:58

GoogleCodeExporter commented 8 years ago
Please do a new release to PyPI with this patch included, better for folk to be 
able to reuse such a library via the main distribution channel than have to 
embed it with bugfixes.

Original comment by robert.c...@gmail.com on 17 Feb 2013 at 12:35

GoogleCodeExporter commented 8 years ago
The utf8 BOM needs to be removed from setup.py. Attached a patch to do that. 
After that a new .tar.gz needs to be uploaded to the Downloads page for the 
pypi install to work again (in both 2.x and 3.x).

Original comment by skryskalla on 17 Feb 2013 at 5:23

Attachments:

GoogleCodeExporter commented 8 years ago
Another way to solve this is when opening the file with vim and executing ":set 
nobomb". It would be nice to have a new version available in pip ;-).

Original comment by matiw...@gmail.com on 1 Apr 2013 at 2:54

GoogleCodeExporter commented 8 years ago
Really need this patch in pypi for Falcon. Can I assist you in any way to get 
this done?

Original comment by sffi...@gmail.com on 11 Sep 2013 at 12:09

GoogleCodeExporter commented 8 years ago
It seems this module is not being maintained anymore. dbtsai's 
python3-compatible fork is in PyPi though, I ended up using it instead: 
https://github.com/martinblech/mimerender/blob/master/setup.py

Original comment by martinblech@gmail.com on 11 Sep 2013 at 1:07

GoogleCodeExporter commented 8 years ago
Ah, thanks for the tip. I didn't realize the fork was available on pypi as well.

Original comment by sffi...@gmail.com on 11 Sep 2013 at 2:59