diff --git a/.gitignore b/.gitignore index 223e8ee..a410c2a 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /python-dipy-1.2.0.tar.gz /python-dipy-1.3.0.tar.gz /python-dipy-1.4.0.tar.gz +/dipy-1.4.1.tar.gz diff --git a/python-dipy.spec b/python-dipy.spec index 4433f5a..3899ceb 100644 --- a/python-dipy.spec +++ b/python-dipy.spec @@ -1,6 +1,3 @@ -# No py3 since it depends on nibabel which we only provide for py3 -%global srcname dipy - %global desc %{expand: \ DIPY is a python toolbox for analysis of MR diffusion imaging. DIPY is for research only; please do not use results from DIPY for clinical @@ -12,52 +9,46 @@ Current information can always be found from the DIPY website - http://dipy.org} # upstream documentation %bcond_with docs -# Fail because of xvfb related errors +# Fail because of xvfb related errors, also still depends on nose %bcond_with tests -%{?python_enable_dependency_generator} +%global forgeurl https://github.com/nipy/dipy/ -Name: python-%{srcname} -Version: 1.4.0 -Release: 3%{?dist} +Name: python-dipy +Version: 1.4.1 +Release: %autorelease Summary: Diffusion MRI utilities in python +%global tag %{version} +%forgemeta + + License: BSD URL: http://nipy.org/dipy/ -Source0: https://github.com/nipy/dipy/archive/%{version}/%{name}-%{version}.tar.gz +Source0: %forgesource %description %{desc} -%package -n python3-%{srcname} +%package -n python3-dipy Summary: %{summary} BuildRequires: python3-devel BuildRequires: gcc -BuildRequires: %{py3_dist setuptools} -BuildRequires: %{py3_dist pytest} -BuildRequires: %{py3_dist Cython} -BuildRequires: %{py3_dist numpy} >= 1.7.1 -BuildRequires: %{py3_dist scipy} >= 0.9 -BuildRequires: %{py3_dist tqdm} -BuildRequires: %{py3_dist nibabel} >= 3.0 -BuildRequires: %{py3_dist h5py} >= 2.4 -BuildRequires: %{py3_dist matplotlib} %if %{with tests} BuildRequires: %{py3_dist xvfbwrapper} BuildRequires: xorg-x11-server-Xvfb +# Not mentioned in setup scripts +BuildRequires: %{py3_dist nose} +# Not mentioned in build scripts +BuildRequires: %{py3_dist pytest} %endif -Requires: %{py3_dist h5py} >= 2.4 -Requires: %{py3_dist nibabel} >= 2.3 -Requires: %{py3_dist scipy} >= 0.9 -Requires: %{py3_dist numpy} >= 1.7.1 +Suggests: %{py3_dist ipython} # Required for some modules but not in Fedora yet # BuildRequires: %%{py3_dist cvxpy} -Suggests: %{py3_dist ipython} -%py_provides python3-%{srcname} -%description -n python3-%{srcname} +%description -n python3-dipy %{desc} %package doc @@ -69,7 +60,7 @@ Documentation for %{name}. %prep -%autosetup -n %{srcname}-%{version} +%forgesetup export TEST_WITH_XVFB=true # clean it all up (from the Makefile) find . -name "*.so" -print -delete @@ -87,16 +78,19 @@ sed -i 's/#!\/usr\/bin\/env python/#!\/usr\/bin\/python3/' doc/tools/build_modre find tools/ -name "*.py" -exec sed -i 's/#!\/usr\/bin\/env python/#!\/usr\/bin\/python3/' '{}' \; # Other shebangs and permission fixes -for f in "dipy/boots/resampling.py" "dipy/reconst/benchmarks/bench_csd.py" "dipy/reconst/dki.py" "dipy/reconst/dti.py" "dipy/workflows/mask.py" "dipy/workflows/tracking.py" "dipy/reconst/dki_micro.py" +for f in "dipy/boots/resampling.py" "dipy/reconst/benchmarks/bench_csd.py" "dipy/reconst/dki.py" "dipy/reconst/dti.py" "dipy/workflows/mask.py" "dipy/workflows/tracking.py" "dipy/reconst/dki_micro.py" "dipy/reconst/msdki.py" "dipy/workflows/tests/test_stats.py" do chmod -x "$f" sed -i '/^#!\/usr\/bin\/env python/ d' "$f" sed -i '/^#!\/usr\/bin\/python/ d' "$f" done +%generate_buildrequires +%pyproject_buildrequires -r + %build export TEST_WITH_XVFB=true -%py3_build +%pyproject_wheel %if %{with docs} pushd doc @@ -108,16 +102,17 @@ popd %endif %install -%py3_install +%pyproject_install +%pyproject_save_files dipy %check export TEST_WITH_XVFB=True %if %{with tests} +export PYTHONPATH="%{buildroot}%{python3_sitearch}:%{buildroot}%{python3_sitelib}" %{__python3} -c 'import dipy; dipy.test()' %endif -%files -n python3-%{srcname} -%license LICENSE +%files -n python3-dipy -f %{pyproject_files} %doc README.rst Changelog AUTHOR %{_bindir}/dipy_align_affine %{_bindir}/dipy_align_syn @@ -149,18 +144,18 @@ export TEST_WITH_XVFB=True %{_bindir}/dipy_track %{_bindir}/dipy_track_pft %{_bindir}/dipy_split -%{python3_sitearch}/%{srcname} -%{python3_sitearch}/%{srcname}-%{version}-py%{python3_version}.egg-info %files doc %license LICENSE # Installed by package -%{_docdir}/%{srcname}/examples +%{_docdir}/dipy/examples %if %{with docs} %doc doc/_build/html %endif %changelog +%autochangelog + * Tue Jul 27 2021 Fedora Release Engineering - 1.4.0-3 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild diff --git a/sources b/sources index ff954bd..658eb94 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (python-dipy-1.4.0.tar.gz) = 26ceeff9e5782ef182a2eec536213816627cbf7712f33297a320477150d80d92a9dff7572ff2410cc1b526fca723a4f6a4896854869b8a7b197ec4ea65d2d410 +SHA512 (dipy-1.4.1.tar.gz) = 37fc16aff2265eb15249f136facf7dfd3b34e04ee2887eaafac8854bd7d752e52c3fbfd1ee681be9f833fd4cfeb4591537cbf4eed11d8a7f75ed3281a88387ce