0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-14 06:00:33 +03:00

python3Packages.parse-type: 0.5.2 -> 0.5.6

This commit is contained in:
Fabian Affolter 2021-08-25 10:07:22 +02:00
parent 098ca1a9aa
commit 1ae7ba3fae

View file

@ -1,21 +1,30 @@
{ lib, fetchPypi
{ lib, fetchFromGitHub
, buildPythonPackage, pythonOlder
, pytest, pytest-runner
, parse, six, enum34
}:
buildPythonPackage rec {
pname = "parse_type";
version = "0.5.2";
pname = "parse-type";
version = "0.5.6";
src = fetchPypi {
inherit pname version;
sha256 = "02wclgiqky06y36b3q07b7ngpks5j0gmgl6n71ac2j2hscc0nsbz";
src = fetchFromGitHub {
owner = "jenisys";
repo = "parse_type";
rev = "v${version}";
sha256 = "sha256-CJroqJIi5DpmR8i1lr8OJ+234615PhpVUsqK91XOT3E=";
};
checkInputs = [ pytest pytest-runner ];
propagatedBuildInputs = [ parse six ] ++ lib.optional (pythonOlder "3.4") enum34;
postPatch = ''
substituteInPlace pytest.ini \
--replace "--metadata PACKAGE_UNDER_TEST parse_type" "" \
--replace "--metadata PACKAGE_VERSION 0.5.6" "" \
--replace "--html=build/testing/report.html --self-contained-html" "" \
--replace "--junit-xml=build/testing/report.xml" ""
'';
checkPhase = ''
py.test tests
'';