1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
From: Michael Fladischer <FladischerMichael@fladi.at>
Date: Sat, 20 Oct 2018 21:21:53 +0200
Subject: Use http_parser.h from distribution installation.
---
httptools/parser/cparser.pxd | 2 +-
setup.py | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/httptools/parser/cparser.pxd b/httptools/parser/cparser.pxd
index bad2060..7644a1c 100644
--- a/httptools/parser/cparser.pxd
+++ b/httptools/parser/cparser.pxd
@@ -1,7 +1,7 @@
from libc.stdint cimport uint16_t, uint32_t, uint64_t
-cdef extern from "../../vendor/http-parser/http_parser.h":
+cdef extern from "http_parser.h":
ctypedef int (*http_data_cb) (http_parser*,
const char *at,
size_t length) except -1
diff --git a/setup.py b/setup.py
index 0172d53..c7aceea 100644
--- a/setup.py
+++ b/setup.py
@@ -21,7 +21,11 @@ setup(
license='MIT',
packages=['httptools', 'httptools.parser'],
ext_modules=cythonize([
- Extension("httptools.parser.parser", ["httptools/parser/parser.pyx"])
+ Extension(
+ "httptools.parser.parser",
+ ["httptools/parser/parser.pyx"],
+ libraries=['http_parser']
+ )
]),
provides=['httptools'],
include_package_data=True
|