Matej Cepl
7ec0f4a8b5
- Update to 4.14.0: * enhancements: - filtering and grouping area for binned (1D) spectral data has been improved with changes to the default behavior and many bug fixes resulting in changes to the statistics, degrees-of-freedom and energy flux in comparison to the previous version for the same data with the same filter. - updates to allow users to change the hard limits of XSPEC model parameters - the sample_flux routine now returns correct information for the clip column * documentation changes: - improved PHA simulation documentation - improved Filtering and grouping of PHA data documentation - added sherpa.image module documentation - added section on running tests to developer docs * Infrastructure Changes: - updates to support Apple ARM - update to support Xspec version 12.12 - update fftw from version 3.3.8 to 3.3.9 - clean up of compiler and sphinx warnings - changes to support gcc 9.3.0 in conda defaults - updates to support python 3.9 including readline 8.1 upgrade, numpy minimum 1.19 (numpy 1.18 minimum for python 3.7/8) - test infrastructure clean up and updates * bug fixes: - updates to fix several 'unable to parse region string: None' errors - fix issue where save_all() of a loaded image with no region filter would fail on reload - fixed issue with plot_model() being called before notice or ignore could lead to filters not getting applied - fix to error out instead of crash when grouping data using an unsupported method OBS-URL: https://build.opensuse.org/request/show/935920 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-sherpa?expand=0&rev=20
116 lines
3.9 KiB
RPMSpec
116 lines
3.9 KiB
RPMSpec
#
|
|
# spec file for package python-sherpa
|
|
#
|
|
# Copyright (c) 2021 SUSE LLC
|
|
#
|
|
# 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/
|
|
#
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
%define skip_python2 1
|
|
%define skip_python36 1
|
|
Name: python-sherpa
|
|
Version: 4.14.0
|
|
Release: 0
|
|
Summary: Modeling and fitting package for scientific data analysis
|
|
License: GPL-3.0-only
|
|
URL: https://github.com/sherpa/sherpa/
|
|
Source: https://github.com/sherpa/sherpa/archive/%{version}.tar.gz#/sherpa-%{version}.tar.gz
|
|
Patch1: reproducible.patch
|
|
BuildRequires: %{python_module devel}
|
|
BuildRequires: %{python_module numpy-devel}
|
|
BuildRequires: %{python_module setuptools}
|
|
BuildRequires: bison
|
|
BuildRequires: fdupes
|
|
BuildRequires: fftw3-devel
|
|
BuildRequires: flex
|
|
BuildRequires: gcc-c++
|
|
BuildRequires: gcc-fortran
|
|
BuildRequires: python-rpm-macros
|
|
# 4.14.0 requires numpy minimum 1.19 (numpy 1.18 minimum for python 3.7/8)
|
|
Requires: python-numpy >= 1.18
|
|
Requires(post): update-alternatives
|
|
Requires(postun):update-alternatives
|
|
ExcludeArch: %{ix86}
|
|
# SECTION test requirements
|
|
BuildRequires: %{python_module pytest >= 3.3}
|
|
BuildRequires: %{python_module pytest-xvfb}
|
|
# Highly recommended by upstream when building from source https://sherpa.readthedocs.io/en/latest/install.html#building-from-source
|
|
BuildRequires: %{python_module astropy}
|
|
BuildRequires: %{python_module matplotlib}
|
|
# /SECTION
|
|
%python_subpackages
|
|
|
|
%description
|
|
Sherpa is the CIAO modeling and fitting application. It enables the
|
|
user to construct models from definitions and fit those models to
|
|
data, using a variety of statistics and optimization methods.
|
|
|
|
%prep
|
|
%setup -q -n sherpa-%{version}
|
|
%autopatch -p1
|
|
sed -i "s|#fftw=local|fftw=local|" setup.cfg
|
|
sed -i "s|#fftw-include[-_]dirs.*$|fftw-include-dirs=%{_includedir}|" setup.cfg
|
|
sed -i "s|#fftw-lib-dirs.*$|fftw-lib-dirs=%{_libdir}|" setup.cfg
|
|
sed -i "s|#fftw-libraries|fftw-libraries|" setup.cfg
|
|
|
|
sed -i "s|/lib/|/%{_lib}/|" helpers/sherpa_config.py
|
|
|
|
%build
|
|
cp -r extern extern0
|
|
%{python_expand %{$python_build}
|
|
rm -r extern
|
|
cp -r extern0 extern
|
|
}
|
|
|
|
%install
|
|
%python_install
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/sherpa_test
|
|
%python_clone -a %{buildroot}%{_bindir}/sherpa_smoke
|
|
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
|
|
|
%{python_expand # REMOVE HASHBANGS FROM NON-EXEC FILES
|
|
sed -i "1{/\\/usr\\/bin\\/env python/d}" %{buildroot}%{$python_sitearch}/sherpa/optmethods/ncoresde.py
|
|
sed -i "1{/\\/usr\\/bin\\/env python/d}" %{buildroot}%{$python_sitearch}/sherpa/optmethods/ncoresnm.py
|
|
sed -i "1{/\\/usr\\/bin\\/env python/d}" %{buildroot}%{$python_sitearch}/sherpa/optmethods/opt.py
|
|
sed -i "1{/\\/usr\\/bin\\/env python/d}" %{buildroot}%{$python_sitearch}/sherpa/utils/akima.py
|
|
}
|
|
|
|
%check
|
|
# avoid conftest import mismatch
|
|
mv sherpa sherpa_temp
|
|
# astropy 4.2 fits header warning
|
|
donttest+="test_load_case_3"
|
|
%pytest_arch --pyargs sherpa -k "not ($donttest)"
|
|
|
|
%post
|
|
%python_install_alternative sherpa_smoke
|
|
%python_install_alternative sherpa_test
|
|
|
|
%postun
|
|
%python_uninstall_alternative sherpa_smoke
|
|
%python_uninstall_alternative sherpa_test
|
|
|
|
%files %{python_files}
|
|
%doc README.md
|
|
%license LICENSE
|
|
%python_alternative %{_bindir}/sherpa_test
|
|
%python_alternative %{_bindir}/sherpa_smoke
|
|
%{python_sitearch}/sherpa
|
|
%{python_sitearch}/sherpa-%{version}*-info
|
|
%{python_sitearch}/stk.so
|
|
%{python_sitearch}/group.so
|
|
|
|
%changelog
|