* Return the default values of dayofwk and dayofyr when calendar
is '' (issue #173).
* fix treatment of masked arrays in num2date and date2num (issue #175).
Also make sure masked arrays are output from num2date/date2num if
masked arrays are input.
* Where possible, use timedelta arithmetic to decode times exactly within
num2date (issue #171).
* Make taking the difference between two cftime datetimes to produce a
timedelta exact to the microsecond; depending on the units encoding,
this enables date2num to be exact as well (issue #109).
* utime.date2num/utime.num2date now just call module level functions.
JulianDayFromDate/DateFromJulianDay no longer used internally (PR #180).
* add isoformat method for compatibility with python datetime (issue #152).
* make 'standard' default calendar for cftime.datetime
so that dayofwk,dayofyr methods don't fail (issue #169).
* change dayofwk and dayofyr attributes into properties (issue #158)
* fix for issue #165 (python datetime should be returned when
only_use_cftime_datimes=False).
* include pyproject.toml in MANIFEST.in so it gets
included in source tarball (issue #154).
* fix microsecond formatting issue, ensure identical results
computed for arrays and scales (issue #143, PR #146).
* improved exceptions for time differences (issue #128, PR #131).
* fix intersphinx entries (issue #133, PR #133)
* make only_use_cftime_datetimes=True by default, so cftime datetime
instances are returned by default by num2date (instead of returning python
datetime instances where possible). Issue #136, PR #135.
* Add daysinmonth attribute (issue #137, PR #138).
* If only_use_python_datetimes=True and only_use_cftime_datetimes=False,
num2date only returns python datetime instances and raises an exception
if this is not possible.
* Fix for fractional seconds in reference date in units string
- Add numpy-devel to BuildRequires.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cftime?expand=0&rev=10
63 lines
1.9 KiB
RPMSpec
63 lines
1.9 KiB
RPMSpec
#
|
|
# spec file for package python-cftime
|
|
#
|
|
# Copyright (c) 2020 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-%{**}}
|
|
Name: python-cftime
|
|
Version: 1.2.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 COPYING
|
|
%doc README.md
|
|
%{python_sitearch}/*
|
|
|
|
%changelog
|