14
0

Accepting request 827437 from home:jayvdb:py-submit

Saner doctest runner

OBS-URL: https://build.opensuse.org/request/show/827437
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-xdoctest?expand=0&rev=1
This commit is contained in:
Tomáš Chvátal
2020-08-18 06:49:56 +00:00
committed by Git OBS Bridge
commit 96bb6c0909
5 changed files with 112 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

9
python-xdoctest.changes Normal file
View File

@@ -0,0 +1,9 @@
-------------------------------------------------------------------
Sun Aug 16 15:42:14 UTC 2020 - John Vandenberg <jayvdb@gmail.com>
- Update to v0.13.0
-------------------------------------------------------------------
Fri Sep 6 05:52:32 PM UTC 2019 - John Vandenberg <jayvdb@gmail.com>
- Initial spec for v0.10.0

76
python-xdoctest.spec Normal file
View File

@@ -0,0 +1,76 @@
#
# spec file for package python-xdoctest
#
# Copyright (c) 2020 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/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-xdoctest
Version: 0.13.0
Release: 0
Summary: Enhanced Python builtin doctest module
License: Apache-2.0
Group: Development/Languages/Python
URL: https://github.com/Erotemic/xdoctest
Source: https://github.com/Erotemic/xdoctest/archive/0.10.0.tar.gz#/xdoctest-%{version}.tar.gz
BuildRequires: %{python_module pygments}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Recommends: python-pygments
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
%python_subpackages
%description
A rewrite of the builtin doctest module with a pytest plugin.
%prep
%setup -q -n xdoctest-%{version}
sed -i '1{/^#!/d}' xdoctest/__main__.py
sed -i 's/--ignore-glob=setup.py//' pytest.ini
%build
%python_build
%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/xdoctest
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%post
%python_install_alternative xdoctest
%postun
%python_uninstall_alternative xdoctest
%check
mkdir ~/bin
export PATH=$PATH:~/bin
export PYTHONDONTWRITEBYTECODE=1
# Python 2 on openSUSE 15.x gets confused if buildroot installed copy is in PYTHONPATH
%{python_expand cp -p %{buildroot}%{_bindir}/xdoctest-%{$python_bin_suffix} ~/bin/xdoctest
PYTHONPATH=. $python -m pytest -rs
}
%files %{python_files}
%doc README.rst
%license LICENSE
%python_alternative %{_bindir}/xdoctest
%{python_sitelib}/*
%changelog

3
xdoctest-0.13.0.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4f113a430076561a9d7f31af65b5d5acda62ee06b05cb6894264cb9efb8196ac
size 611239