Skip to content

Commit

Permalink
Merge pull request #325885 from dotlambda/python3Packages.enocean
Browse files Browse the repository at this point in the history
python312Packages.enocean: don't use nose
  • Loading branch information
mweinelt committed Jul 9, 2024
2 parents b1fc92b + b3f5f3f commit 66bd3bd
Showing 1 changed file with 19 additions and 18 deletions.
37 changes: 19 additions & 18 deletions pkgs/development/python-modules/enocean/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,43 @@
lib,
buildPythonPackage,
fetchFromGitHub,
fetchpatch2,
setuptools,
beautifulsoup4,
enum-compat,
pyserial,
nose,
pythonOlder,
pytestCheckHook,
}:

buildPythonPackage rec {
pname = "enocean";
version = "0.60.1";
format = "setuptools";
pyproject = true;

src = fetchFromGitHub {
owner = "kipe";
repo = "enocean";
rev = version;
sha256 = "0cbcvvy3qaqv8925z608qmkc1l914crzw79krwrz2vpm2fyribab";
rev = "refs/tags/${version}";
hash = "sha256-S62YvRP1bvEzzzMd/jMjIdHAZsUImF9EQhsrPPzebDE=";
};

propagatedBuildInputs = [
patches = [
(fetchpatch2 {
name = "replace-nose-with-pytest.patch";
url = "https://github.com/kipe/enocean/commit/e5ca3b70f0920f129219c980ad549d7f3a4576de.patch";
hash = "sha256-cDBvI0I4W5YkGTpg+rKy08TUAmKlhKa/5+Muou9iArs=";
})
];

build-system = [ setuptools ];

dependencies = [
beautifulsoup4
enum-compat
pyserial
];

# tests rely on nose
doCheck = pythonOlder "3.12";

nativeCheckInputs = [ nose ];

checkPhase = ''
runHook preCheck
nosetests
runHook postCheck
'';
nativeCheckInputs = [ pytestCheckHook ];

pythonImportsCheck = [
"enocean.communicators"
Expand All @@ -47,6 +47,7 @@ buildPythonPackage rec {
];

meta = with lib; {
changelog = "https://github.com/kipe/enocean/releases/tag/${version}";
description = "EnOcean serial protocol implementation";
mainProgram = "enocean_example.py";
homepage = "https://github.com/kipe/enocean";
Expand Down

0 comments on commit 66bd3bd

Please sign in to comment.