2020-05-31 15:11:55 +02:00
#
# spec file for package lalapps
#
2023-05-26 11:09:26 +02:00
# Copyright (c) 2023 SUSE LLC
2020-05-31 15:11:55 +02:00
#
# 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/
#
2020-11-03 17:03:41 +01:00
2020-05-31 15:11:55 +02:00
%define skip_python2 1
2021-02-13 12:35:26 +01:00
# NEP 29: astropy, numpy, scipy do not have a python36 flavor package in TW
%define skip_python36 1
2020-05-31 15:11:55 +02:00
Name : lalapps
2023-05-26 11:09:26 +02:00
Version : 9.2.1
2020-05-31 15:11:55 +02:00
Release : 0
Summary : LSC Algorithm Library Applications
License : GPL-2.0-or-later
Group : Productivity/Scientific/Physics
URL : https://wiki.ligo.org/Computing/DASWG/LALSuite
2022-08-23 22:51:09 +02:00
Source : https://software.igwn.org/sources/source/lalsuite/%{name} -%{version} .tar.xz
2020-05-31 15:11:55 +02:00
# PATCH-FIX-UPSTREAM lalapps-fix-uninitialised-var.patch badshah400@gmail.com -- Fix usage of uninitialised variable
Patch0 : lalapps-fix-uninitialised-var.patch
2021-09-15 11:05:43 +02:00
# PATCH-FIX-UPSTREAM lalapps-disable-testWeave-for-non-x86_64.patch badshah400@gmail.com -- Disable Weave related tests on all but x86_64 where tolerance errors show up, see https://git.ligo.org/lscsoft/lalsuite/-/issues/105
Patch2 : lalapps-disable-testWeave-for-non-x86_64.patch
2020-05-31 15:11:55 +02:00
BuildRequires : %{python_module astropy}
BuildRequires : %{python_module devel}
BuildRequires : %{python_module glue}
2023-05-26 11:09:26 +02:00
BuildRequires : %{python_module lal >= 7.3.0}
BuildRequires : %{python_module lalburst >= 2.0.1}
BuildRequires : %{python_module lalframe >= 3.0.1}
BuildRequires : %{python_module lalinference >= 4.1.3}
BuildRequires : %{python_module lalmetaio >= 4.0.1}
BuildRequires : %{python_module lalpulsar >= 6.0.1}
2020-05-31 15:11:55 +02:00
BuildRequires : %{python_module matplotlib}
BuildRequires : %{python_module numpy-devel}
BuildRequires : %{python_module numpy}
BuildRequires : %{python_module scipy}
BuildRequires : cfitsio-devel
BuildRequires : fdupes
BuildRequires : openmpi-devel
BuildRequires : pkgconfig
BuildRequires : python-rpm-macros
BuildRequires : swig
BuildRequires : pkgconfig(fftw3)
2021-02-13 12:35:26 +01:00
BuildRequires : pkgconfig(framel) >= 8.39.2
2020-05-31 15:11:55 +02:00
BuildRequires : pkgconfig(gsl)
2023-05-26 11:09:26 +02:00
BuildRequires : pkgconfig(lal) >= 7.3.0
BuildRequires : pkgconfig(lalburst) >= 2.0.1
BuildRequires : pkgconfig(lalframe) >= 3.0.1
BuildRequires : pkgconfig(lalinference) >= 4.1.3
BuildRequires : pkgconfig(lalinspiral) >= 4.0.2
BuildRequires : pkgconfig(lalmetaio) >= 4.0.1
BuildRequires : pkgconfig(lalpulsar) >= 6.0.1
BuildRequires : pkgconfig(lalsimulation) >= 5.2.0
2021-02-13 12:35:26 +01:00
# SECTION For tests
BuildRequires : %{python_module pytest}
BuildRequires : bc
BuildRequires : lalpulsar-data
Requires : python3-%{name} = %{version}
# /SECTION
2021-09-15 11:05:43 +02:00
# SECTION Required for Patch2
BuildRequires : libtool
# /SECTION
2020-07-10 19:38:15 +02:00
# 32-bit no longer supported upstream
2020-11-03 17:03:41 +01:00
ExcludeArch : %{ix86}
2021-02-13 12:35:26 +01:00
%define python_subpackage_only 1
2020-05-31 15:11:55 +02:00
%python_subpackages
%description
The LSC Algorithm Library Applications for gravitational wave data analysis.
This package contains applications that are built on tools in the LSC
Algorithm Library.
2021-02-13 12:35:26 +01:00
%package -n python-%{name}
Summary : LSC Algorithm Library Applications
Group : Productivity/Scientific/Physics
Requires : python-h5py
2023-05-26 11:09:26 +02:00
Requires : python-lal >= 7.3.0
Requires : python-lalburst >= 2.0.1
Requires : python-lalframe >= 3.0.1
Requires : python-lalinference >= 4.1.3
Requires : python-lalmetaio >= 4.0.1
Requires : python-lalpulsar >= 6.0.1
2021-02-13 12:35:26 +01:00
Requires : python-ligo-lw
Requires : python-ligo-segments
Requires : python-matplotlib
Requires : python-numpy
Requires : python-scipy
%description -n python-%{name}
The LSC Algorithm Library Applications for gravitational wave data analysis.
This package contains applications that are built on tools in the LSC
Algorithm Library.
This package contains the python files
2020-05-31 15:11:55 +02:00
%prep
%autosetup -p1
%build
2021-09-15 11:05:43 +02:00
# Patch2 touches autotool files
autoreconf -fvi
2021-02-13 12:35:26 +01:00
%{python_expand # Necessary to run %%configure for all active python flavors
2020-05-31 15:11:55 +02:00
export PYTHON=%{_bindir} /$python
mkdir ../$python
2020-11-03 17:03:41 +01:00
cp -pr ./ ../$python
2020-05-31 15:11:55 +02:00
pushd ../$python
%configure --enable-swig
2020-11-03 17:03:41 +01:00
%make_build
2020-05-31 15:11:55 +02:00
popd
}
%install
2021-02-13 12:35:26 +01:00
%{python_expand # install for all active python flavors
2020-05-31 15:11:55 +02:00
export PYTHON=$python
pushd ../$python
%make_install
popd
}
2020-07-10 19:38:15 +02:00
# env-based hashbang /usr/bin/env tclsh => /usr/bin/tclsh
sed -Ei " 1 { s / e n v / / } " %{buildroot} %{_bindir} /lalapps_CopySFTs
2020-05-31 15:11:55 +02:00
# SECTION EXPORT LAL SPECIFIC ENV VARIABLES
# We do not use upstream's env files because they also set more generic
# variables (e.g. PATH) which may ruin setups
# NUKE UPSTREAM ENV SCRIPTS
rm %{buildroot} %{_sysconfdir} /%{name} -user-env.*
cat << EOF >> %{name} .sh
export LALAPPS_PREFIX=%{_prefix}
export LALAPPS_DATADIR=%{_datadir} /%{name}
EOF
cat << EOF >> %{name} .csh
setenv LALAPPS_PREFIX " %{_prefix} "
setenv LALAPPS_DATADIR " %{_datadir} / %{name} "
EOF
cat << EOF >> %{name} .fish
set LALAPPS_PREFIX (echo " %{_prefix} " | %{_bindir} /sed -e 's| |:|g;' )
set LALAPPS_DATADIR (echo " %{_datadir} / %{name} " | %{_bindir} /sed -e 's| |:|g;' )
EOF
install -D -m0644 %{name} .sh %{buildroot} %{_sysconfdir} /profile.d/%{name} .sh
install -D -m0644 %{name} .csh %{buildroot} %{_sysconfdir} /profile.d/%{name} .csh
install -D -m0644 %{name} .fish %{buildroot} %{_sysconfdir} /profile.d/%{name} .fish
# /SECTION
# SECTION REMOVE STATIC LIB AND LIBTOOL ARCHIVE
find %{buildroot} %{_libdir} / -name " * . a " -delete -print
find %{buildroot} -type f -name " * . l a " -delete -print
# /SECTION
%python_expand %fdupes %{buildroot} %{$python_sitearch}/%{name} /
%fdupes %{buildroot} /%{_datadir} /%{name} /
2021-02-13 12:35:26 +01:00
%check
%{python_expand #
export PYTHON=$python
pushd ../$python
%make_build check
popd
}
2020-05-31 15:11:55 +02:00
%files -n %{name}
%license COPYING
%{_bindir} /*
%{_datadir} /lalapps/
%{_mandir} /man1/*
%config %{_sysconfdir} /profile.d/%{name} .*
2021-02-13 12:35:26 +01:00
%files %{python_files %{name}}
2020-05-31 15:11:55 +02:00
%{python_sitearch} /*
%changelog