Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37710417
en ru br
ALT Linux repositórios
S:3.1.1-alt2

Group :: Development/Python3
RPM: python3-module-nibabel

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

%define _unpackaged_files_terminate_build 1
%define oname nibabel

%def_disable docs

Name: python3-module-%oname
Version: 3.1.1
Release: alt2

Summary: Easy access to NIfTI images from within Python
License: MIT
Group: Development/Python3
URL: http://niftilib.sf.net/pynifti/

BuildArch: noarch

# https://github.com/nipy/nibabel.git

Source: %oname-%version.tar

# git submodules

Source1: %name-%version-nibabel-data-nipy-ecattest.tar
Source2: %name-%version-nibabel-data-nitest-balls1.tar
Source3: %name-%version-nibabel-data-nitest-cifti2.tar
Source4: %name-%version-nibabel-data-nitest-dicom.tar
Source5: %name-%version-nibabel-data-nitest-freesurfer.tar
Source6: %name-%version-nibabel-data-nitest-minc2.tar
Source7: %name-%version-nibabel-data-parrec_oblique.tar

Patch1: %oname-alt-doc.patch

BuildRequires(pre): rpm-build-python3
BuildRequires: python3-module-sphinx
BuildRequires: python3-module-numpy

# https://github.com/nipy/nibabel/pull/865

%add_python3_req_skip nose.tools

Conflicts: python-module-%oname

%description
NiBabel aims to provide easy access to NIfTI images from within Python.
It uses SWIG-generated wrappers for the NIfTI reference library and
provides the nifti.image.NiftiImage class for Python-style access to the
image data.

While NiBabel is not yet complete (i.e. doesn't support everything the
C library can do), it already provides access to the most important
features of the NIfTI-1 data format and libniftiio capabilities.

%package tests
Summary: Tests for NiBabel
Group: Development/Python3
Requires: %name = %EVR

%description tests
NiBabel aims to provide easy access to NIfTI images from within Python.
It uses SWIG-generated wrappers for the NIfTI reference library and
provides the nifti.image.NiftiImage class for Python-style access to the
image data.

This package contains tests for NiBabel.

%if_enabled docs
%package doc
Summary: Documentation and examples for NiBabel
Group: Development/Documentation
BuildArch: noarch

%description doc
NiBabel aims to provide easy access to NIfTI images from within Python.
It uses SWIG-generated wrappers for the NIfTI reference library and
provides the nifti.image.NiftiImage class for Python-style access to the
image data.

This package contains documentation and examples for NiBabel.

%package pickles
Summary: Pickles for NiBabel
Group: Development/Python3

%description pickles
NiBabel aims to provide easy access to NIfTI images from within Python.
It uses SWIG-generated wrappers for the NIfTI reference library and
provides the nifti.image.NiftiImage class for Python-style access to the
image data.

This package contains pickles for NiBabel.
%endif

%prep
%setup -a1 -a2 -a3 -a4 -a5 -a6 -a7
%patch1 -p1

%if_enabled docs
sed -i 's| at PYVER at |%_python3_version|g' doc/Makefile
sed -i 's|PYTHON ?=.*|PYTHON ?= %__python3|g' doc/Makefile
sed -i 's|sphinx-build|&-3|' doc/Makefile
%endif

%build
%python3_build

%install
%python3_install

%if_enabled docs
cp -f doc/source/conf.py %buildroot%python3_sitelibdir
export PYTHONPATH=%buildroot%python3_sitelibdir
pushd doc
%make html
popd

install -d %buildroot%_docdir/%oname
cp -fR build/html %buildroot%_docdir/%oname/
cp -fR build/pickle %buildroot%python3_sitelibdir/%oname/
%endif

rm -f %buildroot%python3_sitelibdir/conf.py

%files
%doc AUTHOR Changelog COPYING
%_bindir/*
%python3_sitelibdir/*
%if_enabled docs
%exclude %python3_sitelibdir/%oname/pickle
%endif
%exclude %python3_sitelibdir/%oname/testing
%exclude %python3_sitelibdir/*/test*
%exclude %python3_sitelibdir/%oname/*/test*
%exclude %python3_sitelibdir/%oname/*/*/test*

%if_enabled docs
%files doc
%_docdir/%oname

%files pickles
%dir %python3_sitelibdir/%oname
%python3_sitelibdir/%oname/pickle
%endif

%files tests
%python3_sitelibdir/%oname/testing
%python3_sitelibdir/*/test*
%python3_sitelibdir/%oname/*/test*
%python3_sitelibdir/%oname/*/*/test*

%changelog

Todas as alterações você pod ver aqui

 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009