A new user interface for you! Read more...

File python-PyCBC.spec of Package python-PyCBC

#
# spec file for package python-PyCBC
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/

%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name:           python-PyCBC
Version:        1.13.2
Release:        0
License:        GPL-3.0-or-later
Summary:        Core library to analyze gravitational-wave data
Url:            http://www.pycbc.org/
Group:          Development/Languages/Python
Source:         https://files.pythonhosted.org/packages/source/p/pycbc/PyCBC-%{version}.tar.gz
BuildRequires:  python-rpm-macros
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module Cython}
BuildRequires:  %{python_module setuptools}
BuildRequires:  fdupes
BuildRequires:  %{python_module numpy}
BuildRequires:  %{python_module numpy-devel}
Requires:       python-numpy

%python_subpackages

%description
PyCBC is a software package used to explore astrophysical sources of gravitational waves. It contains algorithms to analyze gravitational-wave data from the LIGO and Virgo detectors, detect coalescing compact binaries, and measure the astrophysical parameters of detected sources.

%prep
%setup -q -n PyCBC-%{version}
sed -E -i "1{/^#!\/usr\/bin.*python/d}" gwave/*/*.py
sed -E -i "1{/^#!\/usr\/bin.*python/d}" pycbc/*/*.py

%build
%python_build

%install
%python_install
sed -E -i "1 s|^#\!\s*/usr/bin/env\s*bash|#\!/bin/bash|" %{buildroot}%{_bindir}/run_pycbc_inference
sed -E -i "1 s|^|#\!/usr/bin/python3\n|" %{buildroot}%{_bindir}/pycbc_ringinj
%python_expand %fdupes %{buildroot}%{$python_sitearch}

%python_expand chmod -x %{buildroot}%{$python_sitearch}/pycbc/results/static/js/fancybox/2.1.5/jquery.fancybox*.js

%files %{python_files}
%python2_only %{_bindir}/*
%{python_sitearch}/*

%changelog