forked from pool/python-astropy
- Switch to multibuild to avoid cycle with python-asdf package
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-astropy?expand=0&rev=26
This commit is contained in:
parent
c80aed9cfa
commit
00235161ca
3
_multibuild
Normal file
3
_multibuild
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<multibuild>
|
||||||
|
<package>test</package>
|
||||||
|
</multibuild>
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jun 3 07:42:45 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
||||||
|
|
||||||
|
- Switch to multibuild to avoid cycle with python-asdf package
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed May 27 09:36:06 UTC 2020 - Petr Gajdos <pgajdos@suse.com>
|
Wed May 27 09:36:06 UTC 2020 - Petr Gajdos <pgajdos@suse.com>
|
||||||
|
|
||||||
|
@ -17,6 +17,14 @@
|
|||||||
|
|
||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
|
%global flavor @BUILD_FLAVOR@%{nil}
|
||||||
|
%if "%{flavor}" == "test"
|
||||||
|
%define psuffix -test
|
||||||
|
%bcond_without test
|
||||||
|
%else
|
||||||
|
%define psuffix %{nil}
|
||||||
|
%bcond_with test
|
||||||
|
%endif
|
||||||
%define binaries fitsdiff fitsheader fitscheck fitsinfo fits2bitmap samp_hub showtable volint wcslint
|
%define binaries fitsdiff fitsheader fitscheck fitsinfo fits2bitmap samp_hub showtable volint wcslint
|
||||||
%define skip_python2 1
|
%define skip_python2 1
|
||||||
Name: python-astropy
|
Name: python-astropy
|
||||||
@ -66,6 +74,7 @@ Recommends: python-pandas
|
|||||||
Recommends: python-scikit-image
|
Recommends: python-scikit-image
|
||||||
Recommends: python-scipy >= 0.18
|
Recommends: python-scipy >= 0.18
|
||||||
Conflicts: perl-Data-ShowTable
|
Conflicts: perl-Data-ShowTable
|
||||||
|
%if %{with test}
|
||||||
# SECTION Optional requirements
|
# SECTION Optional requirements
|
||||||
BuildRequires: %{python_module Bottleneck}
|
BuildRequires: %{python_module Bottleneck}
|
||||||
BuildRequires: %{python_module Jinja2}
|
BuildRequires: %{python_module Jinja2}
|
||||||
@ -89,6 +98,7 @@ BuildRequires: %{python_module pytest-astropy}
|
|||||||
BuildRequires: %{python_module pytest-doctestplus}
|
BuildRequires: %{python_module pytest-doctestplus}
|
||||||
BuildRequires: %{python_module pytest-mpl}
|
BuildRequires: %{python_module pytest-mpl}
|
||||||
# /SECTION
|
# /SECTION
|
||||||
|
%endif
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -110,9 +120,12 @@ echo "[build]" >> setup.cfg
|
|||||||
echo "use_system_libraries=1" >> setup.cfg
|
echo "use_system_libraries=1" >> setup.cfg
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
%if !%{with test}
|
||||||
%python_build --use-system-libraries --offline
|
%python_build --use-system-libraries --offline
|
||||||
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
%if !%{with test}
|
||||||
%python_install --use-system-libraries --offline
|
%python_install --use-system-libraries --offline
|
||||||
for b in %{binaries}; do
|
for b in %{binaries}; do
|
||||||
%python_clone -a %{buildroot}%{_bindir}/$b
|
%python_clone -a %{buildroot}%{_bindir}/$b
|
||||||
@ -136,8 +149,10 @@ $python -m compileall -d %{$python_sitearch} %{buildroot}%{$python_sitearch}/
|
|||||||
$python -O -m compileall -d %{$python_sitearch} %{buildroot}%{$python_sitearch}/astropy/wcs/tests/
|
$python -O -m compileall -d %{$python_sitearch} %{buildroot}%{$python_sitearch}/astropy/wcs/tests/
|
||||||
%fdupes %{buildroot}%{$python_sitearch}
|
%fdupes %{buildroot}%{$python_sitearch}
|
||||||
}
|
}
|
||||||
|
%endif
|
||||||
|
|
||||||
%check
|
%check
|
||||||
|
%if %{with test}
|
||||||
export PYTHONDONTWRITEBYTECODE=1
|
export PYTHONDONTWRITEBYTECODE=1
|
||||||
# http://docs.astropy.org/en/latest/development/testguide.html#running-tests
|
# http://docs.astropy.org/en/latest/development/testguide.html#running-tests
|
||||||
%python_exec setup.py build_ext --inplace --offline
|
%python_exec setup.py build_ext --inplace --offline
|
||||||
@ -149,7 +164,9 @@ export PYTHONDONTWRITEBYTECODE=1
|
|||||||
-W "ignore:Unknown pytest.mark.openfiles_ignore:pytest.PytestUnknownMarkWarning" \
|
-W "ignore:Unknown pytest.mark.openfiles_ignore:pytest.PytestUnknownMarkWarning" \
|
||||||
--ignore "docs/whatsnew" %{?skippytest}
|
--ignore "docs/whatsnew" %{?skippytest}
|
||||||
}
|
}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if !%{with test}
|
||||||
%post
|
%post
|
||||||
for b in %{binaries}; do
|
for b in %{binaries}; do
|
||||||
%python_install_alternative $b
|
%python_install_alternative $b
|
||||||
@ -174,5 +191,6 @@ done
|
|||||||
%python_alternative %{_bindir}/wcslint
|
%python_alternative %{_bindir}/wcslint
|
||||||
%{python_sitearch}/astropy/
|
%{python_sitearch}/astropy/
|
||||||
%{python_sitearch}/astropy-%{version}-py*.egg-info
|
%{python_sitearch}/astropy-%{version}-py*.egg-info
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user