Skip to content

Commit

Permalink
run test suite
Browse files Browse the repository at this point in the history
normally the easiest would be to install from the github
tarball and simply specifiy the `tests` folder in the test
section as under `source_files`, however it is very painful
to build aiohttp fully from source. Not least:
 * the submodule for the vendored llhttp needs to be included
 * need to cythonize, but `make cythonize` tries to reinstall
 * the C files refer to _build_ files of the vendored llhttp
 * building llhttp cannot be done (via CMake) without patching
 * building llhttp is only necessary for a few {.c,.h} files,
   and we need to avoid installing something into $PREFIX

So just have a parallel download of the sources to use for the tests.
  • Loading branch information
h-vetinari committed Oct 8, 2023
1 parent ca2b762 commit 9e8269d
Showing 1 changed file with 25 additions and 4 deletions.
29 changes: 25 additions & 4 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@ package:
version: {{ version }}

source:
url: https://pypi.io/packages/source/a/aiohttp/aiohttp-{{ version }}.tar.gz
sha256: b0cf2a4501bff9330a8a5248b4ce951851e415bdcce9dc158e76cfd55e15085c
- url: https://pypi.io/packages/source/a/aiohttp/aiohttp-{{ version }}.tar.gz
sha256: b0cf2a4501bff9330a8a5248b4ce951851e415bdcce9dc158e76cfd55e15085c
# download sources to have tests, which don't get installed;
# installing from source is very painful, beware...
- url: https://github.com/aio-libs/aiohttp/archive/refs/tags/v{{ version }}.tar.gz
sha256: f437a7a676ee59f933a3592e3777690110bc570b38f702192bf349805382c22d
folder: sources

build:
number: 1
Expand All @@ -33,12 +38,28 @@ requirements:
- yarl >=1.0,<2.0

test:
requires:
- pip
- pytest
- pytest-mock
- brotli
- brotlicffi
- freezegun
- proxy-py
- re-assert
- trustme
source_files:
- sources/tests
# used by a test
- sources/README.rst
imports:
- aiohttp
commands:
- pip check
requires:
- pip
# don't want the docker tests in the autobahn subfolder
- rm -rf sources/tests/autobahn # [unix]
- rmdir /s /q sources\tests\autobahn # [win]
- pytest sources/tests/

about:
home: https://github.com/aio-libs/aiohttp
Expand Down

0 comments on commit 9e8269d

Please sign in to comment.