Files
python-cftime/python-cftime.spec
Dirk Mueller 74f8641998 - update to 1.6.0:
* fix for masked array inputs
  * improved performance of the num2date algorithm, in some cases providing
    an over 100x speedup
  * fix for date2index for select != 'exact' when select='exact' works
  * silently change calendar='gregorian' to 'standard' internally, 
    since 'gregorian' deprecated in CF v1.9
  * add "is_leap_year" function
  * wheels that work on Apple M1 (arm64) available on pypi.
  * added support for "common_year" and "common_years" units for "noleap" 
    and "365_day" calendars
  * check consistency of year arg and has_year_zero kwarg in cftime.datetime
    (issue #248).  Also assume if has_year_zero not specified it should be True
    if year=0. Allow replace method to change has_year_zero. Issue UserWarning
    if year set to zero and calendar default is changed from False to True
    (so that user is aware the resulting instance will not be CF compliant).
  * '360_day' was missing from list of 'idealized' calendars.
  * fixed a bug that led to subclasses losing their type identity upon
    pickling
  * Change default behavior of proleptic_gregorian to has_year_zero=T
    (to be consistent with ISO-8601 since CF does not specify the year zero convention
    for this calendar). Issue warning when trying to
    to create a cftime.datetime instance that is not allowed in CF
  * clean-up deprecated calendar specific subclasses
  * added string formatting support to `cftime.datetime` objects
    (via `cftime.datetime.__format__`)
  * add support for astronomical year numbering (including year zero) for
    real-world calendars using 'has_year_zero' cftime.datetime kwarg
    Default is False for 'real-world' calendars ('julian', 'gregorian'/'standard', 
    'proleptic_gregorian'). Ignored for idealized calendars like '360_day

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cftime?expand=0&rev=14
2022-03-27 14:58:44 +00:00

65 lines
1.9 KiB
RPMSpec

#
# spec file for package python-cftime
#
# 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/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
# no numpy for Python 3.6
%define skip_python36 1
Name: python-cftime
Version: 1.6.0
Release: 0
Summary: Time-handling functionality from netcdf4-python
License: MIT
URL: https://github.com/Unidata/cftime
Source: https://files.pythonhosted.org/packages/source/c/cftime/cftime-%{version}.tar.gz
BuildRequires: %{python_module Cython}
BuildRequires: %{python_module numpy-devel}
BuildRequires: %{python_module numpy}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools >= 18.0}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-Cython
Requires: python-numpy
%python_subpackages
%description
Time-handling functionality from netcdf4-python.
Was split out from netcfd4-python in 2016.
%prep
%setup -q -n cftime-%{version}
# do not require cov/xdist/etc
rm setup.cfg
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%check
%python_expand PYTHONPATH="%{buildroot}%{$python_sitearch}" py.test-%{$python_bin_suffix} -v
%files %{python_files}
%license LICENSE
%doc README.md
%{python_sitearch}/*
%changelog