From 87526aeb5da7e043bde83c2588a90b8b521635018bd79c9eda2a5384e47444da Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Wed, 7 May 2025 07:01:36 +0000 Subject: [PATCH] - Switch to pyproject macros. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-astropy-header?expand=0&rev=16 --- .gitattributes | 23 ++++++++ .gitignore | 1 + _multibuild | 3 + pytest-astropy-header-0.2.2.tar.gz | 3 + python-pytest-astropy-header.changes | 76 ++++++++++++++++++++++++ python-pytest-astropy-header.spec | 86 ++++++++++++++++++++++++++++ 6 files changed, 192 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _multibuild create mode 100644 pytest-astropy-header-0.2.2.tar.gz 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/_multibuild b/_multibuild new file mode 100644 index 0000000..fcc7b97 --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + test + diff --git a/pytest-astropy-header-0.2.2.tar.gz b/pytest-astropy-header-0.2.2.tar.gz new file mode 100644 index 0000000..c13ed55 --- /dev/null +++ b/pytest-astropy-header-0.2.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:77891101c94b75a8ca305453b879b318ab6001b370df02be2c0b6d1bb322db10 +size 9914 diff --git a/python-pytest-astropy-header.changes b/python-pytest-astropy-header.changes new file mode 100644 index 0000000..2f4cd6f --- /dev/null +++ b/python-pytest-astropy-header.changes @@ -0,0 +1,76 @@ +------------------------------------------------------------------- +Wed May 7 06:47:23 UTC 2025 - Steve Kowalik + +- Switch to pyproject macros. + +------------------------------------------------------------------- +Thu Oct 27 17:23:49 UTC 2022 - Ben Greiner + +- Update to v0.2.2 + * The plugin is now aware of the ``run_slow`` and ``run_hugemem`` + options introduced in ``pytest-astropy`` version 0.10.0. [#48] + +------------------------------------------------------------------- +Sun Mar 13 08:25:07 UTC 2022 - Ben Greiner + +- Update to v0.2.1 + * Import astropy so astropy can use this package by @pllim in #43 + +------------------------------------------------------------------- +Tue Dec 28 17:37:12 UTC 2021 - Ben Greiner + +- Update to v0.2 + * Suppressed PytestAssertRewriteWarning. [#4] + * Do not show astropy-helpers version in packages that don't use + it. [#16] + * Removed compatibility code for astropy < 4.0, and for + astropy-helpers. [#32] + * Removed astropy dependency. [#19, #34] + * Bumped minimum supported Python version to 3.7 and various + infrastructure updates. [#23, #39] +- Drop patches + * pytest-astropy-header-pr16-no-helper-version.patch + * pytest-astropy-header-pr29-nohelpers.patch + +------------------------------------------------------------------- +Wed Dec 9 09:49:05 UTC 2020 - Benjamin Greiner + +- Fix test failures + * requires astropy >= 4 which removed astropy-helpers + * gh#/astropy/pytest-astropy-header#16 + pytest-astropy-header-pr16-no-helper-version.patch + * gh#/astropy/pytest-astropy-header#29 + pytest-astropy-header-pr29-nohelpers.patch + +------------------------------------------------------------------- +Thu Aug 16 12:25:00 UTC 2020 - Benjamin Greiner + +- Fix test failures by testing the source directory in multibuild + +------------------------------------------------------------------- +Fri Jan 10 08:26:04 UTC 2020 - Tomáš Chvátal + +- Switch to multibuild to avoid cycles +- Reduce the tests dependencies to match reality + +------------------------------------------------------------------- +Wed Dec 19 16:06:15 UTC 2019 - Benjamin Greiner + +- update to version 0.1.2 + - Handle the case where the astropy version is 'unknown'. [#11] + - Fix declaration of test dependencies. [#9] +- changes on version 0.1.1: + - Make plugin not crash if astropy is not installed. [#1] +- remove obsolete pytest-astropy-header-pr2.patch +- require astropy >= 3.0 because astropy-helpers is not found + +------------------------------------------------------------------- +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..15b98e8 --- /dev/null +++ b/python-pytest-astropy-header.spec @@ -0,0 +1,86 @@ +# +# spec file for package python-pytest-astropy-header +# +# Copyright (c) 2025 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 +%define modname pytest-astropy-header + +Name: python-%{modname}%{psuffix} +Version: 0.2.2 +Release: 0 +Summary: Pytest plugin to add diagnostic information to the header of the test output +License: BSD-3-Clause +URL: https://github.com/astropy/pytest-astropy-header +Source: https://files.pythonhosted.org/packages/source/p/%{modname}/%{modname}-%{version}.tar.gz +BuildRequires: %{python_module base >= 3.7} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools >= 30.3.0} +BuildRequires: %{python_module setuptools_scm} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-pytest >= 4.6 +%if %{with test} +BuildRequires: %{python_module astropy >= 4.0} +BuildRequires: %{python_module numpy} +BuildRequires: %{python_module pytest >= 4.6} +%endif +Provides: python-pytest_astropy_header = %{version}-%{release} +BuildArch: noarch +%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 +%autosetup -p1 -n %{modname}-%{version} + +%build +%pyproject_wheel + +%install +%if !%{with test} +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} +%endif + +%check +%if %{with test} +# multibuild: nothing has been installed, test the source directory +export PYTHONPATH=$(pwd) +%pytest +%endif + +%if !%{with test} +%files %{python_files} +%doc CHANGES.rst README.rst +%license LICENSE.rst +%{python_sitelib}/pytest_astropy_header +%{python_sitelib}/pytest_astropy_header-%{version}.dist-info +%endif + +%changelog