From c9a9f1b7f12d880d44bbf96e8f6f8564858fdaf025af578e18210e70a43af8aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Fri, 13 Dec 2019 08:52:55 +0000 Subject: [PATCH] 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 --- .gitattributes | 23 +++++++++ .gitignore | 1 + _service | 3 ++ pytest-astropy-header-0.1.tar.gz | 3 ++ pytest-astropy-header-pr2.patch | 44 +++++++++++++++++ python-pytest-astropy-header.changes | 10 ++++ python-pytest-astropy-header.spec | 72 ++++++++++++++++++++++++++++ 7 files changed, 156 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _service create mode 100644 pytest-astropy-header-0.1.tar.gz create mode 100644 pytest-astropy-header-pr2.patch create mode 100644 python-pytest-astropy-header.changes create mode 100644 python-pytest-astropy-header.spec 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/_service b/_service new file mode 100644 index 0000000..413b85c --- /dev/null +++ b/_service @@ -0,0 +1,3 @@ + + + diff --git a/pytest-astropy-header-0.1.tar.gz b/pytest-astropy-header-0.1.tar.gz new file mode 100644 index 0000000..da7f786 --- /dev/null +++ b/pytest-astropy-header-0.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a75eb13a0616ca4ab1849530a11d535e0ec433e1ac6dd9111e487f54b64d92fd +size 8553 diff --git a/pytest-astropy-header-pr2.patch b/pytest-astropy-header-pr2.patch new file mode 100644 index 0000000..7239c9e --- /dev/null +++ b/pytest-astropy-header-pr2.patch @@ -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 diff --git a/python-pytest-astropy-header.changes b/python-pytest-astropy-header.changes new file mode 100644 index 0000000..62d19d5 --- /dev/null +++ b/python-pytest-astropy-header.changes @@ -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 + +- initial specfile, version 0.1 diff --git a/python-pytest-astropy-header.spec b/python-pytest-astropy-header.spec new file mode 100644 index 0000000..60a6b16 --- /dev/null +++ b/python-pytest-astropy-header.spec @@ -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