pythonPackages.pypandoc: 1.5.0 -> 1.6.3

* Changed upstream

* Test suite now works with latest pandoc

* pandoc --citeproc support

* Also substitute version in static-pandoc-path.patch
This commit is contained in:
sternenseemann 2021-07-08 15:30:40 +02:00 committed by Jonathan Ringer
parent 23ab1a2d92
commit 95726968d9
4 changed files with 7 additions and 36 deletions

View file

@ -4,22 +4,22 @@
buildPythonPackage rec {
pname = "pypandoc";
version = "1.5";
version = "1.6.3";
src = fetchFromGitHub {
owner = "bebraw";
owner = "NicklasTegner";
repo = pname;
rev = version;
sha256 = "1lpslfns6zxx7b0xr13bzg921lwrj5am8za0b2dviywk6iiib0ld";
sha256 = "163wkcm06klr68dadr9mb8gblj0ls26w097bjrg4f5j0533ysdpp";
};
patches = [
(substituteAll {
src = ./static-pandoc-path.patch;
pandoc = "${lib.getBin pandoc}/bin/pandoc";
pandocVersion = pandoc.version;
})
./skip-tests.patch
./new-pandoc-headings.patch
];
checkInputs = [
@ -28,7 +28,7 @@ buildPythonPackage rec {
meta = with lib; {
description = "Thin wrapper for pandoc";
homepage = "https://github.com/bebraw/pypandoc";
homepage = "https://github.com/NicklasTegner/pypandoc";
license = licenses.mit;
maintainers = with maintainers; [ sternenseemann bennofs ];
};

View file

@ -1,22 +0,0 @@
diff --git a/tests.py b/tests.py
index aede281..c400888 100755
--- a/tests.py
+++ b/tests.py
@@ -295,7 +295,7 @@ class TestPypandoc(unittest.TestCase):
def test_unicode_input(self):
# make sure that pandoc always returns unicode and does not mishandle it
- expected = u'üäöîôû{0}======{0}{0}'.format(os.linesep)
+ expected = u'# üäöîôû'.format(os.linesep)
written = pypandoc.convert_text(u'<h1>üäöîôû</h1>', 'md', format='html')
self.assertTrue(isinstance(written, unicode_type))
self.assertEqualExceptForNewlineEnd(expected, written)
@@ -305,7 +305,7 @@ class TestPypandoc(unittest.TestCase):
self.assertTrue(isinstance(written, unicode_type))
# Only use german umlauts in th next test, as iso-8859-15 covers that
- expected = u'üäö€{0}===={0}{0}'.format(os.linesep)
+ expected = u'# üäö€'.format(os.linesep)
bytes = u'<h1>üäö€</h1>'.encode("iso-8859-15")
# Without encoding, this fails as we expect utf-8 per default

View file

@ -10,11 +10,3 @@ index deb50e0..aede281 100755
def test_basic_conversion_from_http_url(self):
url = 'https://raw.githubusercontent.com/bebraw/pypandoc/master/README.md'
received = pypandoc.convert_file(url, 'html')
@@ -247,6 +248,7 @@ class TestPypandoc(unittest.TestCase):
self.assertRaises(RuntimeError, f)
+ @unittest.skip("pandoc-citeproc has been deprecated")
def test_conversion_with_citeproc_filter(self):
# we just want to get a temp file name, where we can write to
filters = ['pandoc-citeproc']

View file

@ -5,6 +5,7 @@ index 6d5b79b..65437aa 100644
@@ -582,4 +582,4 @@ def clean_pandocpath_cache():
__version = None
-__version = None
+__version = "@pandocVersion@"
-__pandoc_path = None
+__pandoc_path = "@pandoc@"