From cba2b56603bbd2e731f675d36097e428cd061d1722a03f2fe81cee0a66c8d255 Mon Sep 17 00:00:00 2001 From: Daniel Garcia Date: Thu, 3 Oct 2024 07:48:41 +0000 Subject: [PATCH] - Make seedir dependency optional for SLFO OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-sybil?expand=0&rev=42 --- .gitattributes | 23 +++++ .gitignore | 1 + _multibuild | 3 + python-sybil.changes | 216 +++++++++++++++++++++++++++++++++++++++++++ python-sybil.spec | 99 ++++++++++++++++++++ sybil-6.1.1.tar.gz | 3 + 6 files changed, 345 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _multibuild create mode 100644 python-sybil.changes create mode 100644 python-sybil.spec create mode 100644 sybil-6.1.1.tar.gz 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/_multibuild b/_multibuild new file mode 100644 index 0000000..fcc7b97 --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + test + diff --git a/python-sybil.changes b/python-sybil.changes new file mode 100644 index 0000000..95d1bd9 --- /dev/null +++ b/python-sybil.changes @@ -0,0 +1,216 @@ +------------------------------------------------------------------- +Thu Oct 3 07:46:17 UTC 2024 - Daniel Garcia + +- Make seedir dependency optional for SLFO + +------------------------------------------------------------------- +Thu Jun 13 15:36:08 UTC 2024 - Dirk Müller + +- update to 6.1.1: + * Fix lexing of indented blocks where embedded blank lines + would be erroneously removed. + +------------------------------------------------------------------- +Mon May 13 04:09:28 UTC 2024 - Steve Kowalik + +- Update to 6.1.0: + * Add support for lexing nested fenced codeblocks in markdown. + * Add support for tilde-delimited codeblocks in markdown. + * Fix bug with the end offset of codeblocks in markdown. + * Support pytest 8 and above, due to yet another breaking change in an API + Sybil relies on. + * Remove use of deprecated py.path.local. + * Fix lexing of ReST directives and directives-in-comments where the + directives were not separated by at least one newline. + * Official support for Python 3.12 with Python 3.7 now being the minimum + supported version. + * sybil.parsers.rest.lexers.DirectiveLexer and + sybil.parsers.myst.lexers.DirectiveLexer directives now have their + options extracted as part of the lexing process. + * Added support for MyST single-line html-style comment directives. + * Fixed parsing of MyST directive options with no leading whitespace. + * Fixed parsing of Markdown and MyST fenced codeblocks at the end of + documents with no trailing newline. + * Rework document evaluators to be more flexible and structured. + * :ref:`skip ` has been reworked to check validity of operations + and allow a reason to be provided for an unconditional skip so it can be + highlighted as a skipped test in test runner output. The skip parsers + are also now lexer-based. + * Make Region.evaluator optional, removing the need for the separate + LexedRegion class. + * Fix bug in traceback trimming on the latest release of pytest. + * Fixed bug in the repr of LexedRegion instances where a lexeme was None. + * Fixed lexing of ReST directives, such as :rst:dir:`code-block`, where they + occurred at the end of a docstring. + * Ensure the sybil.Document.namespace in which doctests are + evaluated always has a __name__. This is required by an implementation + detail of typing.runtime_checkable. + * Fix a bug that prevent r-prefixed docstrings from being correctly parsed + from .py files. + * The sybil.Document.namespace can now be cleared in both ReST and MyST. + * Support for Python 3.6 has been dropped. + * Support for pytest versions earlier than 7.1 has been dropped. + * Switch :func:`sybil.parsers.myst.SkipParser` to use the correct comment + character. + * Warn about ReST and MyST doctest parsers and overlapping blocks. + * Restructure to support lexing source languages such as ReST and MyST + while testing examples in target languages such as Python, doctest and bash. + * Add support for MyST examples. +- Drop patch pytest74.patch, included upstream. +- Sprinkle in multibuild to avoid a cycle. + +------------------------------------------------------------------- +Tue Jan 16 15:22:42 UTC 2024 - Markéta Machová + +- Drop unneeded setuptools-git dependency + +------------------------------------------------------------------- +Tue Jul 25 12:42:51 UTC 2023 - Markéta Machová + +- Update to 3.0.1 + * Continue with the ever shifting sands of pytest APIs, this time + appeasing warnings from pytest 7 that when fixed break compatibility + with pytest 6. +- Drop python-sybil-fix-ordering.diff +- Add pytest74.patch to support pytest 7.4 + +------------------------------------------------------------------- +Tue Jun 13 11:23:08 UTC 2023 - Dirk Müller + +- tag sle15 for new python stack + +------------------------------------------------------------------- +Thu Jun 9 11:23:04 UTC 2022 - Andreas Schneider + +- Add missing BR python-dataclasses for openSUSE Leap + +------------------------------------------------------------------- +Wed Feb 16 11:44:28 UTC 2022 - Sasi Olin + +- Add python-sybil-fix-ordering.diff fixing issue with tests + failing on different filesystem setups. + +------------------------------------------------------------------- +Mon Dec 13 04:11:03 UTC 2021 - Steve Kowalik + +- Update to 3.0.0: + * Require pytest 6.2.0. + * Drop Python 2 support. + * Add support for Python 3.10 + * Remove the encoding parameter to + :class:`~sybil.parsers.doctest.DocTestParser` as it is no longer used. + * :class:`~sybil.parsers.codeblock.CodeBlockParser` has been renamed to + :class:`~sybil.parsers.codeblock.PythonCodeBlockParser`, see the + :ref:`codeblock-parser` documentation for details. + * Support has been added to check examples in Python source code in + addition to documentation source files. + * :attr:`~sybil.parsers.doctest.FIX_BYTE_UNICODE_REPR` has been removed + as it should no longer be needed. + +------------------------------------------------------------------- +Mon Feb 22 19:14:00 UTC 2021 - Ben Greiner + +- Update to 2.0.1 + * Make :class:`~sybil.parsers.doctest.DocTestParser` more + permissive with respect to tabs in documents. Tabs that aren't + in the doctest block not longer cause parsing of the document to + fail. +- Release 2.0.0 + * Drop support for nose. + * Handle encoded data returned by doctest execution on Python 2. + +------------------------------------------------------------------- +Thu Aug 27 15:29:02 UTC 2020 - Marketa Calabkova + +- update to 1.4.0 + * Support pytest 6 + * Have sybil support nested directories of source files + * Support a sequence of patterns rather than just one. + +------------------------------------------------------------------- +Thu Apr 2 07:26:04 UTC 2020 - pgajdos@suse.com + +- version update to 1.3.0 + * Treat all documentation source files as being ``utf-8`` encoded. This can be overriden + by passing an encoding when instantiating a :class:`~sybil.Sybil`. + +------------------------------------------------------------------- +Tue Mar 17 10:15:26 UTC 2020 - pgajdos@suse.com + +- version update to 1.2.2 + - Improvements to :attr:`~sybil.parsers.doctest.FIX_BYTE_UNICODE_REPR` + for multiple strings on a single line. + - Better handling of files with Windows line endings on Linux under Python 2. + - Fixes for pytest 3.1.0. + +------------------------------------------------------------------- +Fri May 3 11:20:28 UTC 2019 - pgajdos@suse.com + +- version update to 1.2.0 + * Only compile code in :ref:`codeblocks ` at evaluation time, + giving :ref:`skip ` a chance to skip code blocks that won't + compile on a particular version of Python. + * Add warning about the limitations of + :attr:`~sybil.parsers.doctest.FIX_BYTE_UNICODE_REPR`. + * Support explicit filenames to include and patterns to exclude + when instantiating a :class:`~sybil.Sybil`. + * Add the :ref:`skip ` parser. +- deleted patches + - sybil-pytest4.patch (upstreamed) + +------------------------------------------------------------------- +Tue Mar 26 22:38:48 UTC 2019 - John Vandenberg + +- Remove irrelevant and invalid runtime dependencies +- Set pytest as a Recommends +- Remove unnecessary build dependencies +- Simplify %check routine + +------------------------------------------------------------------- +Wed Nov 21 13:01:18 UTC 2018 - Tomáš Chvátal + +- Add patch to work with new pytest: + * sybil-pytest4.patch + +------------------------------------------------------------------- +Wed Aug 29 11:07:06 UTC 2018 - tchvatal@suse.com + +- Raise pytest requirement to match up what is in setup.py + +------------------------------------------------------------------- +Sat Aug 11 09:15:40 UTC 2018 - tchvatal@suse.com + +- Version update to 1.0.9: + * Support pytest-3.7 + +------------------------------------------------------------------- +Sun Jul 29 12:31:09 UTC 2018 - jengelh@inai.de + +- Do not let the description assume any specific use context. + +------------------------------------------------------------------- +Thu May 24 17:49:50 UTC 2018 - toddrme2178@gmail.com + +- Update 1.0.8 + * Changes only to unit tests to support fixes in the latest release of pytest. +- Update 1.0.7 + * Literal tabs may no longer be included in text that is parsed by the DocTestParser. Previously, tabs were expanded which could unpleasant problems. +- spec file cleanups + +------------------------------------------------------------------- +Fri Jan 5 09:48:15 UTC 2018 - alarrosa@suse.com + +- Update to 1.0.6 + * Fix compatibility with pytest 3.3+. + +------------------------------------------------------------------- +Mon Oct 9 15:03:03 UTC 2017 - alarrosa@suse.com + +- Fixed %check section and add python-virtualenv to the build requirements. +- Add a longer description to the package. + +------------------------------------------------------------------- +Wed Aug 23 13:40:51 UTC 2017 - t.gruner@katodev.de + +- Initial release 1.0.5 + diff --git a/python-sybil.spec b/python-sybil.spec new file mode 100644 index 0000000..31f0e41 --- /dev/null +++ b/python-sybil.spec @@ -0,0 +1,99 @@ +# +# spec file for package python-sybil +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" +%define psuffix -test +%bcond_without test +%else +%define psuffix %{nil} +%bcond_with test +%endif +%{?sle15_python_module_pythons} +Name: python-sybil%{psuffix} +Version: 6.1.1 +Release: 0 +Summary: Automated testing of examples in documentation +License: MIT +URL: https://github.com/simplistix/sybil +Source: https://github.com/simplistix/sybil/archive/refs/tags/%{version}.tar.gz#/sybil-%{version}.tar.gz +BuildRequires: %{python_module base >= 3.7} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +%if %{with test} +BuildRequires: %{python_module PyYAML} +BuildRequires: %{python_module pytest >= 7.1} +BuildRequires: %{python_module sybil = %{version}} +BuildRequires: %{python_module testfixtures} +%if 0%{?sle_version} && 0%{?sle_version} <= 150400 +BuildRequires: %{python_module dataclasses} +%endif +%if 0%{suse_version} > 1600 +BuildRequires: %{python_module seedir} +%endif +%endif +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Recommends: python-pytest +BuildArch: noarch +%python_subpackages + +%description +python-sybil provides a way to test examples in one's documentation by parsing +them from the documentation source and evaluating the parsed examples as part +of the normal test run. Integration is provided for the main Python test runners. + +%prep +%autosetup -p1 -n sybil-%{version} +sed -i '/pytest-cov/ d' setup.py + +%if 0%{suse_version} <= 1600 +# Remove seedir dependency for SLFO +sed -i '/import seedir/d' tests/helpers.py +%endif + +%build +%pyproject_wheel + +%if !%{with test} +%install +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} +%endif + +%check +%if %{with test} + +%if 0%{suse_version} <= 1600 +# Remove seedir build dependency +test_flags="--ignore docs/patterns.rst" +%endif + +%pytest $test_flags +%endif + +%if !%{with test} +%files %{python_files} +%doc README.rst docs/changes.rst +%license docs/license.rst +%{python_sitelib}/sybil +%{python_sitelib}/sybil-%{version}.dist-info +%endif + +%changelog diff --git a/sybil-6.1.1.tar.gz b/sybil-6.1.1.tar.gz new file mode 100644 index 0000000..7bf28cb --- /dev/null +++ b/sybil-6.1.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b31713d16d5187ff461f51ea93d4efdc3a90c79ad5871f304b430f11078e5e83 +size 71447