%bcond tests 0 # Lower build type safety to level 1 to avoid -Wint-conversion turning into an error %global build_type_safety_c 1 %global pypi_name nipy Name: python-%{pypi_name} Version: 0.6.1 Release: 7%{?dist} Epoch: 1 Summary: Neuroimaging in Python FMRI analysis package License: BSD-3-Clause URL: https://nipy.org/nipy Source0: https://github.com/nipy/%{pypi_name}/archive/%{version}/%{pypi_name}-%{version}.tar.gz # Hand-written man pages (groff_man) from Fedora dist-git Source10: nipy_3dto4d.1 Source11: nipy_4d_realign.1 Source12: nipy_4dto3d.1 Source13: nipy_diagnose.1 Source14: nipy_tsdiffana.1 # Drop i686 (leaf package) ExcludeArch: %{ix86} BuildRequires: python3-devel BuildRequires: gcc BuildRequires: pkgconfig(flexiblas) # nipy.testing imports pytest at module level, and %%pyproject_check_import pulls # it transitively even with the -e exclusion; make pytest available at %%check. BuildRequires: python3-pytest %global _docdir_fmt %{name} %global common_description %{expand: Neuroimaging tools for Python. The aim of NIPY is to produce a platform-independent Python environment for the analysis of functional brain imaging data using an open development model. In NIPY we aim to: * Provide an open source, mixed language scientific programming environment suitable for rapid development. * Create software components to make it easy to develop tools for MRI, EEG, PET and other modalities. * Create and maintain a wide base of developers to contribute to this platform. * Maintain and develop this framework as a single, easily installable bundle.} %description %{common_description} %package -n python3-%{pypi_name} Summary: %{summary} # Optional extra provides matplotlib (plotting) Recommends: python3dist(nipy+optional) # The nipy.algorithms.statistics.models subpackage was forked from an # undetermined version of scipy.stats.models in commit 55a9162 on 2011-09-13. Provides: bundled(python3dist(scipy)) %description -n python3-%{pypi_name} %{common_description} %pyproject_extras_subpkg -n python3-%{pypi_name} optional %prep %autosetup -n %{pypi_name}-%{version} -p1 # Remove bundled lapack_lite: rm -rvf lib/lapack_lite/ sed -r -i 's/^.*lapack_lite/# &/' lib/meson.build sed -r -i 's/^#(external *= *)(False|0)/\1True/' setup.cfg || true # Remove ninja from build requirements (Fedora has system ninja-build) sed -r -i '/ninja/d' pyproject.toml # Use flexiblas instead of openblas sed -r -i 's/openblas/flexiblas/' nipy/labs/meson.build # NumPy 2.0 dropped the old NPY_* array-flag aliases (renamed to NPY_ARRAY_* in # numpy 1.7). nipy's fff C wrapper still uses the legacy spellings -> FTBFS with # "NPY_OWNDATA undeclared". Rename to the 2.x names. sed -r -i \ -e 's/\bNPY_OWNDATA\b/NPY_ARRAY_OWNDATA/g' \ -e 's/\bNPY_CONTIGUOUS\b/NPY_ARRAY_C_CONTIGUOUS/g' \ -e 's/\bNPY_BEHAVED\b/NPY_ARRAY_BEHAVED/g' \ lib/fff_python_wrapper/fffpy.c lib/fff_python_wrapper/fffpy.h # Remove pre-generated Cython C sources (should not exist in a tag, defensive) grep -FrlI 'Generated by Cython' . | xargs -r rm -vf %py3_shebang_fix nipy examples cp -p nipy/algorithms/statistics/models/LICENSE.txt scipy-LICENSE.txt # Drop pytest-cov from extras (Fedora linter policy) sed -i '/pytest-cov/d' pyproject.toml # Remove VCS artifact rm -vf examples/.gitignore %generate_buildrequires %pyproject_buildrequires -p -x optional%{?with_tests:,test} %build %pyproject_wheel %install %pyproject_install %pyproject_save_files %{pypi_name} install -t '%{buildroot}%{_mandir}/man1' -m 0644 -p -D \ '%{SOURCE10}' '%{SOURCE11}' '%{SOURCE12}' '%{SOURCE13}' '%{SOURCE14}' %check %pyproject_check_import -e '*.test*' %if %{with tests} mkdir -p for_testing cd for_testing export FLEXIBLAS=netlib # Skip tests failing with Python 3.13 (upstream issue #576) k="${k-}${k+ and }not test_dtype_cmap_inverses" k="${k-}${k+ and }not test_cmap_coord_types" %pytest -v --doctest-plus --ignore-glob='__config__.py' -k "${k-}" --pyargs nipy %endif %files -n python3-%{pypi_name} -f %{pyproject_files} %license LICENSE %license scipy-LICENSE.txt %doc README.rst %{_bindir}/nipy_3dto4d %{_bindir}/nipy_4d_realign %{_bindir}/nipy_4dto3d %{_bindir}/nipy_diagnose %{_bindir}/nipy_tsdiffana %{_mandir}/man1/nipy_3dto4d.1* %{_mandir}/man1/nipy_4d_realign.1* %{_mandir}/man1/nipy_4dto3d.1* %{_mandir}/man1/nipy_diagnose.1* %{_mandir}/man1/nipy_tsdiffana.1* %changelog * Mon Oct 05 2026 Morgan Hough - 1:0.6.1-7 - Release 7, for two reasons, and no source change since -3. - THE -3 REBUILD WAS NEVER PUBLISHED. -3 (rebuild for f45's numpy and Python 3.15; the -2 compiled extensions SIGSEGV on import) was committed at 16:26 on 2026-09-28, and the build meant to deliver it (COPR 11046695) ended two minutes later with an SRPM versioned 1:0.6.1-2: COPR cloned the repo before the push resolved and built the OLD spec. Every one of the six chroots has served -2 since. The same-NVR rebuild reached nobody. That was recorded as "submitted" without checking what published. - Fedora's fedora-obsolete-packages obsoletes python3-nipy < 1:0.6.1-5 (f44) and < 1:0.6.1-6 (f45, rawhide). -2 is below both, so dnf treats it as obsoleted: `dnf install python3-nipy` can return 0 having installed nothing. -7 is above both. Found by comparing every published package against that list; biofedora had the same defect in python-fuzzywuzzy and python-toposort. * Mon Sep 28 2026 Morgan Hough - 0.6.1-3 - Rebuild for f45's current numpy/Python 3.15. The previous build's compiled extensions SIGSEGV on f45 inside their own module init, found by importing every compiled module one subprocess each (all 14 extensions, e.g. nipy.algorithms.registration._registration). Same class as python-surfa 0.6.3-3 and python-vispy 0.16.2-2 today: a numpy/Cython ABI change moves no soname, so rpm dependencies are satisfied and the package fails only at load. Nothing we gate on can see it -- %check ran at BUILD time and passed, and the environment moved afterwards. - Note the top-level import is NOT enough to detect this: `import nipy` returns 0 because the package __init__ never loads the extension. Only importing the submodule that owns the .so trips it, which is why an earlier top-level-only sweep of mine missed this package entirely. * Wed Jun 17 2026 Morgan Hough - 1:0.6.1-2 - Fix NumPy 2.0 FTBFS in the fff C wrapper: rename the legacy array-flag aliases removed in numpy 2.0 (NPY_OWNDATA/NPY_CONTIGUOUS/NPY_BEHAVED) to their NPY_ARRAY_* spellings. (The 5 nipy_*.1 man-page Sources are now also committed to the repo, fixing the prior SCM source-stage failure.) - Add BuildRequires python3-pytest: %pyproject_check_import transitively imports nipy.testing (which imports pytest) at %check. * Sun May 31 2026 Morgan Hough - 1:0.6.1-1 - Initial COPR packaging of nipy 0.6.1 (adopted from orphaned Fedora python-nipy)