Merge pull request #91087 from Mic92/python-fixes
This commit is contained in:
commit
e5bdf9c27b
|
@ -1,4 +1,4 @@
|
||||||
{ stdenv, buildPythonPackage, fetchPypi, isPy27, pytz, requests, pytest }:
|
{ stdenv, buildPythonPackage, fetchPypi, isPy27, pytz, requests, pytest, freezegun }:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "astral";
|
pname = "astral";
|
||||||
|
@ -10,7 +10,7 @@ buildPythonPackage rec {
|
||||||
sha256 = "e41d9967d5c48be421346552f0f4dedad43ff39a83574f5ff2ad32b6627b6fbe";
|
sha256 = "e41d9967d5c48be421346552f0f4dedad43ff39a83574f5ff2ad32b6627b6fbe";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [ pytz requests ];
|
propagatedBuildInputs = [ pytz requests freezegun ];
|
||||||
|
|
||||||
checkInputs = [ pytest ];
|
checkInputs = [ pytest ];
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
|
|
|
@ -17,6 +17,9 @@ buildPythonPackage rec {
|
||||||
--replace "test_events_watched_outside_test_are_ignored" "xtest_events_watched_outside_test_are_ignored"
|
--replace "test_events_watched_outside_test_are_ignored" "xtest_events_watched_outside_test_are_ignored"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# https://github.com/Martiusweb/asynctest/issues/132
|
||||||
|
doCheck = pythonOlder "3.8";
|
||||||
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
${python.interpreter} -m unittest test
|
${python.interpreter} -m unittest test
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -1,15 +1,14 @@
|
||||||
{ stdenv
|
{ stdenv
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchPypi
|
, fetchPypi
|
||||||
, pythonAtLeast
|
|
||||||
, pythonOlder
|
, pythonOlder
|
||||||
, paver
|
|
||||||
, python
|
, python
|
||||||
, isPyPy
|
, isPyPy
|
||||||
, six
|
, six
|
||||||
, pathlib
|
|
||||||
, python_magic
|
|
||||||
, lib
|
, lib
|
||||||
|
, filetype
|
||||||
|
, deprecation
|
||||||
|
, dataclasses
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
|
@ -22,18 +21,13 @@ buildPythonPackage rec {
|
||||||
sha256 = "faf5806197f2093e82c2830d41f2378f07b3a9da07a16fafb14fc6fbdebac50a";
|
sha256 = "faf5806197f2093e82c2830d41f2378f07b3a9da07a16fafb14fc6fbdebac50a";
|
||||||
};
|
};
|
||||||
|
|
||||||
# https://github.com/nicfit/eyeD3/pull/284
|
|
||||||
postPatch = lib.optionalString (pythonAtLeast "3.4") ''
|
|
||||||
sed -ie '/pathlib/d' requirements/requirements.yml
|
|
||||||
'';
|
|
||||||
|
|
||||||
buildInputs = [ paver ];
|
|
||||||
|
|
||||||
# requires special test data:
|
# requires special test data:
|
||||||
# https://github.com/nicfit/eyeD3/blob/103198e265e3279384f35304e8218be6717c2976/Makefile#L97
|
# https://github.com/nicfit/eyeD3/blob/103198e265e3279384f35304e8218be6717c2976/Makefile#L97
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
propagatedBuildInputs = [ six python_magic ] ++ lib.optional (pythonOlder "3.4") pathlib;
|
propagatedBuildInputs = [
|
||||||
|
six filetype deprecation
|
||||||
|
] ++ lib.optional (pythonOlder "3.7") dataclasses;
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
for prog in "$out/bin/"*; do
|
for prog in "$out/bin/"*; do
|
||||||
|
@ -55,5 +49,4 @@ buildPythonPackage rec {
|
||||||
and v2.3/v2.4.
|
and v2.3/v2.4.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,28 +1,40 @@
|
||||||
{ lib, buildPythonPackage, fetchFromGitHub, fetchpatch
|
{ lib, buildPythonPackage, fetchFromGitHub, fetchpatch
|
||||||
, acme, aiohttp, snitun, attrs, pycognito, warrant
|
, acme, aiohttp, snitun, attrs, pycognito, warrant
|
||||||
, pytest-aiohttp, asynctest, pytest }:
|
, pytest-aiohttp, asynctest, atomicwrites, pytest, pythonOlder }:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "hass-nabucasa";
|
pname = "hass-nabucasa";
|
||||||
version = "0.32.2";
|
version = "0.34.6";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "nabucasa";
|
owner = "nabucasa";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "1hfi5q222kgbgrj5yvr4lbhca49hcs6sc2yhxc4pjxqsc12bv1f1";
|
sha256 = "1lkqwj58qr0vn7zf5mhrhaz973ahj9wjp4mgzvyja1gcdh6amv34";
|
||||||
};
|
};
|
||||||
|
|
||||||
# upstreamed in https://github.com/NabuCasa/hass-nabucasa/pull/119
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
sed -i 's/"acme.*/"acme>=0.40.0,<2.0"/' setup.py
|
sed -i 's/"acme.*"/"acme"/' setup.py
|
||||||
cat setup.py
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
propagatedBuildInputs = [ acme aiohttp snitun attrs warrant pycognito ];
|
patches = [
|
||||||
|
# relax pytz dependency
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://github.com/NabuCasa/hass-nabucasa/commit/419e80feddc36c68384c032feda0057515b53eaa.patch";
|
||||||
|
sha256 = "14dgwci8615cwcf27hg7b42s7da50xhyjys3yx446q7ipk8zw4x6";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
acme aiohttp atomicwrites snitun attrs warrant pycognito
|
||||||
|
];
|
||||||
|
|
||||||
checkInputs = [ pytest pytest-aiohttp asynctest ];
|
checkInputs = [ pytest pytest-aiohttp asynctest ];
|
||||||
|
|
||||||
|
# Asynctest's mocking is broken with python3.8
|
||||||
|
# https://github.com/Martiusweb/asynctest/issues/132
|
||||||
|
doCheck = pythonOlder "3.8";
|
||||||
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
pytest tests/
|
pytest tests/
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, buildPythonPackage, fetchPypi, pytest, pythonOlder }:
|
{ lib, buildPythonPackage, fetchPypi, pytestCheckHook, pythonOlder, pytest-asyncio }:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "janus";
|
pname = "janus";
|
||||||
|
@ -11,7 +11,10 @@ buildPythonPackage rec {
|
||||||
|
|
||||||
disabled = pythonOlder "3.6";
|
disabled = pythonOlder "3.6";
|
||||||
|
|
||||||
checkInputs = [ pytest ];
|
checkInputs = [ pytest-asyncio pytestCheckHook ];
|
||||||
|
|
||||||
|
# also fails upstream: https://github.com/aio-libs/janus/pull/258
|
||||||
|
disabledTests = [ "test_format" ];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Mixed sync-async queue";
|
description = "Mixed sync-async queue";
|
||||||
|
|
|
@ -12,13 +12,13 @@
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "pycognito";
|
pname = "pycognito";
|
||||||
version = "0.1.2";
|
version = "0.1.3";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "pvizeli";
|
owner = "pvizeli";
|
||||||
repo = "pycognito";
|
repo = "pycognito";
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "01zns522awm5yp5cbk1y7k7px534i5akiivip709i1naph3hvnfk";
|
sha256 = "0wy6d274xda7v6dazv10h2vwig2avfyz8mh2lpd1a5k7i06r335r";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
|
|
|
@ -13,13 +13,13 @@
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "python-engineio";
|
pname = "python-engineio";
|
||||||
version = "3.10.0";
|
version = "3.13.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "miguelgrinberg";
|
owner = "miguelgrinberg";
|
||||||
repo = "python-engineio";
|
repo = "python-engineio";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "1495r55177c38wq88pb28l50dfd4213iyxwq1k5rmsgp66vww09s";
|
sha256 = "1fgfrgcvjg3fyza5lhl1l9cfq073xrwwhh3xs178csrjz4s8s378";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
|
|
Loading…
Reference in New Issue