Accepting request 755925 from home:bnavigator

another sr superseding to fix indentation on the specfile patch line

OBS-URL: https://build.opensuse.org/request/show/755925
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-astropy-header?expand=0&rev=1
This commit is contained in:
Tomáš Chvátal
2019-12-13 08:52:55 +00:00
committed by Git OBS Bridge
commit c9a9f1b7f1
7 changed files with 156 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
_service Normal file
View File

@@ -0,0 +1,3 @@
<services>
<service name="download_files" mode="disabled" />
</services>

View File

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

View File

@@ -0,0 +1,44 @@
From fc763d07d7f6c81aa4eec58daddcb89ce8894a15 Mon Sep 17 00:00:00 2001
From: "P. L. Lim" <2090236+pllim@users.noreply.github.com>
Date: Fri, 25 Oct 2019 09:29:47 -0400
Subject: [PATCH 1/2] TST: See why test_modify_in_conftest failed
---
tests/test_display.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/test_display.py b/tests/test_display.py
index 351f988..d9636f5 100644
--- a/tests/test_display.py
+++ b/tests/test_display.py
@@ -186,6 +186,7 @@ def pytest_configure(config):
""")
testdir.inline_run()
out, err = capsys.readouterr()
+ assert err == ''
lines = extract_package_version_lines(out)
assert len(lines) == 6
assert lines[0].startswith('Numpy: ')
From 0311f70dff87370a1f0e78546dc01fa354ecadd0 Mon Sep 17 00:00:00 2001
From: "P. L. Lim" <2090236+pllim@users.noreply.github.com>
Date: Fri, 25 Oct 2019 09:42:16 -0400
Subject: [PATCH 2/2] Fix bad import
---
tests/test_display.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/test_display.py b/tests/test_display.py
index d9636f5..0525a35 100644
--- a/tests/test_display.py
+++ b/tests/test_display.py
@@ -176,7 +176,7 @@ def pytest_configure(config):
def test_modify_in_conftest(testdir, capsys):
testdir.makeconftest("""
- from pytest_astropy.display import PYTEST_HEADER_MODULES, TESTED_VERSIONS
+ from pytest_astropy_header.display import PYTEST_HEADER_MODULES, TESTED_VERSIONS
def pytest_configure(config):
config.option.astropy_header = True

View File

@@ -0,0 +1,10 @@
-------------------------------------------------------------------
Wed Dec 11 18:49:53 UTC 2019 - code@bnavigator.de
- pytest-astropy-header-pr2.patch: fix import error due to
reversed dependency (upstream PR#2 fixing issue#6)
-------------------------------------------------------------------
Wed Dec 11 11:49:40 UTC 2019 - Benjamin Greiner <code@bnavigator.de>
- initial specfile, version 0.1

View File

@@ -0,0 +1,72 @@
#
# spec file for package python-pytest-astropy-header
#
# Copyright (c) 2019 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/
#
%define skip_python2 1
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pytest-astropy-header
Version: 0.1
Release: 0
Summary: Pytest plugin to add diagnostic information to the header of the test output
License: BSD-3-Clause
Group: Productivity/Scientific/Astronomy
URL: https://github.com/astropy/pytest-astropy-header
Source: https://files.pythonhosted.org/packages/source/p/pytest-astropy-header/pytest-astropy-header-%{version}.tar.gz
Patch0: pytest-astropy-header-pr2.patch
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module pytest >= 2.8}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-pytest >= 2.8
# SECTION test requirements
BuildRequires: %{python_module astropy >= 2.0}
BuildRequires: %{python_module codecov}
BuildRequires: %{python_module coverage}
BuildRequires: %{python_module numpy-devel}
BuildRequires: %{python_module pytest-cov}
# /SECTION
%python_subpackages
%description
This plugin package provides a way to include information about the system,
Python installation, and select dependencies in the header of the output when
running pytest. It can be used with packages that are not affiliated with the
Astropy project, but is optimized for use with astropy-related projects.
%prep
%setup -q -n pytest-astropy-header-%{version}
%patch0 -p1
%build
export CFLAGS="%{optflags}"
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%pytest
%files %{python_files}
%doc CHANGES.rst README.rst
%license LICENSE.rst
%{python_sitelib}/pytest_astropy_header
%{python_sitelib}/pytest_astropy_header-%{version}-py*.egg-info
%changelog