Merge pull request #120704 from dotlambda/pylxd-fix
python3Packages.pylxd: fix build
This commit is contained in:
commit
f21f86911c
|
@ -0,0 +1,56 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, attrs
|
||||
, funcsigs
|
||||
, requests-mock
|
||||
, pytestCheckHook
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "mock-services";
|
||||
version = "0.3.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "peopledoc";
|
||||
repo = "mock-services";
|
||||
rev = version;
|
||||
sha256 = "1rqyyfwngi1xsd9a81irjxacinkj1zf6nqfvfxhi55ky34x5phf9";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Fix issues due to internal API breaking in latest versions of requests-mock
|
||||
(fetchpatch {
|
||||
url = "https://github.com/peopledoc/mock-services/commit/88d3a0c9ef4dd7d5e011068ed2fdbbecc4a1a03a.patch";
|
||||
sha256 = "0a4pwxr33kr525sp8q4mb4cr3n2b51mj2a3052lhg6brdbi4gnms";
|
||||
})
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
attrs
|
||||
funcsigs
|
||||
requests-mock
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
disabledTests = [
|
||||
# require networking
|
||||
"test_real_http_1"
|
||||
"test_restart_http_mock"
|
||||
"test_start_http_mock"
|
||||
"test_stop_http_mock"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "mock_services" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Mock an entire service API based on requests-mock";
|
||||
homepage = "https://github.com/peopledoc/mock-services";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ dotlambda ];
|
||||
};
|
||||
}
|
|
@ -1,24 +1,48 @@
|
|||
{ lib, buildPythonPackage, fetchPypi, pbr, dateutil, ws4py, requests-unixsocket, requests-toolbelt, mock }:
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, cryptography
|
||||
, python-dateutil
|
||||
, requests
|
||||
, requests-toolbelt
|
||||
, requests-unixsocket
|
||||
, ws4py
|
||||
, ddt
|
||||
, mock-services
|
||||
, pytestCheckHook
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pylxd";
|
||||
version = "2.3.0";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1db88l55q974fm9z5gllx3i8bkj0jzi25xrr5cs6id3bfy4zp8a7";
|
||||
src = fetchFromGitHub {
|
||||
owner = "lxc";
|
||||
repo = "pylxd";
|
||||
rev = version;
|
||||
sha256 = "144frnlsb21mglgyisms790hyrdfx1l91lcd7incch4m4a1cbpp6";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
pbr
|
||||
dateutil
|
||||
ws4py
|
||||
requests-unixsocket
|
||||
cryptography
|
||||
python-dateutil
|
||||
requests
|
||||
requests-toolbelt
|
||||
requests-unixsocket
|
||||
ws4py
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
ddt
|
||||
mock-services
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
disabledTestPaths = [
|
||||
"integration"
|
||||
"migration"
|
||||
];
|
||||
|
||||
# tests require an old version of requests-mock that we do not have a package for
|
||||
doCheck = false;
|
||||
pythonImportsCheck = [ "pylxd" ];
|
||||
|
||||
meta = with lib; {
|
||||
|
|
|
@ -4188,6 +4188,8 @@ in {
|
|||
|
||||
mock-open = callPackage ../development/python-modules/mock-open { };
|
||||
|
||||
mock-services = callPackage ../development/python-modules/mock-services { };
|
||||
|
||||
modeled = callPackage ../development/python-modules/modeled { };
|
||||
|
||||
moderngl = callPackage ../development/python-modules/moderngl { };
|
||||
|
|
Loading…
Reference in New Issue