3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #170032 from SuperSandro2000/xml2rfc

python310Packages.xml2rfc: 3.12.3 -> 3.12.4
This commit is contained in:
Fabian Affolter 2022-04-24 10:36:29 +02:00 committed by GitHub
commit 2a9216b60b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,6 @@
{ lib { lib
, fetchPypi
, buildPythonPackage , buildPythonPackage
, fetchFromGitHub
, pythonOlder , pythonOlder
, intervaltree , intervaltree
, pyflakes , pyflakes
@ -18,19 +18,37 @@
, jinja2 , jinja2
, configargparse , configargparse
, appdirs , appdirs
, decorator
, pycairo
, pytestCheckHook
, python-fontconfig
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "xml2rfc"; pname = "xml2rfc";
version = "3.12.3"; version = "3.12.4";
disabled = pythonOlder "3.6"; disabled = pythonOlder "3.6";
src = fetchPypi { src = fetchFromGitHub {
inherit pname version; owner = "ietf-tools";
sha256 = "sha256-YUrcD3Q1fkDW+nwf6k2T/aBL8+W9iWkPYW/TqdTiuA0="; repo = "xml2rfc";
rev = "v${version}";
sha256 = "sha256-TAu2Ls553t7wJ/Jhgu+Ff+H4P6az0Du8OL00JjZyCDs=";
}; };
postPatch = ''
substituteInPlace Makefile \
--replace "SHELL := /bin/bash" "SHELL := bash" \
--replace "test flaketest" "test" \
--replace "python setup.py --quiet install" ""
substituteInPlace setup.py \
--replace "'tox'," ""
substituteInPlace requirements.txt \
--replace "jinja2>=2.11,<3.0" "jinja2" \
--replace "markupsafe==2.0.1" "markupsafe"
'';
propagatedBuildInputs = [ propagatedBuildInputs = [
intervaltree intervaltree
jinja2 jinja2
@ -50,23 +68,25 @@ buildPythonPackage rec {
appdirs appdirs
]; ];
postPatch = '' checkInputs = [
substituteInPlace requirements.txt \ decorator
--replace "jinja2>=2.11,<3.0" "jinja2>=2.11" pycairo
''; pytestCheckHook
python-fontconfig
];
preCheck = '' # requires Noto Serif and Roboto Mono font
export HOME=$(mktemp -d)
'';
# lxml tries to fetch from the internet
doCheck = false; doCheck = false;
checkPhase = ''
make tests-no-network
'';
pythonImportsCheck = [ "xml2rfc" ]; pythonImportsCheck = [ "xml2rfc" ];
meta = with lib; { meta = with lib; {
description = "Tool generating IETF RFCs and drafts from XML sources"; description = "Tool generating IETF RFCs and drafts from XML sources";
homepage = "https://tools.ietf.org/tools/xml2rfc/trac/"; homepage = "https://github.com/ietf-tools/xml2rfc";
# Well, parts might be considered unfree, if being strict; see: # Well, parts might be considered unfree, if being strict; see:
# http://metadata.ftp-master.debian.org/changelogs/non-free/x/xml2rfc/xml2rfc_2.9.6-1_copyright # http://metadata.ftp-master.debian.org/changelogs/non-free/x/xml2rfc/xml2rfc_2.9.6-1_copyright
license = licenses.bsd3; license = licenses.bsd3;