1
0
python-astropy/python-astropy.spec
Benjamin Greiner 466e1a31d5 Accepting request 961615 from home:bnavigator:branches:devel:languages:python:numeric
- Update to 5.0.2
  astropy.io.ascii
  * Bugfix to add backwards compatibility for reading ECSV version
    0.9 files with non-standard column datatypes (such as `object`,
    `str`, `datetime64`, etc.), which would raise a ValueError in
    ECSV version 1.0. [#12880]
  * astropy.io.misc
  * Bugfix for `units_mapping` schema's property name conflicts.
    Changes:
    - `inputs` to `unit_inputs`
    - `outputs` to `unit_outputs` [#12800]
  astropy.io.votable
  * Fixed a bug where `astropy.io.votable.validate` was printing
    output to `sys.stdout` when the `output` paramter was set to
    `None`. `validate` now returns a string when `output` is set to
    `None`, as documented. [#12604]
  astropy.modeling
  * Fix handling of units on `scale` parameter in BlackBody model.
    [#12318]
  * Indexing on models can now be used with all types of integers
    (like `numpy.int64`) instead of just `int`. [#12561]
  * Fix computation of the separability of a `CompoundModel` where
    another `CompoundModel` is on the right hand side of the `&`
    operator. [#12907]
  * Provide a hook (`Model._calculate_separability_matrix`) to
    allow subclasses of `Model` to define how to compute their
    separability matrix. [#12900]
  astropy.stats
  * Fixed a bug in which running
    `kuiper_false_positive_probability(D,N)` on distributions with
    many data points could produce NaN values for the false
    positive probability of the Kuiper statistic. [#12896]
  astropy.wcs
  * Fixed a bug due to which `naxis`, `pixel_shape`, and
    `pixel_bounds` attributes of `astropy.wcs.WCS` were not
    restored when an `astropy.wcs.WCS` object was unpickled. This
    fix also eliminates `FITSFixedWarning` warning issued during
    unpiclikng of the WCS objects related to the number of axes.
    This fix also eliminates errors when unpickling WCS objects
    originally created using non-default values for `key`,
    `colsel`, and `keysel` parameters. [#12844]

OBS-URL: https://build.opensuse.org/request/show/961615
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-astropy?expand=0&rev=65
2022-03-14 09:52:01 +00:00

244 lines
7.7 KiB
RPMSpec

#
# spec file
#
# Copyright (c) 2022 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/
#
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%bcond_without test
%define psuffix -test
%else
%bcond_with test
%define psuffix %{nil}
%endif
%define binaries fitsdiff fitsheader fitscheck fitsinfo fits2bitmap samp_hub showtable volint wcslint
# backwards compatibility for --without systemlibs
%bcond_without systemlibs
%bcond_without system_cfitsio
%bcond_without system_expat
%bcond_without system_wcslib
%if %{with system_cfitsio}
%define unbundle_cfitsio export ASTROPY_USE_SYSTEM_CFITSIO=1
%endif
%if %{with system_expat}
%define unbundle_expat export ASTROPY_USE_SYSTEM_EXPAT=1
%endif
%if %{with system_wcslib}
%define unbundle_wcs export ASTROPY_USE_SYSTEM_WCSLIB=1
%endif
%define unbundle_libs %{?unbundle_cfitsio} \
%{?unbundle_expat} \
%{?unbundle_wcs}
%{?!python_module:%define python_module() python3-%{**}}
%define skip_python2 1
Name: python-astropy%{psuffix}
Version: 5.0.2
Release: 0
Summary: Community-developed python astronomy tools
License: BSD-3-Clause
URL: https://astropy.org
Source: https://files.pythonhosted.org/packages/source/a/astropy/astropy-%{version}.tar.gz
# Mark wcs headers as false positives for devel-file-in-non-devel-package
# These are used by the python files so they must be available.
Source100: python-astropy-rpmlintrc
# https://docs.astropy.org/en/v5.0/install.html#requirements
BuildRequires: %{python_module Cython >= 0.29.22}
BuildRequires: %{python_module Jinja2}
BuildRequires: %{python_module PyYAML >= 3.13}
BuildRequires: %{python_module devel >= 3.8}
BuildRequires: %{python_module extension-helpers}
BuildRequires: %{python_module numpy-devel >= 1.18}
BuildRequires: %{python_module packaging >= 19.0}
BuildRequires: %{python_module pyerfa >= 2.0}
BuildRequires: %{python_module setuptools_scm >= 6.2}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: hdf5-devel
BuildRequires: pkgconfig
BuildRequires: python-rpm-macros
Requires: python-PyYAML >= 3.13
Requires: python-dbm
Requires: python-numpy >= 1.18
Requires: python-packaging >= 19.0
Requires: python-pyerfa >= 2.0
Requires(post): update-alternatives
Requires(postun):update-alternatives
Recommends: libxml2-tools
Recommends: python-Bottleneck
Recommends: python-asdf >= 2.9.2
Recommends: python-beautifulsoup4
Recommends: python-bleach
Recommends: python-h5py
Recommends: python-html5lib
Recommends: python-jplephem
Recommends: python-matplotlib >= 3.1
Recommends: python-mpmath
Recommends: python-pandas
Recommends: python-pyarrow >= 5
Recommends: python-scipy >= 1.1
Recommends: python-setuptools
Recommends: python-sortedcontainers
Recommends: python-typing_extensions >= 3.10.0.1
Conflicts: perl-Data-ShowTable
Conflicts: python-matplotlib = 3.4.0
%if %{with system_cfitsio}
BuildRequires: pkgconfig(cfitsio)
%endif
%if %{with system_expat}
BuildRequires: pkgconfig(expat)
%endif
%if %{with system_wcslib}
BuildRequires: pkgconfig(wcslib) >= 7
%endif
%if %{with test}
# SECTION Optional requirements
BuildRequires: %{python_module Bottleneck}
BuildRequires: %{python_module asdf >= 2.9.2}
BuildRequires: %{python_module beautifulsoup4}
BuildRequires: %{python_module bleach}
BuildRequires: %{python_module h5py}
BuildRequires: %{python_module html5lib}
BuildRequires: %{python_module jplephem}
BuildRequires: %{python_module matplotlib >= 3.1}
BuildRequires: %{python_module mpmath}
BuildRequires: %{python_module pandas}
BuildRequires: %{python_module scipy >= 1.3}
BuildRequires: %{python_module sortedcontainers}
BuildRequires: %{python_module typing_extensions >= 3.10.0.1}
BuildRequires: libxml2-tools
# /SECTION
# SECTION test requirements
# We need the compiled package for testing
BuildRequires: %{python_module astropy = %{version}}
BuildRequires: %{python_module ipython >= 4.2}
BuildRequires: %{python_module objgraph}
# upstream declares pytest >= 7, but Tumbleweed is not ready for it (!)
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module pytest-astropy >= 0.9}
BuildRequires: %{python_module pytest-doctestplus >= 0.12}
BuildRequires: %{python_module pytest-mpl}
BuildRequires: %{python_module pytest-xdist}
BuildRequires: %{python_module sgp4}
BuildRequires: %{python_module skyfield}
# /SECTION
%endif
%python_subpackages
%description
Astropy is a package intended to contain core functionality and some
common tools needed for performing astronomy and astrophysics research with
Python. It also provides an index for other astronomy packages and tools for
managing them.
%if !%{with test}
%prep
%autosetup -p1 -n astropy-%{version}
# avoid rpmlint zero-length error for empty module
echo '# empty module' > astropy/samp/setup_package.py
# Make sure bundled libs are not used
%if %{with system_cfitsio}
rm -rf cextern/cfitsio
%endif
%if %{with system_expat}
rm -rf cextern/expat
rm licenses/EXPAT_LICENSE.rst
%endif
%if %{with system_wcslib}
rm -rf cextern/wcslib
rm licenses/WCSLIB_LICENSE.rst
%endif
# increase test deadline for slow obs executions (e.g. on s390x)
echo "
import hypothesis
hypothesis.settings.register_profile(
'obs',
deadline=5000,
suppress_health_check=[hypothesis.HealthCheck.too_slow]
)
" >> astropy/conftest.py
%build
%{?unbundle_libs}
%python_build
%install
%{?unbundle_libs}
%python_install
for b in %{binaries}; do
%python_clone -a %{buildroot}%{_bindir}/$b
done
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%endif
%if %{with test}
%check
# these are flaky on obs
donttest="test_color_print3"
donttest+=" or test_ignore_sigint"
donttest+=" or (test_wcs and test_spectra)"
donttest+=" or (test_standard_profile and test_main)"
%ifarch aarch64
# doctest failure because of precision errors
donttest+=" or bayesian_info_criterion_lsq"
%endif
%ifarch %arm32
# gh#astropy/astropy#12017
donttest+=" or test_stats"
%endif
# These require pytest >= 7: new pytest.warns API
donttest+=" or (test_c_reader.py and range)"
donttest+=" or (test_profiling and test_spectrum)"
donttest+=" or (test_utils and test_noncelestial_scale and True)"
#
# http://docs.astropy.org/en/latest/development/testguide.html#running-tests
# running pytest directly would require building the extensions inplace
%{python_exec -B -c "
import sys, astropy
pytestargs = ('-v '
'-n auto ' # pytest-xdist
'-p no:cacheprovider '
'--hypothesis-profile=obs '
'-k \"not ($donttest)\"')
returncode = astropy.test(args=pytestargs)
sys.exit(returncode)
"}
%endif
%if !%{with test}
%post
%{expand:%(for b in %{binaries}; do echo "%%python_install_alternative $b"; done)}
%postun
%{expand:%(for b in %{binaries}; do echo "%%python_uninstall_alternative $b"; done)}
%files %{python_files}
%doc CHANGES.rst README.rst
%license LICENSE.rst licenses/*
%{expand:%(for b in %{binaries}; do echo "%%python_alternative %%{_bindir}/$b"; done)}
%{python_sitearch}/astropy/
%{python_sitearch}/astropy-%{version}*-info
%endif
%changelog