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