python3Packages.falcon: fix build; cythonize!
This commit is contained in:
parent
7f613bbdb6
commit
e391e40d02
1 changed files with 51 additions and 38 deletions
|
@ -1,22 +1,21 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, pythonOlder
|
||||
, fetchPypi
|
||||
, pytestCheckHook
|
||||
, isPyPy
|
||||
, fetchFromGitHub
|
||||
|
||||
# build
|
||||
, cython
|
||||
|
||||
# tests
|
||||
, aiofiles
|
||||
, cbor2
|
||||
, ddt
|
||||
, gunicorn
|
||||
, httpx
|
||||
, hypercorn
|
||||
, jsonschema
|
||||
, msgpack
|
||||
, mujson
|
||||
, nose
|
||||
, orjson
|
||||
, pecan
|
||||
, pytest-asyncio
|
||||
, python-mimeparse
|
||||
, pytestCheckHook
|
||||
, pyyaml
|
||||
, rapidjson
|
||||
, requests
|
||||
|
@ -32,39 +31,53 @@ buildPythonPackage rec {
|
|||
format = "pyproject";
|
||||
disabled = pythonOlder "3.5";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-8nYL0YwWOTpvteVfNx9nkh7bcv6+aTqCs8XoIZXQh7c=";
|
||||
src = fetchFromGitHub {
|
||||
owner = "falconry";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
hash = "sha256-Y6bD0GCXhqpvMV+/i1v59p2qWZ91f2ey7sPQrVALY54=";
|
||||
};
|
||||
|
||||
checkInputs = [
|
||||
aiofiles
|
||||
cbor2
|
||||
ddt
|
||||
gunicorn
|
||||
httpx
|
||||
hypercorn
|
||||
jsonschema
|
||||
msgpack
|
||||
mujson
|
||||
nose
|
||||
orjson
|
||||
pecan
|
||||
pytest-asyncio
|
||||
pytestCheckHook
|
||||
python-mimeparse
|
||||
pyyaml
|
||||
rapidjson
|
||||
requests
|
||||
testtools
|
||||
ujson
|
||||
uvicorn
|
||||
websockets
|
||||
nativeBuildInputs = lib.optionals (!isPyPy) [
|
||||
cython
|
||||
];
|
||||
|
||||
disabledTestPaths = [
|
||||
# missing optional nuts package
|
||||
"falcon/bench/nuts/nuts/tests/test_functional.py"
|
||||
preCheck = ''
|
||||
export HOME=$TMPDIR
|
||||
cp -R tests examples $TMPDIR
|
||||
pushd $TMPDIR
|
||||
'';
|
||||
|
||||
postCheck = ''
|
||||
popd
|
||||
'';
|
||||
|
||||
checkInputs = [
|
||||
# https://github.com/falconry/falcon/blob/master/requirements/tests
|
||||
pytestCheckHook
|
||||
pyyaml
|
||||
requests
|
||||
rapidjson
|
||||
orjson
|
||||
|
||||
# ASGI specific
|
||||
pytest-asyncio
|
||||
aiofiles
|
||||
httpx
|
||||
uvicorn
|
||||
websockets
|
||||
|
||||
# handler specific
|
||||
cbor2
|
||||
msgpack
|
||||
mujson
|
||||
ujson
|
||||
] ++ lib.optionals (pythonOlder "3.10") [
|
||||
testtools
|
||||
];
|
||||
|
||||
pytestFlagsArray = [
|
||||
"tests"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
|
|
Loading…
Reference in a new issue