add py-unicorn

This commit is contained in:
ziggi
2020-07-23 08:20:28 +00:00
parent adf7c51a96
commit 034a8cc18f
20 changed files with 198 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
# Created by: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
# $FreeBSD: head/www/py-httptools/Makefile 526666 2020-02-21 18:57:41Z sunpoet $
PORTNAME= httptools
PORTVERSION= 0.1.1
CATEGORIES= www python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= sunpoet@FreeBSD.org
COMMENT= Collection of framework independent HTTP protocol utils
LIB_DEPENDS= libhttp_parser.so:net/libhttp-parser
USES= localbase python:3.5+
USE_PYTHON= autoplist distutils
post-patch:
@${RM} -r ${WRKSRC}/vendor/
.include <bsd.port.mk>

View File

@@ -0,0 +1,3 @@
TIMESTAMP = 1582222974
SHA256 (httptools-0.1.1.tar.gz) = 41b573cf33f64a8f8f3400d0a7faf48e1888582b6f6e02b82b9bd4f0bf7497ce
SIZE (httptools-0.1.1.tar.gz) = 106162

View File

@@ -0,0 +1,11 @@
--- httptools/parser/parser.c.orig 2019-02-25 19:54:42 UTC
+++ httptools/parser/parser.c
@@ -609,7 +609,7 @@ static CYTHON_INLINE float __PYX_NAN() {
#include <stdio.h>
#include "pythread.h"
#include <stdint.h>
-#include "../../vendor/http-parser/http_parser.h"
+#include "http_parser.h"
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

View File

@@ -0,0 +1,11 @@
--- setup.py.orig 2020-02-08 00:30:40 UTC
+++ setup.py
@@ -44,7 +44,7 @@ class httptools_build_ext(build_ext):
return
super().initialize_options()
- self.use_system_http_parser = False
+ self.use_system_http_parser = True
self.cython_always = False
self.cython_annotate = None
self.cython_directives = None

View File

@@ -0,0 +1,4 @@
httptools is a Python binding for nodejs HTTP parser. It's still in a very early
development stage, expect APIs to break.
WWW: https://github.com/MagicStack/httptools