Opened 8 years ago

Closed 7 years ago

#38895 closed submission (fixed)

NEW: py-http-parser

Reported by: jkrage@… Owned by: petrrr
Priority: Normal Milestone:
Component: ports Version: 2.1.3
Keywords: Cc:
Port: py-http-parser

Description

New port submission for py-http-parser from http://pypi.python.org/packages/source/h/http-parser

HTTP request/response parser for Python compatible with Python 2.x (>=2.6), Python 3 and Pypy. If possible a C parser based on http-parser from Ryan Dahl will be used.

Port is needed as a dependency for other submissions (e.g., py-restkit).

Attachments (2)

Portfile (1.2 KB) - added by jkrage@… 8 years ago.
Portfile for py-http-parser
Portfile.2 (1.3 KB) - added by jkrage@… 7 years ago.
Portfile for py-http-parser 0.8.3

Download all attachments as: .zip

Change History (15)

Changed 8 years ago by jkrage@…

Attachment: Portfile added

Portfile for py-http-parser

comment:1 Changed 8 years ago by blair (Blair Zajac)

What does "If possible a C parser based on http-parser from Ryan Dahl will be used." mean? How is this picked up? Where is it found? Is it another port? If so, it should be made an explicit dependency. Is that dependency build-time only or also runtime?

comment:2 Changed 8 years ago by jkrage@…

The C code is embedded within this package, and embedded as the parser.so file under the python site-packages installation. The usage example that the author provides is below, showing the fallback from the C-driven python to the python-native code:

# try to import C parser then fallback in pure python parser. try:

from http_parser.parser import HttpParser

except ImportError:

from http_parser.pyparser import HttpParser

comment:3 Changed 8 years ago by jkrage@…

One other note. I haven't run into this (yet?); from the author's readme about installation:

Or install from source:

$ git clone git://github.com/benoitc/http-parser.git
$ cd http-parser && python setup.py install

Note: if you get an error on MacOSX try to install with the following arguments:

    $ env ARCHFLAGS="-arch i386 -arch x86_64" python setup.py install

comment:4 in reply to:  3 ; Changed 7 years ago by petrrr

(+1) current version @ 0.8.3; working link: https://pypi.python.org/pypi/http-parser/0.8.3

Replying to jkrage@…:

One other note. I haven't run into this (yet?); from the author's readme about installation:

Note: if you get an error on MacOSX try to install with the following arguments:

    $ env ARCHFLAGS="-arch i386 -arch x86_64" python setup.py install

Is not Macport's base already taking care of this?

comment:5 Changed 7 years ago by petrrr

Cc: Peter.Danecek@… added

Cc Me!

Changed 7 years ago by jkrage@…

Attachment: Portfile.2 added

Portfile for py-http-parser 0.8.3

comment:6 in reply to:  4 Changed 7 years ago by jkrage@…

Replying to Peter.Danecek@…:

Is not Macport's base already taking care of this?

I believe that base is handling this fine.

comment:7 Changed 7 years ago by jkrage@…

Updated Portfile for py-http-parser 0.8.3 provided. Testing on 10.8.

comment:8 Changed 7 years ago by petrrr

Cc: petr@… added

Cc Me!

comment:9 Changed 7 years ago by petrrr

Cc: Peter.Danecek@… removed

comment:10 Changed 7 years ago by petrrr

Owner: changed from macports-tickets@… to petr@…

comment:11 Changed 7 years ago by petrrr

I slightly edited your Portfile (see r122378), so I you are okay with it I would commit that version to trunk. Please let me know if you want to become maintainer of this port.

Last edited 7 years ago by petrrr (previous) (diff)

comment:12 Changed 7 years ago by petrrr

Cc: petr@… removed

Cc Me!

comment:13 Changed 7 years ago by petrrr

Resolution: fixed
Status: newclosed

Committed in r123639. Closing!

Note: See TracTickets for help on using tickets.