Merge pull request #182692 from mweinelt/uvicorn
[staging-next] More python fixes
This commit is contained in:
commit
bbe75628ca
@ -2,6 +2,7 @@
|
|||||||
, lib
|
, lib
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchPypi
|
, fetchPypi
|
||||||
|
, hatchling
|
||||||
, jsonschema
|
, jsonschema
|
||||||
, pythonOlder
|
, pythonOlder
|
||||||
, requests
|
, requests
|
||||||
@ -10,6 +11,7 @@
|
|||||||
, babel
|
, babel
|
||||||
, jupyter_server
|
, jupyter_server
|
||||||
, openapi-core
|
, openapi-core
|
||||||
|
, pytest-timeout
|
||||||
, pytest-tornasync
|
, pytest-tornasync
|
||||||
, ruamel-yaml
|
, ruamel-yaml
|
||||||
, strict-rfc3339
|
, strict-rfc3339
|
||||||
@ -18,6 +20,7 @@
|
|||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "jupyterlab_server";
|
pname = "jupyterlab_server";
|
||||||
version = "2.15.0";
|
version = "2.15.0";
|
||||||
|
format = "pyproject";
|
||||||
disabled = pythonOlder "3.6";
|
disabled = pythonOlder "3.6";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
@ -33,11 +36,16 @@ buildPythonPackage rec {
|
|||||||
rm -r tests/translations/
|
rm -r tests/translations/
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
hatchling
|
||||||
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = [ requests jsonschema pyjson5 babel jupyter_server ];
|
propagatedBuildInputs = [ requests jsonschema pyjson5 babel jupyter_server ];
|
||||||
|
|
||||||
checkInputs = [
|
checkInputs = [
|
||||||
openapi-core
|
openapi-core
|
||||||
pytestCheckHook
|
pytestCheckHook
|
||||||
|
pytest-timeout
|
||||||
pytest-tornasync
|
pytest-tornasync
|
||||||
ruamel-yaml
|
ruamel-yaml
|
||||||
];
|
];
|
||||||
@ -46,6 +54,11 @@ buildPythonPackage rec {
|
|||||||
export HOME=$(mktemp -d)
|
export HOME=$(mktemp -d)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
pytestFlagsArray = [
|
||||||
|
# DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
|
||||||
|
"-W ignore::DeprecationWarning"
|
||||||
|
];
|
||||||
|
|
||||||
__darwinAllowLocalNetworking = true;
|
__darwinAllowLocalNetworking = true;
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
@ -1,29 +1,35 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchPypi
|
, fetchPypi
|
||||||
|
, pythonOlder
|
||||||
, glibcLocales
|
, glibcLocales
|
||||||
|
, typing-extensions
|
||||||
, python
|
, python
|
||||||
, isPy3k
|
, isPy3k
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "PyPDF2";
|
pname = "PyPDF2";
|
||||||
version = "2.5.0";
|
version = "2.8.0";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "sha256-WAKx9A+nm+G1q57claTn9+czmVidtPDmbKgx9Ennos0=";
|
sha256 = "sha256-ad39ck3f4HAQ7zpWyVvxIYVT7Anig2Nuzw8HLsEZWZo=";
|
||||||
};
|
};
|
||||||
|
|
||||||
LC_ALL = "en_US.UTF-8";
|
LC_ALL = "en_US.UTF-8";
|
||||||
buildInputs = [ glibcLocales ];
|
buildInputs = [ glibcLocales ];
|
||||||
|
|
||||||
|
propagatedBuildInputs = lib.optionals (pythonOlder "3.10") [
|
||||||
|
typing-extensions
|
||||||
|
];
|
||||||
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
${python.interpreter} -m unittest discover -s Tests
|
${python.interpreter} -m unittest discover
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Tests broken on Python 3.x
|
# Tests broken on Python 3.x
|
||||||
doCheck = !(isPy3k);
|
#doCheck = !(isPy3k);
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "A Pure-Python library built as a PDF toolkit";
|
description = "A Pure-Python library built as a PDF toolkit";
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
{ lib
|
{ lib
|
||||||
|
, aiofiles
|
||||||
, aiohttp
|
, aiohttp
|
||||||
, backoff
|
, backoff
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
@ -20,6 +21,7 @@ buildPythonPackage rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
|
aiofiles
|
||||||
aiohttp
|
aiohttp
|
||||||
backoff
|
backoff
|
||||||
click
|
click
|
||||||
|
@ -9,9 +9,8 @@
|
|||||||
, pyyaml
|
, pyyaml
|
||||||
, typing-extensions
|
, typing-extensions
|
||||||
, uvloop
|
, uvloop
|
||||||
, watchgod
|
, watchfiles
|
||||||
, websockets
|
, websockets
|
||||||
, wsproto
|
|
||||||
, pythonOlder
|
, pythonOlder
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@ -35,15 +34,17 @@ buildPythonPackage rec {
|
|||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
click
|
click
|
||||||
h11
|
h11
|
||||||
|
] ++ lib.optionals (pythonOlder "3.8") [
|
||||||
|
typing-extensions
|
||||||
|
];
|
||||||
|
|
||||||
|
passthru.optional-dependencies.standard = [
|
||||||
httptools
|
httptools
|
||||||
python-dotenv
|
python-dotenv
|
||||||
pyyaml
|
pyyaml
|
||||||
uvloop
|
uvloop
|
||||||
watchgod
|
watchfiles
|
||||||
websockets
|
websockets
|
||||||
wsproto
|
|
||||||
] ++ lib.optionals (pythonOlder "3.8") [
|
|
||||||
typing-extensions
|
|
||||||
];
|
];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{ stdenv
|
{ stdenv
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
|
, asgiref
|
||||||
, uvicorn
|
, uvicorn
|
||||||
, httpx
|
, httpx
|
||||||
, pytest-asyncio
|
, pytest-asyncio
|
||||||
@ -7,6 +8,8 @@
|
|||||||
, pytest-mock
|
, pytest-mock
|
||||||
, requests
|
, requests
|
||||||
, trustme
|
, trustme
|
||||||
|
, watchgod
|
||||||
|
, wsproto
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
@ -19,6 +22,7 @@ buildPythonPackage rec {
|
|||||||
dontInstall = true;
|
dontInstall = true;
|
||||||
|
|
||||||
checkInputs = [
|
checkInputs = [
|
||||||
|
asgiref
|
||||||
uvicorn
|
uvicorn
|
||||||
httpx
|
httpx
|
||||||
pytestCheckHook
|
pytestCheckHook
|
||||||
@ -26,7 +30,12 @@ buildPythonPackage rec {
|
|||||||
pytest-mock
|
pytest-mock
|
||||||
requests
|
requests
|
||||||
trustme
|
trustme
|
||||||
];
|
|
||||||
|
# strictly optional dependencies
|
||||||
|
watchgod
|
||||||
|
wsproto
|
||||||
|
]
|
||||||
|
++ uvicorn.optional-dependencies.standard;
|
||||||
|
|
||||||
doCheck = !stdenv.isDarwin;
|
doCheck = !stdenv.isDarwin;
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
python3.pkgs.buildPythonApplication rec {
|
python3.pkgs.buildPythonApplication rec {
|
||||||
pname = "dmarc-metrics-exporter";
|
pname = "dmarc-metrics-exporter";
|
||||||
version = "0.6.0";
|
version = "0.6.1";
|
||||||
|
|
||||||
disabled = python3.pythonOlder "3.7";
|
disabled = python3.pythonOlder "3.7";
|
||||||
|
|
||||||
@ -12,11 +12,12 @@ python3.pkgs.buildPythonApplication rec {
|
|||||||
|
|
||||||
src = python3.pkgs.fetchPypi {
|
src = python3.pkgs.fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "70f39b373ead42acb8caf56040f7ebf13ab67aea505511025c09ecf4560f8b1b";
|
hash = "sha256-VYmSHDde3zLq7NcsX7xp1JYe6x6RKFEravpakIzW390=";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace pyproject.toml \
|
substituteInPlace pyproject.toml \
|
||||||
|
--replace 'uvicorn = {extras = ["standard"], version = "^0.15.0"}' 'uvicorn = {version = "^0.15.0"}' \
|
||||||
--replace '"^' '">='
|
--replace '"^' '">='
|
||||||
'';
|
'';
|
||||||
|
|
||||||
@ -31,7 +32,8 @@ python3.pkgs.buildPythonApplication rec {
|
|||||||
typing-extensions
|
typing-extensions
|
||||||
uvicorn
|
uvicorn
|
||||||
xsdata
|
xsdata
|
||||||
];
|
]
|
||||||
|
++ uvicorn.optional-dependencies.standard;
|
||||||
|
|
||||||
checkInputs = with python3.pkgs; [
|
checkInputs = with python3.pkgs; [
|
||||||
aiohttp
|
aiohttp
|
||||||
|
Loading…
Reference in New Issue
Block a user