From 7b38dfca529f783003b6a07ac238abe5ab029e2c Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 16 Jan 2022 16:36:46 +0100 Subject: [PATCH] python3Packages.pony: 0.7.14 -> 0.7.15rc1 --- .../python-modules/pony/default.nix | 41 +++++++++++++------ 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/pony/default.nix b/pkgs/development/python-modules/pony/default.nix index 03330c4cfec7..27c35abe5739 100644 --- a/pkgs/development/python-modules/pony/default.nix +++ b/pkgs/development/python-modules/pony/default.nix @@ -1,25 +1,42 @@ -{ lib, python, buildPythonPackage, fetchPypi }: +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +, pythonOlder +}: buildPythonPackage rec { pname = "pony"; - version = "0.7.14"; + version = "0.7.15rc1"; + format = "setuptools"; - src = fetchPypi { - inherit pname version; - sha256 = "2f01e84e79ea7a14040225cb6c079bb266e7ba147346356c266490b18c77ce82"; + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "ponyorm"; + repo = pname; + rev = "v${version}"; + hash = "sha256-EoMpVvPCwxJbNPoeF73djcaQ4lY9jRx5nJYR2A2LXoQ="; }; - doCheck = true; + checkInputs = [ + pytestCheckHook + ]; - # stripping the tests - postInstall = '' - rm -rf $out/${python.sitePackages}/pony/orm/tests - ''; + disabledTests = [ + # Tests are outdated + "test_exception_msg" + "test_method" + ]; + + pythonImportsCheck = [ + "pony" + ]; meta = with lib; { - description = "Pony is a Python ORM with beautiful query syntax"; + description = "Library for advanced object-relational mapping"; homepage = "https://ponyorm.org/"; - maintainers = with maintainers; [ d-goldin xvapx ]; license = licenses.asl20; + maintainers = with maintainers; [ d-goldin xvapx ]; }; }