Accepting request 893299 from science
OBS-URL: https://build.opensuse.org/request/show/893299 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/lal?expand=0&rev=5
This commit is contained in:
commit
6991942158
3
_multibuild
Normal file
3
_multibuild
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<multibuild>
|
||||||
|
<package>test</package>
|
||||||
|
</multibuild>
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Apr 21 10:59:16 UTC 2021 - Atri Bhattacharya <badshah400@gmail.com>
|
||||||
|
|
||||||
|
- Split tests into a multibuild flavor to avoid circular
|
||||||
|
BuildRequires with python-ligo-lw and other test requirements.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Feb 26 22:23:19 UTC 2021 - Atri Bhattacharya <badshah400@gmail.com>
|
Fri Feb 26 22:23:19 UTC 2021 - Atri Bhattacharya <badshah400@gmail.com>
|
||||||
|
|
||||||
|
22
lal.spec
22
lal.spec
@ -16,6 +16,15 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%global flavor @BUILD_FLAVOR@%{nil}
|
||||||
|
%if "%{flavor}" == "test"
|
||||||
|
%bcond_without test
|
||||||
|
%define psuffix -test
|
||||||
|
%else
|
||||||
|
%bcond_with test
|
||||||
|
%define psuffix %{nil}
|
||||||
|
%endif
|
||||||
|
|
||||||
# NEP 29: numpy, scipy do not have a python36 flavor package in TW
|
# NEP 29: numpy, scipy do not have a python36 flavor package in TW
|
||||||
%define skip_python36 1
|
%define skip_python36 1
|
||||||
|
|
||||||
@ -59,6 +68,7 @@ BuildRequires: swig >= 4.0
|
|||||||
%else
|
%else
|
||||||
BuildRequires: swig >= 3.0
|
BuildRequires: swig >= 3.0
|
||||||
%endif
|
%endif
|
||||||
|
%if %{with test}
|
||||||
# SECTION For tests (only the default python3 flavor)
|
# SECTION For tests (only the default python3 flavor)
|
||||||
BuildRequires: python3-freezegun
|
BuildRequires: python3-freezegun
|
||||||
BuildRequires: python3-ligo-lw
|
BuildRequires: python3-ligo-lw
|
||||||
@ -67,6 +77,7 @@ BuildRequires: python3-pytest
|
|||||||
BuildRequires: python3-python-dateutil
|
BuildRequires: python3-python-dateutil
|
||||||
BuildRequires: python3-scipy
|
BuildRequires: python3-scipy
|
||||||
# /SECTION
|
# /SECTION
|
||||||
|
%endif
|
||||||
|
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
@ -142,6 +153,7 @@ popd
|
|||||||
}
|
}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
%if %{without test}
|
||||||
%{python_expand # all python flavors as configured above
|
%{python_expand # all python flavors as configured above
|
||||||
export PYTHON=$python
|
export PYTHON=$python
|
||||||
pushd ../${PYTHON}_build
|
pushd ../${PYTHON}_build
|
||||||
@ -154,8 +166,6 @@ rm %{buildroot}%{_sysconfdir}/*
|
|||||||
find %{buildroot} -type f -name "*.la" -delete -print
|
find %{buildroot} -type f -name "*.la" -delete -print
|
||||||
find %{buildroot}%{_libdir} -name "*.a" -delete -print
|
find %{buildroot}%{_libdir} -name "*.a" -delete -print
|
||||||
|
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitearch}/
|
|
||||||
|
|
||||||
%{python_expand # FIX env HASHBANGS
|
%{python_expand # FIX env HASHBANGS
|
||||||
sed -Ei "1{/^#!\/usr\/bin\/env python/d}" %{buildroot}%{$python_sitearch}/lal/gpstime.py
|
sed -Ei "1{/^#!\/usr\/bin\/env python/d}" %{buildroot}%{$python_sitearch}/lal/gpstime.py
|
||||||
sed -Ei "1{/^#!\/usr\/bin\/env python/d}" %{buildroot}%{$python_sitearch}/lal/series.py
|
sed -Ei "1{/^#!\/usr\/bin\/env python/d}" %{buildroot}%{$python_sitearch}/lal/series.py
|
||||||
@ -163,7 +173,11 @@ sed -Ei "1{/^#!\/usr\/bin\/env python/d}" %{buildroot}%{$python_sitearch}/lal/an
|
|||||||
}
|
}
|
||||||
%{?python_compileall}
|
%{?python_compileall}
|
||||||
|
|
||||||
|
%python_expand %fdupes %{buildroot}%{$python_sitearch}/
|
||||||
|
%endif
|
||||||
|
|
||||||
%check
|
%check
|
||||||
|
%if %{with test}
|
||||||
%{python_expand # Run tests from the build dir of the primary python3 flavor only
|
%{python_expand # Run tests from the build dir of the primary python3 flavor only
|
||||||
if [ "$python_" = "python3_" -o "%{$python_provides}" = "python3" ]; then
|
if [ "$python_" = "python3_" -o "%{$python_provides}" = "python3" ]; then
|
||||||
export PYTHON=$python
|
export PYTHON=$python
|
||||||
@ -172,7 +186,9 @@ pushd ../${PYTHON}_build
|
|||||||
popd
|
popd
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{without test}
|
||||||
%post -n %{shliblal} -p /sbin/ldconfig
|
%post -n %{shliblal} -p /sbin/ldconfig
|
||||||
%post -n %{shliblalsupport} -p /sbin/ldconfig
|
%post -n %{shliblalsupport} -p /sbin/ldconfig
|
||||||
%postun -n %{shliblal} -p /sbin/ldconfig
|
%postun -n %{shliblal} -p /sbin/ldconfig
|
||||||
@ -204,4 +220,6 @@ fi
|
|||||||
%{_libdir}/octave/*/site/oct/*/*.oct
|
%{_libdir}/octave/*/site/oct/*/*.oct
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user