commit 0e1d8634c8e991c4e2ff73188c20672e43a4aa70c390c09ff4489555956ba4cf Author: Markéta Machová Date: Wed Jun 11 13:10:59 2025 +0000 - Convert to pip-based build and libalternatives OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-restview?expand=0&rev=17 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/fix-tests.patch b/fix-tests.patch new file mode 100644 index 0000000..7508573 --- /dev/null +++ b/fix-tests.patch @@ -0,0 +1,90 @@ +diff --git a/src/restview/tests.py b/src/restview/tests.py +index 71aeb77..c840cb8 100644 +--- a/src/restview/tests.py ++++ b/src/restview/tests.py +@@ -541,10 +541,9 @@ def doctest_RestViewer_rest_to_html(): + ... ''', settings={'cloak_email_addresses': True}).strip()) + ... # doctest: +ELLIPSIS,+REPORT_NDIFF + +- ++ + + +- + ... + example + + + +-
++
+

example

+ +

This is a doctest:

+@@ -570,11 +569,9 @@ def doctest_RestViewer_rest_to_html(): +

This is a reference: README.rst

+

This is an email: marius@gedmin.as

+

This is a literal block:

+-
+-        See CHANGES.rst, mkay?
+-        
++
See CHANGES.rst, mkay?
+

This is an inline literal: README.txt.

+-
++ + + + +@@ -594,10 +591,7 @@ def doctest_RestViewer_rest_to_html_css_url(): + ... ''').strip()) + ... # doctest: +ELLIPSIS,+REPORT_NDIFF + +- +- +- +- ++ + ... + ... + +@@ -606,11 +600,11 @@ def doctest_RestViewer_rest_to_html_css_url(): + + + +-
++
+ + +

Some text

+-
++ + + + +@@ -729,21 +723,18 @@ def doctest_RestViewer_rest_to_html_pypi_strict(): + ... ''').strip().replace(""", '"')) + ... # doctest: +ELLIPSIS,+REPORT_NDIFF + +- +- +- +- ++ + ... + Hello + +- +- +-
+- +- +-

Some text

+-
+- +- +- +- """ ++ """ + + + def doctest_RestViewer_rest_to_html_strict_and_error_handling(): +@@ -714,29 +692,16 @@ def doctest_RestViewer_rest_to_html_pypi + >>> viewer = RestViewer('.') + >>> viewer.stylesheets = None + >>> viewer.pypi_strict = True +- >>> print(viewer.rest_to_html(b''' ++ >>> html = viewer.rest_to_html(b''' + ... Hello + ... ----- + ... + ... `This is fine `__. + ... +- ... ''').strip().replace(""", '"')) +- ... # doctest: +ELLIPSIS,+REPORT_NDIFF +- +- +- ... ++ ... ''') ++ >>> grep('Hello', html) + Hello +-