From da5d2f176df3707095b6ce4195ba67daefca37ec Mon Sep 17 00:00:00 2001 From: snicket2100 <57048005+snicket2100@users.noreply.github.com> Date: Sat, 9 Jul 2022 11:14:14 +0200 Subject: [PATCH 1/2] python3Packages.pymodes: init at 2.11 --- .../python-modules/pymodes/default.nix | 36 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 38 insertions(+) create mode 100644 pkgs/development/python-modules/pymodes/default.nix diff --git a/pkgs/development/python-modules/pymodes/default.nix b/pkgs/development/python-modules/pymodes/default.nix new file mode 100644 index 000000000000..09a86acda2fe --- /dev/null +++ b/pkgs/development/python-modules/pymodes/default.nix @@ -0,0 +1,36 @@ +{ lib +, stdenv +, fetchFromGitHub +, buildPythonPackage +, pythonOlder +, pytest +, numpy +, pyzmq }: + +buildPythonPackage rec { + pname = "pymodes"; + version = "2.11"; + + src = fetchFromGitHub { + owner = "junzis"; + repo = "pyModeS"; + rev = "b36540e2a17c49bf36bc824bc1e4488306d1a1a0"; + sha256 = "1j8brmiz0pqiv9zy2fxg1w65n9pzfnbag54mqkg5yrvz25b93nba"; + }; + + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + propagatedBuildInputs = [ numpy pyzmq ]; + + checkInputs = [ pytest ]; + checkPhase = "pytest"; + + meta = with lib; { + description = "Python Mode-S and ADS-B Decoder"; + homepage = "https://github.com/junzis/pyModeS"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ snicket2100 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 62a1df04f4d3..f746dab62e03 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -13216,6 +13216,8 @@ self: super: with self; { pyinfra = callPackage ../development/python-modules/pyinfra { }; + pymodes = callPackage ../development/python-modules/pymodes { }; + pytibber = callPackage ../development/python-modules/pytibber { }; pytile = callPackage ../development/python-modules/pytile { }; From 261ec4e6d99eed3a856a0d78267b13cf50c5b5e7 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 26 Nov 2024 22:46:27 +0100 Subject: [PATCH 2/2] python312Packages.pymodes: 2.11 -> 2.19 Changelog: https://github.com/junzis/pyModeS/releases/tag/v2.19 --- .../python-modules/pymodes/default.nix | 46 ++++++++++++------- 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/pkgs/development/python-modules/pymodes/default.nix b/pkgs/development/python-modules/pymodes/default.nix index 09a86acda2fe..3cc7a9ac8690 100644 --- a/pkgs/development/python-modules/pymodes/default.nix +++ b/pkgs/development/python-modules/pymodes/default.nix @@ -1,35 +1,49 @@ -{ lib -, stdenv -, fetchFromGitHub -, buildPythonPackage -, pythonOlder -, pytest -, numpy -, pyzmq }: +{ + lib, + buildPythonPackage, + cython, + fetchFromGitHub, + hatchling, + numpy, + pytestCheckHook, + pythonOlder, + pyzmq, + setuptools, +}: buildPythonPackage rec { pname = "pymodes"; - version = "2.11"; + version = "2.19"; + pyproject = true; + + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "junzis"; repo = "pyModeS"; - rev = "b36540e2a17c49bf36bc824bc1e4488306d1a1a0"; - sha256 = "1j8brmiz0pqiv9zy2fxg1w65n9pzfnbag54mqkg5yrvz25b93nba"; + rev = "refs/tags/v${version}"; + hash = "sha256-rVxqtT/sBFQM2Y+GPR2Tc5J2skavvjxwPB7paDBqYRQ="; }; - format = "setuptools"; + build-system = [ + cython + hatchling + setuptools + ]; - disabled = pythonOlder "3.7"; + dependencies = [ + numpy + pyzmq + ]; - propagatedBuildInputs = [ numpy pyzmq ]; + nativeCheckInputs = [ pytestCheckHook ]; - checkInputs = [ pytest ]; - checkPhase = "pytest"; + pythonImportsCheck = [ "pyModeS" ]; meta = with lib; { description = "Python Mode-S and ADS-B Decoder"; homepage = "https://github.com/junzis/pyModeS"; + changelog = "https://github.com/junzis/pyModeS/releases/tag/v${version}"; license = licenses.gpl3Plus; maintainers = with maintainers; [ snicket2100 ]; };