forked from pool/python-astropy
Accepting request 818848 from home:bnavigator:branches:devel:languages:python:numeric
- Fix conftest collection error: import local source dir for tests - Remove ignore pytest deprecation fixed by pytest-doctestplus >= 0.6 - Ignore leap second expiry and dubious year warnings for reproducible builds: gh#astropy/astropy#10228 astropy-openSUSE-ignore-warnings.patch OBS-URL: https://build.opensuse.org/request/show/818848 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-astropy?expand=0&rev=28
This commit is contained in:
parent
00235161ca
commit
488994a6b4
23
astropy-openSUSE-ignore-warnings.patch
Normal file
23
astropy-openSUSE-ignore-warnings.patch
Normal file
@ -0,0 +1,23 @@
|
||||
From: Benjamin Greiner <code@bnavigator.de>
|
||||
Date: 2020-07-05 13:43:14 +0200
|
||||
Subject: ignore test warnings for reproducible builds
|
||||
References: gh#astropy/astropy#10228
|
||||
Upstream: discussed on github, but openSUSE specific
|
||||
|
||||
Ignore leap-second and dubious year warnings for reproducible builds.
|
||||
|
||||
Patching setup.cfg instead of -W option for python/pytest call
|
||||
because regular expressions do not work for the latter.
|
||||
|
||||
--- astropy-4.0.1.post1.orig/setup.cfg 2020-04-02 03:18:04.000000000 +0200
|
||||
+++ astropy-4.0.1.post1/setup.cfg 2020-07-05 13:43:14.132689750 +0200
|
||||
@@ -120,6 +120,9 @@
|
||||
ignore:PY_SSIZE_T_CLEAN will be required for '#' formats
|
||||
ignore:::astropy.tests.plugins.display
|
||||
ignore:::astropy.tests.disable_internet
|
||||
+ ignore:the imp module is deprecated:DeprecationWarning
|
||||
+ ignore:leap-second file is expired:astropy.utils.iers.iers.IERSStaleWarning
|
||||
+ ignore:ERFA function.*dubious year:astropy.utils.exceptions.ErfaWarning
|
||||
|
||||
[bdist_wininst]
|
||||
bitmap = static/wininst_background.bmp
|
@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Jul 5 12:24:49 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
|
||||
|
||||
- Fix conftest collection error: import local source dir for tests
|
||||
- Remove ignore pytest deprecation fixed by pytest-doctestplus >= 0.6
|
||||
- Ignore leap second expiry and dubious year warnings for
|
||||
reproducible builds: gh#astropy/astropy#10228
|
||||
astropy-openSUSE-ignore-warnings.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 3 07:42:45 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
|
@ -34,6 +34,7 @@ Summary: Community-developed python astronomy tools
|
||||
License: BSD-3-Clause
|
||||
URL: https://astropy.org
|
||||
Source: https://files.pythonhosted.org/packages/source/a/astropy/astropy-%{version}.tar.gz
|
||||
Patch0: astropy-openSUSE-ignore-warnings.patch
|
||||
# Mark wcs headers as false positives for devel-file-in-non-devel-package
|
||||
# These are used by the python files so they must be available.
|
||||
Source100: python-astropy-rpmlintrc
|
||||
@ -95,7 +96,7 @@ BuildRequires: %{python_module mpmath}
|
||||
BuildRequires: %{python_module objgraph}
|
||||
BuildRequires: %{python_module pytest >= 3.1}
|
||||
BuildRequires: %{python_module pytest-astropy}
|
||||
BuildRequires: %{python_module pytest-doctestplus}
|
||||
BuildRequires: %{python_module pytest-doctestplus >= 0.6}
|
||||
BuildRequires: %{python_module pytest-mpl}
|
||||
# /SECTION
|
||||
%endif
|
||||
@ -109,6 +110,7 @@ managing them.
|
||||
|
||||
%prep
|
||||
%setup -q -n astropy-%{version}
|
||||
%patch0 -p1
|
||||
|
||||
# Make sure bundled libs are not used
|
||||
rm -rf cextern/expat
|
||||
@ -153,17 +155,16 @@ $python -O -m compileall -d %{$python_sitearch} %{buildroot}%{$python_sitearch}/
|
||||
|
||||
%check
|
||||
%if %{with test}
|
||||
export PYTHONDONTWRITEBYTECODE=1
|
||||
# http://docs.astropy.org/en/latest/development/testguide.html#running-tests
|
||||
%python_exec setup.py build_ext --inplace --offline
|
||||
# import from local source dir for proper conftest.py collection
|
||||
# and using above inplace built extensions
|
||||
export PYTHONPATH=$(pwd)
|
||||
%ifarch aarch64
|
||||
# doctest failure because of precision errors
|
||||
%define skippytest -k 'not bayesian_info_criterion_lsq'
|
||||
%endif
|
||||
%{pytest_arch -W "ignore:the imp module is deprecated:DeprecationWarning" \
|
||||
-W "ignore:Unknown pytest.mark.openfiles_ignore:pytest.PytestUnknownMarkWarning" \
|
||||
--ignore "docs/whatsnew" %{?skippytest}
|
||||
}
|
||||
%pytest_arch --ignore 'docs/whatsnew' %{?skippytest}
|
||||
%endif
|
||||
|
||||
%if !%{with test}
|
||||
|
Loading…
Reference in New Issue
Block a user