Remove Cython files to regenerate them

This commit is contained in:
Tomáš Hrnčiar 2022-02-16 15:10:03 +01:00
parent 77df1c1ede
commit fc32dac685
2 changed files with 36 additions and 16 deletions

View File

@ -1,19 +1,31 @@
diff -Naur aiohttp-3.8.1-original/aiohttp/_http_parser.c aiohttp-3.8.1/aiohttp/_http_parser.c
--- aiohttp-3.8.1-original/aiohttp/_http_parser.c 2021-11-14 15:05:16.000000000 -0500
+++ aiohttp-3.8.1/aiohttp/_http_parser.c 2021-12-24 14:10:29.592094322 -0500
@@ -620,7 +620,7 @@
#include "pythread.h"
#include <limits.h>
#include <stdint.h>
-#include "../vendor/llhttp/build/llhttp.h"
+#include "llhttp.h"
#include "_find_header.h"
#ifdef _OPENMP
#include <omp.h>
diff -Naur aiohttp-3.8.1-original/setup.py aiohttp-3.8.1/setup.py
--- aiohttp-3.8.1-original/setup.py 2021-11-14 15:05:00.000000000 -0500
+++ aiohttp-3.8.1/setup.py 2021-12-24 14:10:00.781760798 -0500
@@ -33,12 +33,8 @@
From 04c7dcc0461852f83c079955612453c2a7672ec1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= <thrnciar@redhat.com>
Date: Wed, 16 Feb 2022 13:57:57 +0100
Subject: [PATCH] unbundle llhttp
---
aiohttp/_cparser.pxd | 2 +-
setup.py | 6 +-----
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/aiohttp/_cparser.pxd b/aiohttp/_cparser.pxd
index 165dd61..49055d6 100644
--- a/aiohttp/_cparser.pxd
+++ b/aiohttp/_cparser.pxd
@@ -10,7 +10,7 @@ from libc.stdint cimport (
)
-cdef extern from "../vendor/llhttp/build/llhttp.h":
+cdef extern from "llhttp.h":
struct llhttp__internal_s:
int32_t _index
diff --git a/setup.py b/setup.py
index 3843680..bf4837a 100644
--- a/setup.py
+++ b/setup.py
@@ -33,12 +33,8 @@ extensions = [
[
"aiohttp/_http_parser.c",
"aiohttp/_find_header.c",
@ -27,3 +39,6 @@ diff -Naur aiohttp-3.8.1-original/setup.py aiohttp-3.8.1/setup.py
),
Extension("aiohttp._helpers", ["aiohttp/_helpers.c"]),
Extension("aiohttp._http_writer", ["aiohttp/_http_writer.c"]),
--
2.33.1

View File

@ -72,8 +72,13 @@ with middlewares and pluggable routing.
rm -rvf vendor/llhttp
# Disable test coverage reports
sed -r -i '/--cov=/d' setup.cfg
# Remove files generated by Cython to regenerate them
rm $(grep -rl '/\* Generated by Cython')
%build
# Recreate removed Cython files using a command extracted from the Makefile.
# We don't run make directly, as it pip-installs Cython.
cython -3 aiohttp/*.pyx -I aiohttp
%py3_build
%install