commit python-cftime for openSUSE:Factory
Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-cftime for openSUSE:Factory checked in at 2023-08-31 13:45:51 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-cftime (Old) and /work/SRC/openSUSE:Factory/.python-cftime.new.1766 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python-cftime" Thu Aug 31 13:45:51 2023 rev:9 rq:1108098 version:1.6.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-cftime/python-cftime.changes 2022-10-29 20:18:42.114720600 +0200 +++ /work/SRC/openSUSE:Factory/.python-cftime.new.1766/python-cftime.changes 2023-08-31 13:51:53.745471772 +0200 @@ -1,0 +2,5 @@ +Wed Aug 30 11:03:06 UTC 2023 - Markéta Machová <mmachova@suse.com> + +- add upstream cython3.patch + +------------------------------------------------------------------- New: ---- cython3.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-cftime.spec ++++++ --- /var/tmp/diff_new_pack.40H6QU/_old 2023-08-31 13:51:54.873512091 +0200 +++ /var/tmp/diff_new_pack.40H6QU/_new 2023-08-31 13:51:54.881512377 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-cftime # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,8 +17,6 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} -# no numpy for Python 3.6 -%define skip_python36 1 Name: python-cftime Version: 1.6.2 Release: 0 @@ -26,14 +24,16 @@ 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} +#PATCH-FIX-UPSTREAM https://github.com/Unidata/cftime/pull/305 Set c_api_binop_methods Cython compiler directive to True +Patch: cython3.patch +BuildRequires: %{python_module Cython >= 0.29.20} 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-Cython >= 0.29.20 Requires: python-numpy %python_subpackages @@ -42,7 +42,7 @@ Was split out from netcfd4-python in 2016. %prep -%setup -q -n cftime-%{version} +%autosetup -p1 -n cftime-%{version} # do not require cov/xdist/etc rm setup.cfg ++++++ cython3.patch ++++++ From 31f782aed3de56300886dd7350f1faff657e14dd Mon Sep 17 00:00:00 2001 From: Spencer Clark <spencerkclark@gmail.com> Date: Sat, 29 Jul 2023 09:51:10 -0400 Subject: [PATCH] Set c_api_binop_methods compiler directive to True This retains Cython 0.x behavior for arithmetic operators for Cython >= 3.0.0. --- Changelog | 2 ++ pyproject.toml | 2 +- requirements-dev.txt | 2 +- setup.py | 9 ++++++++- 4 files changed, 12 insertions(+), 3 deletions(-) Index: cftime-1.6.2/pyproject.toml =================================================================== --- cftime-1.6.2.orig/pyproject.toml +++ cftime-1.6.2/pyproject.toml @@ -1,3 +1,3 @@ [build-system] -requires = ["setuptools>=41.2", "cython", "wheel", "oldest-supported-numpy"] +requires = ["setuptools>=41.2", "cython>=0.29.20", "wheel", "oldest-supported-numpy"] build-backend = "setuptools.build_meta" Index: cftime-1.6.2/requirements-dev.txt =================================================================== --- cftime-1.6.2.orig/requirements-dev.txt +++ cftime-1.6.2/requirements-dev.txt @@ -1,7 +1,7 @@ check-manifest coverage coveralls -cython>0.26.1 +cython>=0.29.20 pytest pytest-cov sphinx Index: cftime-1.6.2/setup.py =================================================================== --- cftime-1.6.2.orig/setup.py +++ cftime-1.6.2/setup.py @@ -16,7 +16,14 @@ except ImportError: BASEDIR = os.path.abspath(os.path.dirname(__file__)) SRCDIR = os.path.join(BASEDIR,'src') CMDS_NOCYTHONIZE = ['clean','clean_cython','sdist'] -COMPILER_DIRECTIVES = {} +COMPILER_DIRECTIVES = { + # Cython 3.0.0 changes the default of the c_api_binop_methods directive to + # False, resulting in errors in datetime and timedelta arithmetic: + # https://github.com/Unidata/cftime/issues/271. We explicitly set it to + # True to retain Cython 0.x behavior for future Cython versions. This + # directive was added in Cython version 0.29.20. + "c_api_binop_methods": True +} DEFINE_MACROS = [("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION")] FLAG_COVERAGE = '--cython-coverage' # custom flag enabling Cython line tracing NAME = 'cftime'
participants (1)
-
Source-Sync