Merge pull request #151577 from fabaff/fix-octoprint

octoprint: add override for celery and sentry-sdk, remove constraint of sarge
This commit is contained in:
Gabriel Ebner 2021-12-22 18:38:57 +01:00 committed by GitHub
commit edabc5267d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 129 additions and 29 deletions

View file

@ -122,6 +122,45 @@ let
}
)
# Octoprint pulls in celery indirectly but has no support for the up-to-date releases
(
self: super: {
celery = super.celery.overrideAttrs (oldAttrs: rec {
version = "5.0.0";
src = oldAttrs.src.override {
inherit version;
sha256 = "sha256-MTkw/d3nA9jjcCmjBL+RQpzRGu72PFfebayp2Vjh8lU=";
};
doCheck = false;
});
}
)
# Octoprint would allow later sentry-sdk releases but not later click releases
(
self: super: {
sentry-sdk = super.sentry-sdk.overrideAttrs (oldAttrs: rec {
pname = "sentry-sdk";
version = "1.4.3";
src = fetchFromGitHub {
owner = "getsentry";
repo = "sentry-python";
rev = version;
sha256 = "sha256-vdE6eqELMM69CWHaNYhF0HMCTV3tQsJlMHAA96oCy8c=";
};
disabledTests = [
"test_apply_simulates_delivery_info"
"test_auto_enabling_integrations_catches_import_error"
];
disabledTestPaths = [
# Don't test integrations
"tests/integrations"
];
});
}
)
# Built-in dependency
(
self: super: {
@ -237,9 +276,15 @@ let
wrapt
zeroconf
zipstream-new
] ++ lib.optionals stdenv.isDarwin [ py.pkgs.appdirs ];
] ++ lib.optionals stdenv.isDarwin [
py.pkgs.appdirs
];
checkInputs = with super; [ pytestCheckHook mock ddt ];
checkInputs = with super; [
ddt
mock
pytestCheckHook
];
patches = [
# substitute pip and let it find out, that it can't write anywhere
@ -261,6 +306,7 @@ let
"colorlog"
"emoji"
"immutabledict"
"sarge"
"sentry-sdk"
"watchdog"
"wrapt"
@ -299,7 +345,7 @@ let
meta = with lib; {
homepage = "https://octoprint.org/";
description = "The snappy web interface for your 3D printer";
license = licenses.agpl3;
license = licenses.agpl3Only;
maintainers = with maintainers; [ abbradar gebner WhittlesJr ];
};
};

View file

@ -1,38 +1,80 @@
{ lib, buildPythonPackage, fetchPypi
, billiard, click, click-didyoumean, click-plugins, click-repl, kombu, pytz, vine
, boto3, case, moto, pytest, pytest-celery, pytest-subtests, pytest-timeout
{ lib
, billiard
, boto3
, buildPythonPackage
, case
, click
, click-didyoumean
, click-plugins
, click-repl
, fetchPypi
, kombu
, moto
, pymongo
, pytest-celery
, pytest-subtests
, pytest-timeout
, pytestCheckHook
, pythonOlder
, pytz
, vine
}:
buildPythonPackage rec {
pname = "celery";
version = "5.2.1";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-tBpZC0nK+OZJilfbYo5YDV+Nxv69oPQt5deDrtW3+Ag=";
};
propagatedBuildInputs = [ billiard click click-didyoumean click-plugins click-repl kombu pytz vine ];
propagatedBuildInputs = [
billiard
click
click-didyoumean
click-plugins
click-repl
kombu
pytz
vine
];
checkInputs = [ boto3 case moto pytest pytest-celery pytest-subtests pytest-timeout ];
checkInputs = [
boto3
case
moto
pymongo
pytest-celery
pytest-subtests
pytest-timeout
pytestCheckHook
];
# ignore test that's incompatible with pytest5
# test_eventlet touches network
# test_mongodb requires pymongo
# test_multi tries to create directories under /var
checkPhase = ''
pytest -k 'not restore_current_app_fallback and not msgpack and not on_apply and not pytest' \
--ignore=t/unit/contrib/test_pytest.py \
--ignore=t/unit/concurrency/test_eventlet.py \
--ignore=t/unit/bin/test_multi.py \
--ignore=t/unit/apps/test_multi.py \
--ignore=t/unit/backends/test_mongodb.py
'';
disabledTestPaths = [
# test_eventlet touches network
"t/unit/concurrency/test_eventlet.py"
# test_multi tries to create directories under /var
"t/unit/bin/test_multi.py"
"t/unit/apps/test_multi.py"
];
disabledTests = [
"msgpack"
"test_check_privileges_no_fchown"
];
pythonImportsCheck = [
"celery"
];
meta = with lib; {
homepage = "https://github.com/celery/celery/";
description = "Distributed task queue";
homepage = "https://github.com/celery/celery/";
license = licenses.bsd3;
maintainers = [ ];
maintainers = with maintainers; [ ];
};
}

View file

@ -1,20 +1,32 @@
{ lib, buildPythonPackage, fetchPypi }:
{ lib
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "sarge";
version = "0.1.7";
format = "setuptools";
src = fetchPypi {
inherit pname version;
sha256 = "3b810d396a75a5a2805272f64f4316f6dcc086e0a744b042cdb0effc85c0f21b";
src = fetchFromGitHub {
owner = "vsajip";
repo = pname;
rev = version;
sha256 = "sha256-E1alSDXj0oeyB6dN5PAtN62FPpMsCKb4R9DpfWdFtn0=";
};
# No tests in PyPI tarball
doCheck = false;
checkInputs = [
pytestCheckHook
];
pythonImportsCheck = [
"sarge"
];
meta = with lib; {
description = "Python wrapper for subprocess which provides command pipeline functionality";
homepage = "https://sarge.readthedocs.org/";
description = "A wrapper for subprocess which provides command pipeline functionality";
license = licenses.bsd3;
maintainers = with maintainers; [ abbradar ];
};