Merge pull request #325885 from dotlambda/python3Packages.enocean

python312Packages.enocean: don't use nose

authored by Martin Weinelt and committed by GitHub 66bd3bd8 b1fc92b0

+19 -18
+19 -18
pkgs/development/python-modules/enocean/default.nix
··· 2 2 lib, 3 3 buildPythonPackage, 4 4 fetchFromGitHub, 5 + fetchpatch2, 6 + setuptools, 5 7 beautifulsoup4, 6 8 enum-compat, 7 9 pyserial, 8 - nose, 9 - pythonOlder, 10 + pytestCheckHook, 10 11 }: 11 12 12 13 buildPythonPackage rec { 13 14 pname = "enocean"; 14 15 version = "0.60.1"; 15 - format = "setuptools"; 16 + pyproject = true; 16 17 17 18 src = fetchFromGitHub { 18 19 owner = "kipe"; 19 20 repo = "enocean"; 20 - rev = version; 21 - sha256 = "0cbcvvy3qaqv8925z608qmkc1l914crzw79krwrz2vpm2fyribab"; 21 + rev = "refs/tags/${version}"; 22 + hash = "sha256-S62YvRP1bvEzzzMd/jMjIdHAZsUImF9EQhsrPPzebDE="; 22 23 }; 23 24 24 - propagatedBuildInputs = [ 25 + patches = [ 26 + (fetchpatch2 { 27 + name = "replace-nose-with-pytest.patch"; 28 + url = "https://github.com/kipe/enocean/commit/e5ca3b70f0920f129219c980ad549d7f3a4576de.patch"; 29 + hash = "sha256-cDBvI0I4W5YkGTpg+rKy08TUAmKlhKa/5+Muou9iArs="; 30 + }) 31 + ]; 32 + 33 + build-system = [ setuptools ]; 34 + 35 + dependencies = [ 25 36 beautifulsoup4 26 37 enum-compat 27 38 pyserial 28 39 ]; 29 40 30 - # tests rely on nose 31 - doCheck = pythonOlder "3.12"; 32 - 33 - nativeCheckInputs = [ nose ]; 34 - 35 - checkPhase = '' 36 - runHook preCheck 37 - 38 - nosetests 39 - 40 - runHook postCheck 41 - ''; 41 + nativeCheckInputs = [ pytestCheckHook ]; 42 42 43 43 pythonImportsCheck = [ 44 44 "enocean.communicators" ··· 47 47 ]; 48 48 49 49 meta = with lib; { 50 + changelog = "https://github.com/kipe/enocean/releases/tag/${version}"; 50 51 description = "EnOcean serial protocol implementation"; 51 52 mainProgram = "enocean_example.py"; 52 53 homepage = "https://github.com/kipe/enocean";