%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: 1%{?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) %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 # 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 * 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)