- Make seedir dependency optional for SLFO

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-sybil?expand=0&rev=42
This commit is contained in:
Daniel Garcia 2024-10-03 07:48:41 +00:00 committed by Git OBS Bridge
commit cba2b56603
6 changed files with 345 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -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

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

3
_multibuild Normal file
View File

@ -0,0 +1,3 @@
<multibuild>
<package>test</package>
</multibuild>

216
python-sybil.changes Normal file
View File

@ -0,0 +1,216 @@
-------------------------------------------------------------------
Thu Oct 3 07:46:17 UTC 2024 - Daniel Garcia <daniel.garcia@suse.com>
- Make seedir dependency optional for SLFO
-------------------------------------------------------------------
Thu Jun 13 15:36:08 UTC 2024 - Dirk Müller <dmueller@suse.com>
- 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 <steven.kowalik@suse.com>
- 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 <skip-parser>` 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á <mmachova@suse.com>
- Drop unneeded setuptools-git dependency
-------------------------------------------------------------------
Tue Jul 25 12:42:51 UTC 2023 - Markéta Machová <mmachova@suse.com>
- 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 <dmueller@suse.com>
- tag sle15 for new python stack
-------------------------------------------------------------------
Thu Jun 9 11:23:04 UTC 2022 - Andreas Schneider <asn@cryptomilk.org>
- Add missing BR python-dataclasses for openSUSE Leap
-------------------------------------------------------------------
Wed Feb 16 11:44:28 UTC 2022 - Sasi Olin <hel@lcp.world>
- 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 <steven.kowalik@suse.com>
- 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 <code@bnavigator.de>
- 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 <mcalabkova@suse.com>
- 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 <codeblock-parser>` at evaluation time,
giving :ref:`skip <skip-parser>` 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 <skip-parser>` parser.
- deleted patches
- sybil-pytest4.patch (upstreamed)
-------------------------------------------------------------------
Tue Mar 26 22:38:48 UTC 2019 - John Vandenberg <jayvdb@gmail.com>
- 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 <tchvatal@suse.com>
- 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

99
python-sybil.spec Normal file
View File

@ -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

BIN
sybil-6.1.1.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.