From 6b9adcbbe1a5cf12e1d115092fe8282d8a4fc0bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 8 Feb 2022 20:20:30 +0100 Subject: [PATCH] python39Packages.pytest-celery: switch to correct versioned github tarball --- .../python-modules/pytest-celery/default.nix | 27 ++++++++++++------- .../pytest-celery/no-celery.patch | 9 ------- 2 files changed, 18 insertions(+), 18 deletions(-) delete mode 100644 pkgs/development/python-modules/pytest-celery/no-celery.patch diff --git a/pkgs/development/python-modules/pytest-celery/default.nix b/pkgs/development/python-modules/pytest-celery/default.nix index 77de2d9698ba..9efd9f49f2b4 100644 --- a/pkgs/development/python-modules/pytest-celery/default.nix +++ b/pkgs/development/python-modules/pytest-celery/default.nix @@ -1,21 +1,30 @@ -{ lib, buildPythonPackage, fetchPypi }: +{ lib, buildPythonPackage, fetchFromGitHub }: buildPythonPackage rec { pname = "pytest-celery"; - version = "0.0.0"; + version = "0.1.0"; - src = fetchPypi { - inherit pname version; - sha256 = "cfd060fc32676afa1e4f51b2938f903f7f75d952186b8c6cf631628c4088f406"; + format = "flit"; + + src = fetchFromGitHub { + owner = "celery"; + repo = "pytest-celery"; + rev = "v${version}"; + sha256 = "sha256-vzWwkOS3BLOInaFDk+PegvEmC88ZZ1sG1CmHwhn7r9w="; }; - patches = [ ./no-celery.patch ]; + postPatch = '' + # avoid infinite recursion with celery + substituteInPlace pyproject.toml \ + --replace '"celery >= 4.4.0"' "" + ''; - doCheck = false; # This package has nothing to test or import. + # This package has nothing to test or import. + doCheck = false; meta = with lib; { - description = "pytest plugin for unittest subTest() support and subtests fixture"; - homepage = "https://github.com/pytest-dev/pytest-subtests"; + description = "Pytest plugin to enable celery.contrib.pytest"; + homepage = "https://github.com/celery/pytest-celery"; license = licenses.mit; maintainers = [ ]; }; diff --git a/pkgs/development/python-modules/pytest-celery/no-celery.patch b/pkgs/development/python-modules/pytest-celery/no-celery.patch deleted file mode 100644 index 65337489883c..000000000000 --- a/pkgs/development/python-modules/pytest-celery/no-celery.patch +++ /dev/null @@ -1,9 +0,0 @@ -This plugin is needed to test celery itself, so it can't depend on celery. - ---- a/setup.py -+++ b/setup.py -@@ -6,3 +6,3 @@ from distutils.core import setup - install_requires = \ --['celery >= 4.4.0'] -+[] -