Accepting request 865526 from home:badshah400:branches:science

- Recommend rather than require python-ligo-lw and python-ligo-segments to avoid circular dependencies (these pkgs also require lal).
- Fix the test suite setup to actually call the tests

OBS-URL: https://build.opensuse.org/request/show/865526
OBS-URL: https://build.opensuse.org/package/show/science/lal?expand=0&rev=12
This commit is contained in:
Atri Bhattacharya 2021-02-06 21:59:47 +00:00 committed by Git OBS Bridge
parent b34d9285e7
commit 95bf04ab34
2 changed files with 25 additions and 11 deletions

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Thu Jan 21 22:58:57 UTC 2021 - Atri Bhattacharya <badshah400@gmail.com>
- Recommend rather than require python-ligo-lw and
python-ligo-segments to avoid circular dependencies (these pkgs
also require lal).
-------------------------------------------------------------------
Mon Jan 18 21:09:11 UTC 2021 - Benjamin Greiner <code@bnavigator.de>
- Fix the test suite setup to actually call the tests
-------------------------------------------------------------------
Mon Jan 18 13:49:55 UTC 2021 - Atri Bhattacharya <badshah400@gmail.com>

View File

@ -39,17 +39,16 @@ BuildRequires: fdupes
BuildRequires: hdf5-devel
BuildRequires: pkgconfig
BuildRequires: python-rpm-macros
BuildRequires: pkgconfig(fftw3)
BuildRequires: pkgconfig(gsl)
BuildRequires: pkgconfig(zlib)
Requires: python-freezegun
Requires: python-ligo-segments
Requires: python-lscsoft-glue
Requires: python-numpy
Requires: python-python-dateutil
Requires: python-scipy
Requires: python-six
Recommends: python-ligo-lw
Recommends: python-ligo-segments
ExcludeArch: %{ix86}
%if %{with octave}
BuildRequires: octave-devel
@ -57,7 +56,7 @@ BuildRequires: swig >= 4.0
%else
BuildRequires: swig >= 3.0
%endif
# SECTION For tests (only with python3)
# SECTION For tests (only the default python3 flavor)
BuildRequires: python3-freezegun
BuildRequires: python3-ligo-lw
BuildRequires: python3-ligo-segments
@ -127,7 +126,7 @@ This package provides the octave module for lal.
%autosetup -p1
%build
%{python_expand # Necessary to run %%configure with both py2 and py3
%{python_expand # Necessary to run %%configure with all python flavors
export PYTHON=$python
mkdir ../${PYTHON}_build
cp -pr ./ ../${PYTHON}_build
@ -140,7 +139,7 @@ popd
}
%install
%{python_expand # py2 and py3 make_install
%{python_expand # all python flavors as configured above
export PYTHON=$python
pushd ../${PYTHON}_build
%make_install
@ -159,14 +158,17 @@ sed -Ei "1{/^#!\/usr\/bin\/env python/d}" %{buildroot}%{$python_sitearch}/lal/gp
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/antenna.py
}
%{?python_compileall}
%ifpython3
%check
# Run tests from the python3 build dir
pushd ../python3_build
%{python_expand # Run tests from the build dir of the primary python3 flavor only
if [ "$python_" = "python3_" -o "%{$python_provides}" = "python3" ]; then
export PYTHON=$python
pushd ../${PYTHON}_build
%make_build check
popd
%endif
fi
}
%post -n %{shliblal} -p /sbin/ldconfig
%post -n %{shliblalsupport} -p /sbin/ldconfig
@ -174,7 +176,7 @@ popd
%postun -n %{shliblalsupport} -p /sbin/ldconfig
%files %{python_files}
%{python_sitearch}/*
%{python_sitearch}/lal
%files -n %{shliblal}
%{_libdir}/liblal.so.*