python3Packages.rply: Fix tests, refactor

This commit is contained in:
Martin Weinelt 2023-01-02 21:43:46 +01:00
parent 257d72ba07
commit 9d7973e52f

View file

@ -1,21 +1,34 @@
{ lib, pytest, fetchFromGitHub, buildPythonPackage, appdirs }: { lib
, fetchFromGitHub
, buildPythonPackage
, appdirs
, py
, pytestCheckHook
}:
buildPythonPackage rec { buildPythonPackage rec {
pname = "rply"; pname = "rply";
version = "0.7.7"; version = "0.7.7";
format = "setuptools";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "alex"; owner = "alex";
repo = "rply"; repo = "rply";
rev = "v${version}"; rev = "v${version}";
sha256 = "1qv37hn7hhxd388znri76g0zjxsbwhxhcaic94dvw9pq4l60vqp6"; hash = "sha256-5uINDCX4Jr4bSSwqBjvkS3f5wTMnZvsRGq1DeCw8Y+M=";
}; };
propagatedBuildInputs = [ appdirs ]; propagatedBuildInputs = [
appdirs
];
checkInputs = [ pytest ]; checkInputs = [
checkPhase = '' py
HOME=$(mktemp -d) py.test tests pytestCheckHook
];
preCheck = ''
export HOME=$(mktemp -d)
''; '';
meta = with lib; { meta = with lib; {