diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/.gitignore b/.gitignore index 5978d3e..8ea4881 100644 --- a/.gitignore +++ b/.gitignore @@ -1,70 +1 @@ -Cython-0.12.1.tar.gz -/Cython-0.13.tar.gz -/Cython-0.14.tar.gz -/Cython-0.14.1.tar.gz -/Cython-0.15.tar.gz -/Cython-0.15.1.tar.gz -/Cython-0.16.tar.gz -/Cython-0.17b3.tar.gz -/Cython-0.17.tar.gz -/Cython-0.17.1.tar.gz -/Cython-0.17.2.tar.gz -/Cython-0.17.3.tar.gz -/Cython-0.18.tar.gz -/Cython-0.19.tar.gz -/Cython-0.19.2.tar.gz -/Cython-0.20.tar.gz -/Cython-0.20.1.tar.gz -/Cython-0.21.tar.gz -/Cython-0.21.1.tar.gz -/Cython-0.22.tar.gz -/Cython-0.23.tar.gz -/Cython-0.23.4.tar.gz -/Cython-0.24.1.tar.gz -/Cython-0.25.2.tar.gz -/Cython-0.27.1.tar.gz -/Cython-0.27.3.tar.gz -/Cython-0.28.1.tar.gz -/Cython-0.28.4.tar.gz -/Cython-0.28.5.tar.gz -/Cython-0.29~rc2.tar.gz -/Cython-0.29.tar.gz -/Cython-0.29.1.tar.gz -/Cython-0.29.3.tar.gz -/Cython-0.29.5.tar.gz -/Cython-0.29.6.tar.gz -/Cython-0.29.7.tar.gz -/Cython-0.29.9.tar.gz -/Cython-0.29.10.tar.gz -/Cython-0.29.11.tar.gz -/Cython-0.29.12.tar.gz -/Cython-0.29.13.tar.gz -/Cython-0.29.14.tar.gz -/Cython-0.29.15.tar.gz -/Cython-0.29.16.tar.gz -/Cython-0.29.17.tar.gz -/Cython-0.29.19.tar.gz -/Cython-0.29.21.tar.gz -/Cython-0.29.22.tar.gz -/Cython-0.29.24.tar.gz -/Cython-0.29.26.tar.gz -/Cython-0.29.28.tar.gz -/Cython-0.29.29.tar.gz -/Cython-0.29.30.tar.gz -/Cython-0.29.32.tar.gz -/Cython-0.29.33.tar.gz -/Cython-0.29.34.tar.gz -/Cython-0.29.35.tar.gz -/Cython-3.0.0a11.tar.gz -/Cython-3.0.0b1.tar.gz -/Cython-3.0.0b2.tar.gz -/Cython-3.0.0b3.tar.gz -/Cython-3.0.0rc2.tar.gz -/Cython-3.0.0.tar.gz -/Cython-3.0.2.tar.gz -/Cython-3.0.3.tar.gz -/Cython-3.0.4.tar.gz -/Cython-3.0.5.tar.gz -/Cython-3.0.6.tar.gz -/Cython-3.0.8.tar.gz -/Cython-3.0.9.tar.gz +/Cython-*.tar.gz diff --git a/Cython.spec b/Cython.spec index 9c0274c..b46e0f2 100644 --- a/Cython.spec +++ b/Cython.spec @@ -5,7 +5,7 @@ %bcond cython_compile 1 Name: Cython -Version: 3.0.9 +Version: 3.2.4 Release: %autorelease Summary: Language for writing Python extension modules @@ -23,16 +23,15 @@ BuildRequires: python3-test # the Python tests requirements are curated manually # the test-requirements*.txt files mix in coverage and optional deps BuildRequires: python3-numpy -BuildRequires: python3-pythran %if %{undefined rhel} -# We don't want to pull in ipython to RHEL just to run more tests. -# The tests use IPython.testing.globalipapp +# We don't want to pull in the following deps to RHEL just to run more tests. +# The tests use IPython.testing.globalipapp: BuildRequires: python3-ipython+test +BuildRequires: python3-pythran # The tests requiring jedi are optional and skipped when jedi is not installed. # Note that the jedi tests were forcefully disabled a long time ago, # in https://github.com/cython/cython/issues/1845 far, far away. # We keep the dependency here so we don't forget to re-add it once the balance is restored. -# We don't want to pull in jedi to RHEL just to potentially run more tests. BuildRequires: python3-jedi %endif %endif @@ -97,21 +96,31 @@ Provides: bundled(python3dist(tempita)) %if %{with tests} %check +%if 0%{?__isa_bits} < 64 +# On 32-bit platforms, with their inherent ~4GB/process address space +# limitation, at least test_many_expressions fails due to memory exhaustion +# unless we reduce the debuginfo level (RHBZ#2339845). +export CFLAGS="${CFLAGS} -g1" +%endif + # run.pstats_profile_test* fails on Python 3.12 # https://github.com/cython/cython/issues/5470 +# run.numpy_parallel fails on i686 +# https://github.com/cython/cython/issues/6200 # run.parallel fails on i686 # https://github.com/cython/cython/issues/2807 %{python3} runtests.py -vv --no-pyregr %{?_smp_mflags} \ --exclude 'run.pstats_profile_test*' \ %ifarch %{ix86} --exclude run.parallel \ + --exclude run.numpy_parallel \ %endif %endif %files -n python3-cython -f %{pyproject_files} -%doc *.txt Demos Doc Tools +%doc README.rst CHANGES.rst USAGE.txt Demos Doc Tools %{_bindir}/cython %{_bindir}/cygdb %{_bindir}/cythonize diff --git a/plan.fmf b/plan.fmf new file mode 100644 index 0000000..890b3bb --- /dev/null +++ b/plan.fmf @@ -0,0 +1,5 @@ +discover: + how: fmf + dist-git-source: true +execute: + how: tmt diff --git a/sources b/sources index dda1595..eca0943 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (Cython-3.0.9.tar.gz) = 7899474882faab14716973783bbb46b981eab48192791acbbd06133efee83bfa9ace0e9a0272b0a44061a95ed94cdceaa98c4100f843220f5987791e36fa00e6 +SHA512 (Cython-3.2.4.tar.gz) = 5ab8e39739a79debbe89b2ff5b6d88e1b7aafd5ad34460f14f3fc2bd90c10bdc9d6aa5b5844a48e30402dde9790cb9abcba3dc2b4e8cde24c4eeee818a180099 diff --git a/tests/smoke/helloworld.pyx b/tests/smoke/helloworld.pyx new file mode 100644 index 0000000..ad35e5a --- /dev/null +++ b/tests/smoke/helloworld.pyx @@ -0,0 +1 @@ +print("Hello World") diff --git a/tests/smoke/main.fmf b/tests/smoke/main.fmf new file mode 100644 index 0000000..91811aa --- /dev/null +++ b/tests/smoke/main.fmf @@ -0,0 +1,9 @@ +summary: smoke test +test: ./runtest.sh +framework: beakerlib +require: + - gcc + - python3-devel + - python3-cython + - python3-setuptools +duration: 10m diff --git a/tests/smoke/runtest.sh b/tests/smoke/runtest.sh new file mode 100755 index 0000000..a38c525 --- /dev/null +++ b/tests/smoke/runtest.sh @@ -0,0 +1,41 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /CoreOS/Cython/Sanity/smoke +# Description: smoke test +# Author: Jan Kepler +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2017 Red Hat, Inc. +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 +set -o pipefail + +PYTHON="${PYTHON:-python3}" + +rlJournalStart + rlPhaseStartTest + rlRun "$PYTHON setup.py build_ext --inplace" 0 "Building Cython file" + rlRun "$PYTHON -c 'import helloworld' | tee output.log" 0 "Running Cython file" + rlAssertGrep "Hello World" "output.log" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd diff --git a/tests/smoke/setup.py b/tests/smoke/setup.py new file mode 100644 index 0000000..2cc6bec --- /dev/null +++ b/tests/smoke/setup.py @@ -0,0 +1,6 @@ +from setuptools import setup +from Cython.Build import cythonize + +setup( + ext_modules = cythonize("helloworld.pyx") +) diff --git a/tests/testsuite/main.fmf b/tests/testsuite/main.fmf new file mode 100644 index 0000000..608f3c9 --- /dev/null +++ b/tests/testsuite/main.fmf @@ -0,0 +1,20 @@ +summary: upstream testsuite +require: + - gcc + - gcc-c++ + - gdb + - python3-devel + - python3-test + - python3-cython + - python3-setuptools + - python3-pip + - python3-numpy + - python3-pytest + - blas-devel # for pythran + # ipython and pythran installed from PyPI, not available in RHEL + # Add ipython again when upstream resolves https://github.com/cython/cython/issues/7075 +test: | + pip install pythran==0.18.0 && + cd $(dirname $TMT_SOURCE_DIR/cython-*/tests) && + python3 runtests.py -vv --no-pyregr --exclude 'run.pstats_profile_test*' +duration: 240m