From 09cb20d8bf76c2f8961c5e6cce26821c37606842 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 26 Jul 2019 15:06:33 +0000 Subject: [PATCH 01/30] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-pdfkit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pdfkit.spec b/python-pdfkit.spec index 7851f59..543fb99 100644 --- a/python-pdfkit.spec +++ b/python-pdfkit.spec @@ -2,7 +2,7 @@ Name: python-%{pypi_name} Version: 0.5.0 -Release: 13%{?dist} +Release: 14%{?dist} Summary: Wkhtmltopdf python wrapper License: MIT @@ -50,6 +50,9 @@ rm -rf %{pypi_name}.egg-info %{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %changelog +* Fri Jul 26 2019 Fedora Release Engineering - 0.5.0-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Sat Feb 02 2019 Fedora Release Engineering - 0.5.0-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From 739e12d96bf2aba19fb54213e2f02594a043f6ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 19 Aug 2019 10:49:16 +0200 Subject: [PATCH 02/30] Rebuilt for Python 3.8 --- python-pdfkit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pdfkit.spec b/python-pdfkit.spec index 543fb99..8389e3b 100644 --- a/python-pdfkit.spec +++ b/python-pdfkit.spec @@ -2,7 +2,7 @@ Name: python-%{pypi_name} Version: 0.5.0 -Release: 14%{?dist} +Release: 15%{?dist} Summary: Wkhtmltopdf python wrapper License: MIT @@ -50,6 +50,9 @@ rm -rf %{pypi_name}.egg-info %{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %changelog +* Mon Aug 19 2019 Miro Hrončok - 0.5.0-15 +- Rebuilt for Python 3.8 + * Fri Jul 26 2019 Fedora Release Engineering - 0.5.0-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild From 76b6658cbb45990a0ff6838596d03147e1635fa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Thu, 3 Oct 2019 14:22:34 +0200 Subject: [PATCH 03/30] Rebuilt for Python 3.8.0rc1 (#1748018) --- python-pdfkit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pdfkit.spec b/python-pdfkit.spec index 8389e3b..99eb510 100644 --- a/python-pdfkit.spec +++ b/python-pdfkit.spec @@ -2,7 +2,7 @@ Name: python-%{pypi_name} Version: 0.5.0 -Release: 15%{?dist} +Release: 16%{?dist} Summary: Wkhtmltopdf python wrapper License: MIT @@ -50,6 +50,9 @@ rm -rf %{pypi_name}.egg-info %{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %changelog +* Thu Oct 03 2019 Miro Hrončok - 0.5.0-16 +- Rebuilt for Python 3.8.0rc1 (#1748018) + * Mon Aug 19 2019 Miro Hrončok - 0.5.0-15 - Rebuilt for Python 3.8 From 824d1343cfc5f2d34be0a04a1056e9ff9a64f251 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 30 Jan 2020 13:58:51 +0000 Subject: [PATCH 04/30] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-pdfkit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pdfkit.spec b/python-pdfkit.spec index 99eb510..8b078f1 100644 --- a/python-pdfkit.spec +++ b/python-pdfkit.spec @@ -2,7 +2,7 @@ Name: python-%{pypi_name} Version: 0.5.0 -Release: 16%{?dist} +Release: 17%{?dist} Summary: Wkhtmltopdf python wrapper License: MIT @@ -50,6 +50,9 @@ rm -rf %{pypi_name}.egg-info %{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %changelog +* Thu Jan 30 2020 Fedora Release Engineering - 0.5.0-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Thu Oct 03 2019 Miro Hrončok - 0.5.0-16 - Rebuilt for Python 3.8.0rc1 (#1748018) From 5b7a65724a91cd4beebb31f2e5bd43d658638ec9 Mon Sep 17 00:00:00 2001 From: Raphael Groner Date: Mon, 16 Mar 2020 22:39:30 +0100 Subject: [PATCH 05/30] add tests --- example.css | 1 + example.html | 7 + example2.css | 1 + pdfkit-tests.py | 333 +++++++++++++++++++++++++++++++++++++++++++++ python-pdfkit.spec | 23 +++- sources | 2 +- 6 files changed, 365 insertions(+), 2 deletions(-) create mode 100644 example.css create mode 100644 example.html create mode 100644 example2.css create mode 100644 pdfkit-tests.py diff --git a/example.css b/example.css new file mode 100644 index 0000000..1e2acd0 --- /dev/null +++ b/example.css @@ -0,0 +1 @@ +body { font-size: 80px; } \ No newline at end of file diff --git a/example.html b/example.html new file mode 100644 index 0000000..8b15991 --- /dev/null +++ b/example.html @@ -0,0 +1,7 @@ + + + + +

Oh Hai!

+ + \ No newline at end of file diff --git a/example2.css b/example2.css new file mode 100644 index 0000000..016db27 --- /dev/null +++ b/example2.css @@ -0,0 +1 @@ +a { color: blue; } \ No newline at end of file diff --git a/pdfkit-tests.py b/pdfkit-tests.py new file mode 100644 index 0000000..f8225ed --- /dev/null +++ b/pdfkit-tests.py @@ -0,0 +1,333 @@ +# -*- coding: utf-8 -*- +import os +import io +import sys +import codecs +import unittest + +#Prepend ../ to PYTHONPATH so that we can import PDFKIT form there. +TESTS_ROOT = os.path.abspath(os.path.dirname(__file__)) +sys.path.insert(0, os.path.realpath(os.path.join(TESTS_ROOT, '..'))) + +import pdfkit + + +class TestPDFKitInitialization(unittest.TestCase): + """Test init""" + + def test_html_source(self): + r = pdfkit.PDFKit('

Oh hai

', 'string') + self.assertTrue(r.source.isString()) + + def test_url_source(self): + r = pdfkit.PDFKit('http://ya.ru', 'url') + self.assertTrue(r.source.isUrl()) + + def test_file_source(self): + r = pdfkit.PDFKit('fixtures/example.html', 'file') + self.assertTrue(r.source.isFile()) + + def test_file_object_source(self): + with open('fixtures/example.html') as fl: + r = pdfkit.PDFKit(fl, 'file') + self.assertTrue(r.source.isFileObj()) + + def test_file_source_with_path(self): + r = pdfkit.PDFKit('test', 'string') + with io.open('fixtures/example.css') as f: + self.assertTrue(r.source.isFile(path=f)) + with codecs.open('fixtures/example.css', encoding='UTF-8') as f: + self.assertTrue(r.source.isFile(path=f)) + + def test_options_parsing(self): + r = pdfkit.PDFKit('html', 'string', options={'page-size': 'Letter'}) + self.assertTrue(r.options['--page-size']) + + def test_options_parsing_with_dashes(self): + r = pdfkit.PDFKit('html', 'string', options={'--page-size': 'Letter'}) + self.assertTrue(r.options['--page-size']) + + def test_custom_configuration(self): + conf = pdfkit.configuration() + self.assertEqual('pdfkit-', conf.meta_tag_prefix) + conf = pdfkit.configuration(meta_tag_prefix='prefix-') + self.assertEqual('prefix-', conf.meta_tag_prefix) + with self.assertRaises(IOError): + conf = pdfkit.configuration(wkhtmltopdf='wrongpath') + + +class TestPDFKitCommandGeneration(unittest.TestCase): + """Test command() method""" + + def test_command_construction(self): + r = pdfkit.PDFKit('html', 'string', options={'page-size': 'Letter', 'toc-l1-font-size': 12}) + command = r.command() + self.assertEqual(command[0], r.wkhtmltopdf) + self.assertEqual(command[command.index('--page-size') + 1], 'Letter') + self.assertEqual(command[command.index('--toc-l1-font-size') + 1], '12') + + def test_lists_of_input_args(self): + urls = ['http://ya.ru', 'http://google.com'] + paths = ['fixtures/example.html', 'fixtures/example.html'] + r = pdfkit.PDFKit(urls, 'url') + r2 = pdfkit.PDFKit(paths, 'file') + cmd = r.command() + cmd2 = r2.command() + self.assertEqual(cmd[-3:], ['http://ya.ru', 'http://google.com', '-']) + self.assertEqual(cmd2[-3:], ['fixtures/example.html', 'fixtures/example.html', '-']) + + def test_read_source_from_stdin(self): + r = pdfkit.PDFKit('html', 'string') + self.assertEqual(r.command()[-2:], ['-', '-']) + + def test_url_in_command(self): + r = pdfkit.PDFKit('http://ya.ru', 'url') + self.assertEqual(r.command()[-2:], ['http://ya.ru', '-']) + + def test_file_path_in_command(self): + path = 'fixtures/example.html' + r = pdfkit.PDFKit(path, 'file') + self.assertEqual(r.command()[-2:], [path, '-']) + + def test_output_path(self): + out = '/test/test2/out.pdf' + r = pdfkit.PDFKit('html', 'string') + self.assertEqual(r.command(out)[-1:], ['/test/test2/out.pdf']) + + def test_pdfkit_meta_tags(self): + body = """ + + + + + + """ + + r = pdfkit.PDFKit(body, 'string') + command = r.command() + self.assertEqual(command[command.index('--page-size') + 1], 'Legal') + self.assertEqual(command[command.index('--orientation') + 1], 'Landscape') + + def test_pdfkit_meta_tags_in_bad_markup(self): + body = """ + + + + + +
+ + """ + + r = pdfkit.PDFKit(body, 'string') + command = r.command() + self.assertEqual(command[command.index('--page-size') + 1], 'Legal') + self.assertEqual(command[command.index('--orientation') + 1], 'Landscape') + + def test_skip_nonpdfkit_tags(self): + body = """ + + + + + +
+ + """ + + r = pdfkit.PDFKit(body, 'string') + command = r.command() + self.assertEqual(command[command.index('--orientation') + 1], 'Landscape') + + def test_toc_handling_without_options(self): + r = pdfkit.PDFKit('hmtl', 'string', toc={'xsl-style-sheet': 'test.xsl'}) + self.assertEqual(r.command()[1], 'toc') + self.assertEqual(r.command()[2], '--xsl-style-sheet') + + def test_toc_with_options(self): + options = { + 'page-size': 'Letter', + 'margin-top': '0.75in', + 'margin-right': '0.75in', + 'margin-bottom': '0.75in', + 'margin-left': '0.75in', + 'encoding': "UTF-8" + } + r = pdfkit.PDFKit('html', 'string', options=options, toc={'xsl-style-sheet': 'test.xsl'}) + + self.assertEqual(r.command()[1 + len(options) * 2], 'toc') + self.assertEqual(r.command()[1 + len(options) * 2 + 1], '--xsl-style-sheet') + + def test_cover_without_options(self): + r = pdfkit.PDFKit('html', 'string', cover='test.html') + + self.assertEqual(r.command()[1], 'cover') + self.assertEqual(r.command()[2], 'test.html') + + def test_cover_with_options(self): + options = { + 'page-size': 'Letter', + 'margin-top': '0.75in', + 'margin-right': '0.75in', + 'margin-bottom': '0.75in', + 'margin-left': '0.75in', + 'encoding': "UTF-8" + } + r = pdfkit.PDFKit('html', 'string', options=options, cover='test.html') + + self.assertEqual(r.command()[1 + len(options) * 2], 'cover') + self.assertEqual(r.command()[1 + len(options) * 2 + 1], 'test.html') + + def test_cover_and_toc(self): + options = { + 'page-size': 'Letter', + 'margin-top': '0.75in', + 'margin-right': '0.75in', + 'margin-bottom': '0.75in', + 'margin-left': '0.75in', + 'encoding': "UTF-8" + } + r = pdfkit.PDFKit('html', 'string', options=options, toc={'xsl-style-sheet': 'test.xsl'}, cover='test.html') + command = r.command() + self.assertEqual(command[-7:], ['toc', '--xsl-style-sheet', 'test.xsl', 'cover', 'test.html', '-', '-']) + + def test_outline_options(self): + options = { + 'outline': None, + 'outline-depth': 1 + } + + r = pdfkit.PDFKit('ya.ru', 'url', options=options) + cmd = r.command() + #self.assertEqual(cmd[1:], ['--outline', '--outline-depth', '1', 'ya.ru', '-']) + self.assertIn('--outline', cmd) + self.assertEqual(cmd[cmd.index('--outline-depth') + 1], '1') + + def test_filter_empty_and_none_values_in_opts(self): + options = { + 'outline': '', + 'footer-line': None, + 'quiet': False + } + + r = pdfkit.PDFKit('html', 'string', options=options) + cmd = r.command() + self.assertEqual(len(cmd), 6) + + +class TestPDFKitGeneration(unittest.TestCase): + """Test to_pdf() method""" + + def setUp(self): + pass + + def tearDown(self): + if os.path.exists('out.pdf'): + os.remove('out.pdf') + + def test_pdf_generation(self): + r = pdfkit.PDFKit('html', 'string', options={'page-size': 'Letter'}) + pdf = r.to_pdf('out.pdf') + self.assertTrue(pdf) + + def test_raise_error_with_invalid_url(self): + r = pdfkit.PDFKit('wrongurl', 'url') + with self.assertRaises(IOError): + r.to_pdf('out.pdf') + + def test_raise_error_with_invalid_file_path(self): + paths = ['frongpath.html', 'wrongpath2.html'] + with self.assertRaises(IOError): + pdfkit.PDFKit('wrongpath.html', 'file') + with self.assertRaises(IOError): + pdfkit.PDFKit(paths, 'file') + + def test_stylesheet_adding_to_the_head(self): + #TODO rewrite this part of pdfkit.py + r = pdfkit.PDFKit('Hai!', 'string', + css='fixtures/example.css') + + with open('fixtures/example.css') as f: + css = f.read() + + r._prepend_css('fixtures/example.css') + self.assertIn('' % css, r.source.to_s()) + + def test_stylesheet_adding_without_head_tag(self): + r = pdfkit.PDFKit('Hai!', 'string', + options={'quiet': None}, css='fixtures/example.css') + + with open('fixtures/example.css') as f: + css = f.read() + + r._prepend_css('fixtures/example.css') + self.assertIn('' % css, r.source.to_s()) + + def test_multiple_stylesheets_adding_to_the_head(self): + #TODO rewrite this part of pdfkit.py + css_files = ['fixtures/example.css', 'fixtures/example2.css'] + r = pdfkit.PDFKit('Hai!', 'string', + css=css_files) + + css=[] + for css_file in css_files: + with open(css_file) as f: + css.append(f.read()) + + r._prepend_css(css_files) + self.assertIn('' % "\n".join(css), r.source.to_s()) + + def test_multiple_stylesheet_adding_without_head_tag(self): + css_files = ['fixtures/example.css', 'fixtures/example2.css'] + r = pdfkit.PDFKit('Hai!', 'string', + options={'quiet': None}, css=css_files) + + css=[] + for css_file in css_files: + with open(css_file) as f: + css.append(f.read()) + + r._prepend_css(css_files) + self.assertIn('' % "\n".join(css), r.source.to_s()) + + def test_stylesheet_throw_error_when_url(self): + r = pdfkit.PDFKit('http://ya.ru', 'url', css='fixtures/example.css') + + with self.assertRaises(r.ImproperSourceError): + r.to_pdf() + + def test_stylesheet_adding_to_file_with_option(self): + css = 'fixtures/example.css' + r = pdfkit.PDFKit('fixtures/example.html', 'file', css=css) + self.assertEqual(r.css, css) + r._prepend_css(css) + self.assertIn('font-size', r.source.to_s()) + + def test_wkhtmltopdf_error_handling(self): + r = pdfkit.PDFKit('clearlywrongurl.asdf', 'url') + with self.assertRaises(IOError): + r.to_pdf() + + def test_pdf_generation_from_file_like(self): + with open('fixtures/example.html', 'r') as f: + r = pdfkit.PDFKit(f, 'file') + output = r.to_pdf() + self.assertEqual(output[:4].decode('utf-8'), '%PDF') + + def test_raise_error_with_wrong_css_path(self): + css = 'fixtures/wrongpath.css' + r = pdfkit.PDFKit('fixtures/example.html', 'file', css=css) + with self.assertRaises(IOError): + r.to_pdf() + + def test_raise_error_if_bad_wkhtmltopdf_option(self): + r = pdfkit.PDFKit('Hai!', 'string', + options={'bad-option': None}) + with self.assertRaises(IOError) as cm: + r.to_pdf() + + raised_exception = cm.exception + self.assertRegexpMatches(str(raised_exception), '^wkhtmltopdf exited with non-zero code 1. error:\nUnknown long argument --bad-option\r?\n') + +if __name__ == "__main__": + unittest.main() diff --git a/python-pdfkit.spec b/python-pdfkit.spec index 8b078f1..f580e7e 100644 --- a/python-pdfkit.spec +++ b/python-pdfkit.spec @@ -1,18 +1,29 @@ %global pypi_name pdfkit +%global commit0 d1c218ab4bb9e4c3790638070ad41bec6077537e +%global testurl https://raw.githubusercontent.com/JazzCore/python-pdfkit/%{commit0}/tests/ Name: python-%{pypi_name} Version: 0.5.0 -Release: 17%{?dist} +Release: 18%{?dist} Summary: Wkhtmltopdf python wrapper License: MIT URL: https://github.com/JazzCore/python-pdfkit Source0: https://pypi.python.org/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.zip +# tests taken from github due to not part of pypi +Source10: %{testurl}/pdfkit-tests.py +Source11: %{testurl}/fixtures/example.css +Source12: %{testurl}/fixtures/example.html +Source13: %{testurl}/fixtures/example2.css + BuildArch: noarch BuildRequires: python3-setuptools BuildRequires: python3-devel BuildRequires: python3 +BuildRequires: python3-pytest +BuildRequires: wkhtmltopdf + Requires: python3 Requires: wkhtmltopdf @@ -26,6 +37,7 @@ This is an adapted version of Ruby PDFKit. %package -n python3-%{pypi_name} Summary: Wkhtmltopdf python wrapper %{?python_provide:%python_provide python3-%{pypi_name}} + %description -n python3-%{pypi_name} Python 3 wrapper for wkhtmltopdf utility to convert HTML to PDF using Webkit. @@ -42,6 +54,12 @@ rm -rf %{pypi_name}.egg-info %install %py3_install +%check +mkdir -p tests/fixtures +cp -t tests %{SOURCE10} +cp -t tests/fixtures %{SOURCE11} %{SOURCE12} %{SOURCE13} +%{__python3} setup.py test + %files -n python3-%{pypi_name} %{!?_licensedir:%global license %%doc} %license LICENSE @@ -50,6 +68,9 @@ rm -rf %{pypi_name}.egg-info %{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %changelog +* Mon Mar 16 2020 Raphael Groner - 0.5.0-18 +- add tests + * Thu Jan 30 2020 Fedora Release Engineering - 0.5.0-17 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild diff --git a/sources b/sources index ba78f2b..18e7ed3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -5cbe42c43d463f0794272a01e37a553f pdfkit-0.5.0.zip +SHA512 (pdfkit-0.5.0.zip) = 7d310d36503305bf71065b9b96bb313cb21f40ad7c347554b6f7a82e3d7ee8a7e3122ce54a522fbbacb5c50f0ddb72c9827bc0b38aa1ebea891e5c91b2668841 From 96b7f92dbf55e74499968eb77027f5d8c035dc28 Mon Sep 17 00:00:00 2001 From: Raphael Groner Date: Mon, 16 Mar 2020 22:41:51 +0100 Subject: [PATCH 06/30] drop duplicated Requires --- python-pdfkit.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/python-pdfkit.spec b/python-pdfkit.spec index f580e7e..c2f276e 100644 --- a/python-pdfkit.spec +++ b/python-pdfkit.spec @@ -27,8 +27,6 @@ BuildRequires: wkhtmltopdf Requires: python3 Requires: wkhtmltopdf -Requires: wkhtmltopdf - %description Python 2 wrapper for wkhtmltopdf utility to convert HTML to PDF using Webkit. From 1fbf42ae6be75327b7f9d25fa4961695f71ce865 Mon Sep 17 00:00:00 2001 From: Raphael Groner Date: Mon, 16 Mar 2020 23:24:24 +0100 Subject: [PATCH 07/30] bump to v0.6.1, rhbz#1737194 --- python-pdfkit.spec | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/python-pdfkit.spec b/python-pdfkit.spec index c2f276e..d821352 100644 --- a/python-pdfkit.spec +++ b/python-pdfkit.spec @@ -1,30 +1,29 @@ %global pypi_name pdfkit -%global commit0 d1c218ab4bb9e4c3790638070ad41bec6077537e -%global testurl https://raw.githubusercontent.com/JazzCore/python-pdfkit/%{commit0}/tests/ +%global commit0 6f1077dbae22863390915b6f69c8ec77f7c4a83f +%global testurl https://raw.githubusercontent.com/JazzCore/python-%{pypi_name}/%{commit0}/tests/ Name: python-%{pypi_name} -Version: 0.5.0 -Release: 18%{?dist} +Version: 0.6.1 +Release: 1%{?dist} Summary: Wkhtmltopdf python wrapper License: MIT -URL: https://github.com/JazzCore/python-pdfkit -Source0: https://pypi.python.org/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.zip +URL: https://github.com/JazzCore/python-%{pypi_name} +Source0: %{pypi_source} # tests taken from github due to not part of pypi -Source10: %{testurl}/pdfkit-tests.py -Source11: %{testurl}/fixtures/example.css -Source12: %{testurl}/fixtures/example.html -Source13: %{testurl}/fixtures/example2.css +Source10: %{testurl}/%{pypi_name}-tests.py#/%{commit0}_pdfkit-tests.py +Source11: %{testurl}/fixtures/example.css#/%{commit0}_example.css +Source12: %{testurl}/fixtures/example.html#/%{commit0}_example.html +Source13: %{testurl}/fixtures/example2.css#/%{commit0}_example2.css -BuildArch: noarch +BuildArch: noarch BuildRequires: python3-setuptools BuildRequires: python3-devel BuildRequires: python3 BuildRequires: python3-pytest BuildRequires: wkhtmltopdf -Requires: python3 Requires: wkhtmltopdf %description @@ -56,16 +55,22 @@ rm -rf %{pypi_name}.egg-info mkdir -p tests/fixtures cp -t tests %{SOURCE10} cp -t tests/fixtures %{SOURCE11} %{SOURCE12} %{SOURCE13} +find tests -type f |\ + while read a; do b=$(echo $a |\ + sed -r 's/%{commit0}_//'); \ + mv -v $a $b; done %{__python3} setup.py test %files -n python3-%{pypi_name} -%{!?_licensedir:%global license %%doc} %license LICENSE %doc README.rst HISTORY.rst %{python3_sitelib}/%{pypi_name} %{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %changelog +* Mon Mar 16 2020 Raphael Groner - 0.6.1-1 +- new version + * Mon Mar 16 2020 Raphael Groner - 0.5.0-18 - add tests From 117a1debbb2e0172d7d3eec722bec0009ff0dd32 Mon Sep 17 00:00:00 2001 From: Raphael Groner Date: Tue, 17 Mar 2020 17:50:59 +0100 Subject: [PATCH 08/30] upload new sources (v0.6.1) --- .gitignore | 1 + ...22863390915b6f69c8ec77f7c4a83f_example.css | 0 ...2863390915b6f69c8ec77f7c4a83f_example.html | 0 ...2863390915b6f69c8ec77f7c4a83f_example2.css | 0 ...3390915b6f69c8ec77f7c4a83f_pdfkit-tests.py | 97 +++++++++++++++++-- sources | 2 +- 6 files changed, 90 insertions(+), 10 deletions(-) rename example.css => 6f1077dbae22863390915b6f69c8ec77f7c4a83f_example.css (100%) rename example.html => 6f1077dbae22863390915b6f69c8ec77f7c4a83f_example.html (100%) rename example2.css => 6f1077dbae22863390915b6f69c8ec77f7c4a83f_example2.css (100%) rename pdfkit-tests.py => 6f1077dbae22863390915b6f69c8ec77f7c4a83f_pdfkit-tests.py (76%) diff --git a/.gitignore b/.gitignore index 1632b9a..b2721d5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /pdfkit-0.4.1.tar.gz /pdfkit-0.5.0.zip +/pdfkit-0.6.1.tar.gz diff --git a/example.css b/6f1077dbae22863390915b6f69c8ec77f7c4a83f_example.css similarity index 100% rename from example.css rename to 6f1077dbae22863390915b6f69c8ec77f7c4a83f_example.css diff --git a/example.html b/6f1077dbae22863390915b6f69c8ec77f7c4a83f_example.html similarity index 100% rename from example.html rename to 6f1077dbae22863390915b6f69c8ec77f7c4a83f_example.html diff --git a/example2.css b/6f1077dbae22863390915b6f69c8ec77f7c4a83f_example2.css similarity index 100% rename from example2.css rename to 6f1077dbae22863390915b6f69c8ec77f7c4a83f_example2.css diff --git a/pdfkit-tests.py b/6f1077dbae22863390915b6f69c8ec77f7c4a83f_pdfkit-tests.py similarity index 76% rename from pdfkit-tests.py rename to 6f1077dbae22863390915b6f69c8ec77f7c4a83f_pdfkit-tests.py index f8225ed..78fc329 100644 --- a/pdfkit-tests.py +++ b/6f1077dbae22863390915b6f69c8ec77f7c4a83f_pdfkit-tests.py @@ -5,6 +5,11 @@ import sys import codecs import unittest + +if sys.version_info[0] == 2 and sys.version_info[1] == 7: + unittest.TestCase.assertRegex = unittest.TestCase.assertRegexpMatches + + #Prepend ../ to PYTHONPATH so that we can import PDFKIT form there. TESTS_ROOT = os.path.abspath(os.path.dirname(__file__)) sys.path.insert(0, os.path.realpath(os.path.join(TESTS_ROOT, '..'))) @@ -41,11 +46,66 @@ class TestPDFKitInitialization(unittest.TestCase): def test_options_parsing(self): r = pdfkit.PDFKit('html', 'string', options={'page-size': 'Letter'}) - self.assertTrue(r.options['--page-size']) + test_command = r.command('test') + idx = test_command.index('--page-size') # Raise exception in case of not found + self.assertTrue(test_command[idx+1] == 'Letter') def test_options_parsing_with_dashes(self): r = pdfkit.PDFKit('html', 'string', options={'--page-size': 'Letter'}) - self.assertTrue(r.options['--page-size']) + + test_command = r.command('test') + idx = test_command.index('--page-size') # Raise exception in case of not found + self.assertTrue(test_command[idx+1] == 'Letter') + + def test_options_parsing_with_tuple(self): + options = { + '--custom-header': [ + ('Accept-Encoding','gzip') + ] + } + r = pdfkit.PDFKit('html', 'string', options=options) + command = r.command() + idx1 = command.index('--custom-header') # Raise exception in case of not found + self.assertTrue(command[idx1 + 1] == 'Accept-Encoding') + self.assertTrue(command[idx1 + 2] == 'gzip') + + def test_options_parsing_with_tuple_no_dashes(self): + options = { + 'custom-header': [ + ('Accept-Encoding','gzip') + ] + } + r = pdfkit.PDFKit('html', 'string', options=options) + command = r.command() + idx1 = command.index('--custom-header') # Raise exception in case of not found + self.assertTrue(command[idx1 + 1] == 'Accept-Encoding') + self.assertTrue(command[idx1 + 2] == 'gzip') + + def test_repeatable_options(self): + roptions = { + '--page-size': 'Letter', + 'cookies': [ + ('test_cookie1','cookie_value1'), + ('test_cookie2','cookie_value2'), + ] + } + + r = pdfkit.PDFKit('html', 'string', options=roptions) + + test_command = r.command('test') + + idx1 = test_command.index('--page-size') # Raise exception in case of not found + self.assertTrue(test_command[idx1 + 1] == 'Letter') + + self.assertTrue(test_command.count('--cookies') == 2) + + idx2 = test_command.index('--cookies') + self.assertTrue(test_command[idx2 + 1] == 'test_cookie1') + self.assertTrue(test_command[idx2 + 2] == 'cookie_value1') + + idx3 = test_command.index('--cookies', idx2 + 2) + self.assertTrue(test_command[idx3 + 1] == 'test_cookie2') + self.assertTrue(test_command[idx3 + 2] == 'cookie_value2') def test_custom_configuration(self): conf = pdfkit.configuration() @@ -155,14 +215,18 @@ class TestPDFKitCommandGeneration(unittest.TestCase): } r = pdfkit.PDFKit('html', 'string', options=options, toc={'xsl-style-sheet': 'test.xsl'}) - self.assertEqual(r.command()[1 + len(options) * 2], 'toc') - self.assertEqual(r.command()[1 + len(options) * 2 + 1], '--xsl-style-sheet') + command = r.command() + + self.assertEqual(command[1 + len(options) * 2], 'toc') + self.assertEqual(command[1 + len(options) * 2 + 1], '--xsl-style-sheet') def test_cover_without_options(self): r = pdfkit.PDFKit('html', 'string', cover='test.html') - self.assertEqual(r.command()[1], 'cover') - self.assertEqual(r.command()[2], 'test.html') + command = r.command() + + self.assertEqual(command[1], 'cover') + self.assertEqual(command[2], 'test.html') def test_cover_with_options(self): options = { @@ -175,8 +239,10 @@ class TestPDFKitCommandGeneration(unittest.TestCase): } r = pdfkit.PDFKit('html', 'string', options=options, cover='test.html') - self.assertEqual(r.command()[1 + len(options) * 2], 'cover') - self.assertEqual(r.command()[1 + len(options) * 2 + 1], 'test.html') + command = r.command() + + self.assertEqual(command[1 + len(options) * 2], 'cover') + self.assertEqual(command[1 + len(options) * 2 + 1], 'test.html') def test_cover_and_toc(self): options = { @@ -191,6 +257,19 @@ class TestPDFKitCommandGeneration(unittest.TestCase): command = r.command() self.assertEqual(command[-7:], ['toc', '--xsl-style-sheet', 'test.xsl', 'cover', 'test.html', '-', '-']) + def test_cover_and_toc_cover_first(self): + options = { + 'page-size': 'Letter', + 'margin-top': '0.75in', + 'margin-right': '0.75in', + 'margin-bottom': '0.75in', + 'margin-left': '0.75in', + 'encoding': "UTF-8" + } + r = pdfkit.PDFKit('html', 'string', options=options, toc={'xsl-style-sheet': 'test.xsl'}, cover='test.html', cover_first=True) + command = r.command() + self.assertEqual(command[-7:], ['cover', 'test.html', 'toc', '--xsl-style-sheet', 'test.xsl', '-', '-']) + def test_outline_options(self): options = { 'outline': None, @@ -327,7 +406,7 @@ class TestPDFKitGeneration(unittest.TestCase): r.to_pdf() raised_exception = cm.exception - self.assertRegexpMatches(str(raised_exception), '^wkhtmltopdf exited with non-zero code 1. error:\nUnknown long argument --bad-option\r?\n') + self.assertRegex(str(raised_exception), '^wkhtmltopdf exited with non-zero code 1. error:\nUnknown long argument --bad-option\r?\n') if __name__ == "__main__": unittest.main() diff --git a/sources b/sources index 18e7ed3..376ecc3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pdfkit-0.5.0.zip) = 7d310d36503305bf71065b9b96bb313cb21f40ad7c347554b6f7a82e3d7ee8a7e3122ce54a522fbbacb5c50f0ddb72c9827bc0b38aa1ebea891e5c91b2668841 +SHA512 (pdfkit-0.6.1.tar.gz) = b3ac1016d1c01a2a196f567b9b672caca10f564cc6a62122691d34c3cbbf143f6a846bfba26c3474e9c0296977f0d30c0b5af13b3321ab207b787df3cba12e5d From 3a1ededbfc8de9a4c11092601096ee31418f62ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 26 May 2020 03:29:40 +0200 Subject: [PATCH 09/30] Rebuilt for Python 3.9 --- python-pdfkit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pdfkit.spec b/python-pdfkit.spec index d821352..11ff61d 100644 --- a/python-pdfkit.spec +++ b/python-pdfkit.spec @@ -4,7 +4,7 @@ Name: python-%{pypi_name} Version: 0.6.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Wkhtmltopdf python wrapper License: MIT @@ -68,6 +68,9 @@ find tests -type f |\ %{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %changelog +* Tue May 26 2020 Miro Hrončok - 0.6.1-2 +- Rebuilt for Python 3.9 + * Mon Mar 16 2020 Raphael Groner - 0.6.1-1 - new version From 7b45c01820dc743703f99ceadb5dec5a5386fd74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 13 Jul 2020 21:04:36 +0200 Subject: [PATCH 10/30] Replace Python version glob with macro (needed for Python 3.10+) See https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/PQIGCQCRNBYNXBX2ICWEM3PLDLNOG2ZT/ Co-authored-by: Tomas Hrnciar --- python-pdfkit.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-pdfkit.spec b/python-pdfkit.spec index 11ff61d..631f682 100644 --- a/python-pdfkit.spec +++ b/python-pdfkit.spec @@ -65,7 +65,7 @@ find tests -type f |\ %license LICENSE %doc README.rst HISTORY.rst %{python3_sitelib}/%{pypi_name} -%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info +%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %changelog * Tue May 26 2020 Miro Hrončok - 0.6.1-2 From afbd0633410f0fa6b5719f75dafdf3e13c1c3c1c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 29 Jul 2020 02:42:38 +0000 Subject: [PATCH 11/30] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-pdfkit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pdfkit.spec b/python-pdfkit.spec index 631f682..ab3b827 100644 --- a/python-pdfkit.spec +++ b/python-pdfkit.spec @@ -4,7 +4,7 @@ Name: python-%{pypi_name} Version: 0.6.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Wkhtmltopdf python wrapper License: MIT @@ -68,6 +68,9 @@ find tests -type f |\ %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %changelog +* Wed Jul 29 2020 Fedora Release Engineering - 0.6.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Tue May 26 2020 Miro Hrončok - 0.6.1-2 - Rebuilt for Python 3.9 From d03570c21025b8a6cbefe29b26c9dca70b49bec1 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 27 Jan 2021 12:13:40 +0000 Subject: [PATCH 12/30] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-pdfkit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pdfkit.spec b/python-pdfkit.spec index ab3b827..354ae2e 100644 --- a/python-pdfkit.spec +++ b/python-pdfkit.spec @@ -4,7 +4,7 @@ Name: python-%{pypi_name} Version: 0.6.1 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Wkhtmltopdf python wrapper License: MIT @@ -68,6 +68,9 @@ find tests -type f |\ %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %changelog +* Wed Jan 27 2021 Fedora Release Engineering - 0.6.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Wed Jul 29 2020 Fedora Release Engineering - 0.6.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From 2a2e45aecf60d9a6cba7b95e2692fc37d2b20c50 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 4 Jun 2021 20:50:13 +0200 Subject: [PATCH 13/30] Rebuilt for Python 3.10 --- python-pdfkit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pdfkit.spec b/python-pdfkit.spec index 354ae2e..300ca9f 100644 --- a/python-pdfkit.spec +++ b/python-pdfkit.spec @@ -4,7 +4,7 @@ Name: python-%{pypi_name} Version: 0.6.1 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Wkhtmltopdf python wrapper License: MIT @@ -68,6 +68,9 @@ find tests -type f |\ %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %changelog +* Fri Jun 04 2021 Python Maint - 0.6.1-5 +- Rebuilt for Python 3.10 + * Wed Jan 27 2021 Fedora Release Engineering - 0.6.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From 5e9b53b4c1e6b2fd35c94b71c5375c3838249cb8 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 23 Jul 2021 08:09:03 +0000 Subject: [PATCH 14/30] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-pdfkit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pdfkit.spec b/python-pdfkit.spec index 300ca9f..f138086 100644 --- a/python-pdfkit.spec +++ b/python-pdfkit.spec @@ -4,7 +4,7 @@ Name: python-%{pypi_name} Version: 0.6.1 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Wkhtmltopdf python wrapper License: MIT @@ -68,6 +68,9 @@ find tests -type f |\ %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %changelog +* Fri Jul 23 2021 Fedora Release Engineering - 0.6.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Fri Jun 04 2021 Python Maint - 0.6.1-5 - Rebuilt for Python 3.10 From 8ca38590694cd82bf1c0a56e2bfffe24ed458072 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 21 Jan 2022 14:05:51 +0000 Subject: [PATCH 15/30] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-pdfkit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pdfkit.spec b/python-pdfkit.spec index f138086..72314ff 100644 --- a/python-pdfkit.spec +++ b/python-pdfkit.spec @@ -4,7 +4,7 @@ Name: python-%{pypi_name} Version: 0.6.1 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Wkhtmltopdf python wrapper License: MIT @@ -68,6 +68,9 @@ find tests -type f |\ %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %changelog +* Fri Jan 21 2022 Fedora Release Engineering - 0.6.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Fri Jul 23 2021 Fedora Release Engineering - 0.6.1-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From 69efc634ed83e2f9c60015be437032626928b269 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Mon, 13 Jun 2022 17:13:13 +0200 Subject: [PATCH 16/30] Rebuilt for Python 3.11 --- python-pdfkit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pdfkit.spec b/python-pdfkit.spec index 72314ff..573d228 100644 --- a/python-pdfkit.spec +++ b/python-pdfkit.spec @@ -4,7 +4,7 @@ Name: python-%{pypi_name} Version: 0.6.1 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Wkhtmltopdf python wrapper License: MIT @@ -68,6 +68,9 @@ find tests -type f |\ %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %changelog +* Mon Jun 13 2022 Python Maint - 0.6.1-8 +- Rebuilt for Python 3.11 + * Fri Jan 21 2022 Fedora Release Engineering - 0.6.1-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From 842f8b5684122c414c29807942fddec65837160e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 22 Jul 2022 20:44:35 +0000 Subject: [PATCH 17/30] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-pdfkit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pdfkit.spec b/python-pdfkit.spec index 573d228..74acea3 100644 --- a/python-pdfkit.spec +++ b/python-pdfkit.spec @@ -4,7 +4,7 @@ Name: python-%{pypi_name} Version: 0.6.1 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Wkhtmltopdf python wrapper License: MIT @@ -68,6 +68,9 @@ find tests -type f |\ %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %changelog +* Fri Jul 22 2022 Fedora Release Engineering - 0.6.1-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Mon Jun 13 2022 Python Maint - 0.6.1-8 - Rebuilt for Python 3.11 From 29b42e81330b2eebc68241b95ed68d289e693045 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 20 Jan 2023 15:33:33 +0000 Subject: [PATCH 18/30] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-pdfkit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pdfkit.spec b/python-pdfkit.spec index 74acea3..4ad7bfb 100644 --- a/python-pdfkit.spec +++ b/python-pdfkit.spec @@ -4,7 +4,7 @@ Name: python-%{pypi_name} Version: 0.6.1 -Release: 9%{?dist} +Release: 10%{?dist} Summary: Wkhtmltopdf python wrapper License: MIT @@ -68,6 +68,9 @@ find tests -type f |\ %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %changelog +* Fri Jan 20 2023 Fedora Release Engineering - 0.6.1-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Fri Jul 22 2022 Fedora Release Engineering - 0.6.1-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From 1a7a02349c1f014fca55accee5d37252453354fe Mon Sep 17 00:00:00 2001 From: Python Maint Date: Tue, 13 Jun 2023 22:55:35 +0200 Subject: [PATCH 19/30] Rebuilt for Python 3.12 --- python-pdfkit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pdfkit.spec b/python-pdfkit.spec index 4ad7bfb..4089f00 100644 --- a/python-pdfkit.spec +++ b/python-pdfkit.spec @@ -4,7 +4,7 @@ Name: python-%{pypi_name} Version: 0.6.1 -Release: 10%{?dist} +Release: 11%{?dist} Summary: Wkhtmltopdf python wrapper License: MIT @@ -68,6 +68,9 @@ find tests -type f |\ %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %changelog +* Tue Jun 13 2023 Python Maint - 0.6.1-11 +- Rebuilt for Python 3.12 + * Fri Jan 20 2023 Fedora Release Engineering - 0.6.1-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From a994a1d3bd39699e6a8933acf695a6141a7604c0 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 21 Jul 2023 12:10:56 +0000 Subject: [PATCH 20/30] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-pdfkit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pdfkit.spec b/python-pdfkit.spec index 4089f00..e6dd9a1 100644 --- a/python-pdfkit.spec +++ b/python-pdfkit.spec @@ -4,7 +4,7 @@ Name: python-%{pypi_name} Version: 0.6.1 -Release: 11%{?dist} +Release: 12%{?dist} Summary: Wkhtmltopdf python wrapper License: MIT @@ -68,6 +68,9 @@ find tests -type f |\ %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %changelog +* Fri Jul 21 2023 Fedora Release Engineering - 0.6.1-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Tue Jun 13 2023 Python Maint - 0.6.1-11 - Rebuilt for Python 3.12 From a2222ee8551ff5d3fc68f3d12b96d1d65f88a361 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Mon, 22 Jan 2024 04:46:05 +0000 Subject: [PATCH 21/30] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- python-pdfkit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pdfkit.spec b/python-pdfkit.spec index e6dd9a1..d0867e9 100644 --- a/python-pdfkit.spec +++ b/python-pdfkit.spec @@ -4,7 +4,7 @@ Name: python-%{pypi_name} Version: 0.6.1 -Release: 12%{?dist} +Release: 13%{?dist} Summary: Wkhtmltopdf python wrapper License: MIT @@ -68,6 +68,9 @@ find tests -type f |\ %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %changelog +* Mon Jan 22 2024 Fedora Release Engineering - 0.6.1-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Fri Jul 21 2023 Fedora Release Engineering - 0.6.1-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From b341e7b008a26f05587a80d8bf613281cb4665ef Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 26 Jan 2024 07:58:51 +0000 Subject: [PATCH 22/30] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- python-pdfkit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pdfkit.spec b/python-pdfkit.spec index d0867e9..24faa73 100644 --- a/python-pdfkit.spec +++ b/python-pdfkit.spec @@ -4,7 +4,7 @@ Name: python-%{pypi_name} Version: 0.6.1 -Release: 13%{?dist} +Release: 14%{?dist} Summary: Wkhtmltopdf python wrapper License: MIT @@ -68,6 +68,9 @@ find tests -type f |\ %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %changelog +* Fri Jan 26 2024 Fedora Release Engineering - 0.6.1-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Mon Jan 22 2024 Fedora Release Engineering - 0.6.1-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From e934ea599c7df91833860d80cda257fe0de26ae3 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 7 Jun 2024 10:54:46 +0200 Subject: [PATCH 23/30] Rebuilt for Python 3.13 --- python-pdfkit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pdfkit.spec b/python-pdfkit.spec index 24faa73..01e450b 100644 --- a/python-pdfkit.spec +++ b/python-pdfkit.spec @@ -4,7 +4,7 @@ Name: python-%{pypi_name} Version: 0.6.1 -Release: 14%{?dist} +Release: 15%{?dist} Summary: Wkhtmltopdf python wrapper License: MIT @@ -68,6 +68,9 @@ find tests -type f |\ %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %changelog +* Fri Jun 07 2024 Python Maint - 0.6.1-15 +- Rebuilt for Python 3.13 + * Fri Jan 26 2024 Fedora Release Engineering - 0.6.1-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From a87c3cbd131f6d0f14202ddd06750af77123e5c7 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jul 2024 13:57:27 +0000 Subject: [PATCH 24/30] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- python-pdfkit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pdfkit.spec b/python-pdfkit.spec index 01e450b..f7edcac 100644 --- a/python-pdfkit.spec +++ b/python-pdfkit.spec @@ -4,7 +4,7 @@ Name: python-%{pypi_name} Version: 0.6.1 -Release: 15%{?dist} +Release: 16%{?dist} Summary: Wkhtmltopdf python wrapper License: MIT @@ -68,6 +68,9 @@ find tests -type f |\ %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %changelog +* Fri Jul 19 2024 Fedora Release Engineering - 0.6.1-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Fri Jun 07 2024 Python Maint - 0.6.1-15 - Rebuilt for Python 3.13 From 096c5c23ecc54d4ff5577eeb69d8e0468d5ffc53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 6 Jan 2025 17:44:57 +0100 Subject: [PATCH 25/30] Fix build with setuptools 74+ Don't run tests via setup.py test. Drop no longer used test dependency on pytest. --- python-pdfkit.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/python-pdfkit.spec b/python-pdfkit.spec index f7edcac..6b77578 100644 --- a/python-pdfkit.spec +++ b/python-pdfkit.spec @@ -4,7 +4,7 @@ Name: python-%{pypi_name} Version: 0.6.1 -Release: 16%{?dist} +Release: 17%{?dist} Summary: Wkhtmltopdf python wrapper License: MIT @@ -21,7 +21,6 @@ BuildArch: noarch BuildRequires: python3-setuptools BuildRequires: python3-devel BuildRequires: python3 -BuildRequires: python3-pytest BuildRequires: wkhtmltopdf Requires: wkhtmltopdf @@ -59,7 +58,8 @@ find tests -type f |\ while read a; do b=$(echo $a |\ sed -r 's/%{commit0}_//'); \ mv -v $a $b; done -%{__python3} setup.py test +cd tests +%{__python3} pdfkit-tests.py %files -n python3-%{pypi_name} %license LICENSE @@ -68,6 +68,10 @@ find tests -type f |\ %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %changelog +* Mon Jan 06 2025 Miro Hrončok - 0.6.1-17 +- Fix build with setuptools 74+ +- Fixes: rhzb#2319690 + * Fri Jul 19 2024 Fedora Release Engineering - 0.6.1-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From af99b499691babbfc3fb45047093253ea9bb1261 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 18 Jan 2025 17:07:01 +0000 Subject: [PATCH 26/30] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- python-pdfkit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pdfkit.spec b/python-pdfkit.spec index 6b77578..5b373a8 100644 --- a/python-pdfkit.spec +++ b/python-pdfkit.spec @@ -4,7 +4,7 @@ Name: python-%{pypi_name} Version: 0.6.1 -Release: 17%{?dist} +Release: 18%{?dist} Summary: Wkhtmltopdf python wrapper License: MIT @@ -68,6 +68,9 @@ cd tests %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %changelog +* Sat Jan 18 2025 Fedora Release Engineering - 0.6.1-18 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Mon Jan 06 2025 Miro Hrončok - 0.6.1-17 - Fix build with setuptools 74+ - Fixes: rhzb#2319690 From 48c68670dc8617f620557a142453b10cd6188591 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Mon, 2 Jun 2025 20:32:20 +0200 Subject: [PATCH 27/30] Rebuilt for Python 3.14 --- python-pdfkit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pdfkit.spec b/python-pdfkit.spec index 5b373a8..6cbde20 100644 --- a/python-pdfkit.spec +++ b/python-pdfkit.spec @@ -4,7 +4,7 @@ Name: python-%{pypi_name} Version: 0.6.1 -Release: 18%{?dist} +Release: 19%{?dist} Summary: Wkhtmltopdf python wrapper License: MIT @@ -68,6 +68,9 @@ cd tests %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %changelog +* Mon Jun 02 2025 Python Maint - 0.6.1-19 +- Rebuilt for Python 3.14 + * Sat Jan 18 2025 Fedora Release Engineering - 0.6.1-18 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 1a3e4c83a4f78ca7426be0f6677d479c72d55177 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 09:18:30 +0000 Subject: [PATCH 28/30] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- python-pdfkit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pdfkit.spec b/python-pdfkit.spec index 6cbde20..f219496 100644 --- a/python-pdfkit.spec +++ b/python-pdfkit.spec @@ -4,7 +4,7 @@ Name: python-%{pypi_name} Version: 0.6.1 -Release: 19%{?dist} +Release: 20%{?dist} Summary: Wkhtmltopdf python wrapper License: MIT @@ -68,6 +68,9 @@ cd tests %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %changelog +* Fri Jul 25 2025 Fedora Release Engineering - 0.6.1-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Mon Jun 02 2025 Python Maint - 0.6.1-19 - Rebuilt for Python 3.14 From 3d1b716d6b2f1cf8841256ba0dd471ec0f093b0b Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 15 Aug 2025 14:21:29 +0200 Subject: [PATCH 29/30] Rebuilt for Python 3.14.0rc2 bytecode --- python-pdfkit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pdfkit.spec b/python-pdfkit.spec index f219496..020cab8 100644 --- a/python-pdfkit.spec +++ b/python-pdfkit.spec @@ -4,7 +4,7 @@ Name: python-%{pypi_name} Version: 0.6.1 -Release: 20%{?dist} +Release: 21%{?dist} Summary: Wkhtmltopdf python wrapper License: MIT @@ -68,6 +68,9 @@ cd tests %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %changelog +* Fri Aug 15 2025 Python Maint - 0.6.1-21 +- Rebuilt for Python 3.14.0rc2 bytecode + * Fri Jul 25 2025 Fedora Release Engineering - 0.6.1-20 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From f8badc92f9c8cbcf85b55e980927d043b91420a7 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 19 Sep 2025 13:57:56 +0200 Subject: [PATCH 30/30] Rebuilt for Python 3.14.0rc3 bytecode --- python-pdfkit.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-pdfkit.spec b/python-pdfkit.spec index 020cab8..11538e6 100644 --- a/python-pdfkit.spec +++ b/python-pdfkit.spec @@ -4,7 +4,7 @@ Name: python-%{pypi_name} Version: 0.6.1 -Release: 21%{?dist} +Release: 22%{?dist} Summary: Wkhtmltopdf python wrapper License: MIT @@ -68,6 +68,9 @@ cd tests %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %changelog +* Fri Sep 19 2025 Python Maint - 0.6.1-22 +- Rebuilt for Python 3.14.0rc3 bytecode + * Fri Aug 15 2025 Python Maint - 0.6.1-21 - Rebuilt for Python 3.14.0rc2 bytecode