Dear maintainer,
That first set of patches was obviously misdirected... sorry.
The attached patches port nipype to Python 3 and stop making a Python 2
module.
However:
* I can't successfully build the package due to the debian/patches/
deb_git_hash. If I leave that in then dpkg-source cannot apply the patches.
The contents of the orig.tar.gz do not match what is in git for the file
nipype/COMMIT_INFO.txt so I do not know what was intended here.
* I can't successfully build the package in parallel and I can't figure out how
to stop parallel building with CDBS. When built with -j4 there seems to be a
race condition in building the documentation that leads to a FTBFS. It builds
OK for me with -j1.
regards
Stuart
--
Stuart Prescott http://www.nanonanonano.net/ stu...@nanonanonano.net
Debian Developer http://www.debian.org/ stu...@debian.org
GPG fingerprint 90E2 D2C1 AD14 6A1B 7EBB 891D BBC1 7EBB 1396 F2F7
>From fd8a3c9be45579118d159378041f9d55501598e6 Mon Sep 17 00:00:00 2001
From: Stuart Prescott <stu...@debian.org>
Date: Sat, 1 Feb 2020 01:25:39 +1100
Subject: [PATCH 1/3] Update dependencies for Python 3
---
debian/control | 90 +++++++++++++++++++++++------------------------
debian/pycompat | 1 -
debian/pyversions | 1 -
3 files changed, 44 insertions(+), 48 deletions(-)
delete mode 100644 debian/pycompat
delete mode 100644 debian/pyversions
diff --git a/debian/control b/debian/control
index 5edcafa79..45ae4bfcd 100644
--- a/debian/control
+++ b/debian/control
@@ -3,61 +3,59 @@ Section: science
Priority: optional
Maintainer: NeuroDebian Team <t...@neuro.debian.net>
Uploaders: Yaroslav Halchenko <deb...@onerussian.com>, Michael Hanke <michael.ha...@gmail.com>
-Build-Depends: cdbs, debhelper (>= 9), python (>= 2.6), python-setuptools (>= 0.6),
- python-concurrent.futures,
- python-sphinx (>= 0.6),
- python-dateutil (>= 2.2),
- python-numpydoc,
- python-packaging,
- python-pytest,
- python-pytest-xdist,
- python-pydot,
- python-pydotplus,
- python-click,
- python-configparser,
- python-simplejson, python-traits (>= 4.5.0) | python-traits4 (>= 4.5),
- python-scipy, python-matplotlib, python-sympy,
- python-nibabel (>= 1.0.0~), python-nitime, python-nipy (>= 0.1.2+20101206-1~),
- python-mock,
- python-networkx (>= 1.3),
- python-funcsigs,
- python-future,
- python-psutil,
- python-prov,
+Build-Depends: cdbs, debhelper (>= 9), dh-python, python3 (>= 2.6), python3-setuptools (>= 0.6),
+ python3-sphinx (>= 0.6),
+ python3-dateutil (>= 2.2),
+ python3-numpydoc,
+ python3-packaging,
+ python3-pytest,
+ python3-pytest-xdist,
+ python3-pydot,
+ python3-pydotplus,
+ python3-click,
+ python3-simplejson, python3-traits (>= 4.5.0),
+ python3-scipy, python3-matplotlib, python3-sympy,
+ python3-nibabel (>= 1.0.0~), python3-nitime, python3-nipy,
+ python3-mock,
+ python3-networkx (>= 1.3),
+ python3-funcsigs,
+ python3-future,
+ python3-psutil,
+ python3-prov,
graphviz,
- ipython (>= 1~) | ipython1x,
-Build-Conflicts: python-networkx (<=1.0~rc1~)
+ ipython3 (>= 1~) | ipython1x,
+Build-Conflicts: python3-networkx (<=1.0~rc1~)
Homepage: http://nipy.sourceforge.net/nipype/
Vcs-Git: https://salsa.debian.org/neurodebian-team/nipype.git
Vcs-Browser: https://salsa.debian.org/neurodebian-team/nipype
Standards-Version: 4.1.2
-Package: python-nipype
+Package: python3-nipype
Section: python
Architecture: all
-Depends: ${python:Depends}, ${shlibs:Depends}, ${misc:Depends},
- python-concurrent.futures,
- python-click,
- python-configparser,
- python-dateutil (>= 2.2),
- python-packaging,
- python-scipy,
- python-simplejson,
- python-traits (>= 4.5.0) | python-traits4 (>= 4.5.0),
- python-nibabel (>= 1.0.0~),
- python-networkx (>= 1.3),
- python-funcsigs,
- python-future,
- python-prov,
- python-psutil,
-Recommends: ipython, python-pytest, graphviz, python-xvfbwrapper, mayavi2,
- python-mock, python-pydotplus, python-pydot,
- python-cfflib,
-Suggests: fsl, afni, python-nipy, slicer, matlab-spm8,
- python-pyxnat, mne-python, elastix, ants,
- python-pytest-xdist, python-bids,
-Provides: ${python:Provides}
+Depends: ${python3:Depends}, ${shlibs:Depends}, ${misc:Depends},
+ python3-click,
+ python3-dateutil (>= 2.2),
+ python3-packaging,
+ python3-scipy,
+ python3-simplejson,
+ python3-traits (>= 4.5.0),
+ python3-nibabel (>= 1.0.0~),
+ python3-networkx (>= 1.3),
+ python3-funcsigs,
+ python3-future,
+ python3-prov,
+ python3-psutil,
+Recommends: ipython3, python3-pytest, graphviz, python3-xvfbwrapper, mayavi2,
+ python3-mock, python3-pydotplus, python3-pydot,
+ python3-cfflib,
+Suggests: fsl, afni, python3-nipy, slicer, matlab-spm8,
+ python3-pyxnat, python3-mne, elastix, ants,
+ python3-pytest-xdist, python3-bids,
+Provides: ${python3:Provides}
+Breaks: python-nipype
+Replaces: python-nipype
Description: Neuroimaging data analysis pipelines in Python
Nipype interfaces Python to other neuroimaging packages and creates
an API for specifying a full analysis pipeline in Python. Currently,
diff --git a/debian/pycompat b/debian/pycompat
deleted file mode 100644
index 0cfbf0888..000000000
--- a/debian/pycompat
+++ /dev/null
@@ -1 +0,0 @@
-2
diff --git a/debian/pyversions b/debian/pyversions
deleted file mode 100644
index 0c043f18c..000000000
--- a/debian/pyversions
+++ /dev/null
@@ -1 +0,0 @@
-2.6-
--
2.20.1
>From a8fb1e5979531063b4e3764e202e1b57586bff37 Mon Sep 17 00:00:00 2001
From: Stuart Prescott <stu...@debian.org>
Date: Sat, 1 Feb 2020 01:26:44 +1100
Subject: [PATCH 2/3] Update code for Python 3
---
debian/patches/python3-docs.patch | 32 ++
debian/patches/python3-shebangs.patch | 408 ++++++++++++++++++++++++++
debian/patches/series | 2 +
3 files changed, 442 insertions(+)
create mode 100644 debian/patches/python3-docs.patch
create mode 100644 debian/patches/python3-shebangs.patch
diff --git a/debian/patches/python3-docs.patch b/debian/patches/python3-docs.patch
new file mode 100644
index 000000000..465ff0fa5
--- /dev/null
+++ b/debian/patches/python3-docs.patch
@@ -0,0 +1,32 @@
+--- a/doc/Makefile
++++ b/doc/Makefile
+@@ -11,6 +11,8 @@
+ PAPEROPT_letter = -D latex_paper_size=letter
+ ALLSPHINXOPTS = -d _build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+
++PYTHON ?= python
++
+ .PHONY: help clean html api htmlonly latex changes linkcheck doctest
+
+ help:
+@@ -35,9 +37,9 @@
+
+ api:
+ rm -rf api/generated
+- python -u ../tools/build_modref_templates.py
++ $(PYTHON) -u ../tools/build_modref_templates.py
+ rm -rf interfaces/generated
+- python -u ../tools/build_interface_docs.py
++ $(PYTHON) -u ../tools/build_interface_docs.py
+ @echo "Build API docs finished."
+
+ html: clean examples2rst api htmlonly
+@@ -76,7 +78,7 @@
+ "results in _build/doctest/output.txt."
+
+ gitwash-update:
+- python -u ../tools/gitwash_dumper.py devel nipype \
++ $(PYTHON) -u ../tools/gitwash_dumper.py devel nipype \
+ --repo-name=nipype \
+ --github-user=nipy \
+ --project-url=http://nipy.org/nipype \
diff --git a/debian/patches/python3-shebangs.patch b/debian/patches/python3-shebangs.patch
new file mode 100644
index 000000000..3c8dae7bf
--- /dev/null
+++ b/debian/patches/python3-shebangs.patch
@@ -0,0 +1,408 @@
+--- a/doc/sphinxext/autosummary_generate.py
++++ b/doc/sphinxext/autosummary_generate.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
+ # vi: set ft=python sts=4 ts=4 sw=4 et:
+ r"""
+--- a/examples/dmri_camino_dti.py
++++ b/examples/dmri_camino_dti.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ """
+ =================
+ dMRI: Camino, DTI
+--- a/examples/dmri_connectivity.py
++++ b/examples/dmri_connectivity.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ """
+ =============================================
+ dMRI: Connectivity - Camino, CMTK, FreeSurfer
+--- a/examples/dmri_connectivity_advanced.py
++++ b/examples/dmri_connectivity_advanced.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ """
+ =============================================
+ dMRI: Connectivity - MRtrix, CMTK, FreeSurfer
+--- a/examples/dmri_dtk_dti.py
++++ b/examples/dmri_dtk_dti.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ """
+ ==================================
+ dMRI: DTI - Diffusion Toolkit, FSL
+--- a/examples/dmri_dtk_odf.py
++++ b/examples/dmri_dtk_odf.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ """
+ ====================================
+ dMRI: HARDI - Diffusion Toolkit, FSL
+--- a/examples/dmri_fsl_dti.py
++++ b/examples/dmri_fsl_dti.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ """
+ ==============
+ dMRI: DTI, FSL
+--- a/examples/dmri_mrtrix_dti.py
++++ b/examples/dmri_mrtrix_dti.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ """
+ =======================
+ dMRI: DTI - MRtrix, FSL
+--- a/examples/dmri_tbss_nki.py
++++ b/examples/dmri_tbss_nki.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
+ # vi: set ft=python sts=4 ts=4 sw=4 et:
+ """
+--- a/examples/fmri_ants_openfmri.py
++++ b/examples/fmri_ants_openfmri.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
+ # vi: set ft=python sts=4 ts=4 sw=4 et:
+ """
+--- a/examples/fmri_freesurfer_smooth.py
++++ b/examples/fmri_freesurfer_smooth.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
+ # vi: set ft=python sts=4 ts=4 sw=4 et:
+ """
+--- a/examples/fmri_fsl.py
++++ b/examples/fmri_fsl.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
+ # vi: set ft=python sts=4 ts=4 sw=4 et:
+ """
+--- a/examples/fmri_fsl_feeds.py
++++ b/examples/fmri_fsl_feeds.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
+ # vi: set ft=python sts=4 ts=4 sw=4 et:
+ """
+--- a/examples/fmri_fsl_reuse.py
++++ b/examples/fmri_fsl_reuse.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
+ # vi: set ft=python sts=4 ts=4 sw=4 et:
+ """
+--- a/examples/fmri_nipy_glm.py
++++ b/examples/fmri_nipy_glm.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
+ # vi: set ft=python sts=4 ts=4 sw=4 et:
+ """
+--- a/examples/fmri_slicer_coregistration.py
++++ b/examples/fmri_slicer_coregistration.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
+ # vi: set ft=python sts=4 ts=4 sw=4 et:
+ """
+--- a/examples/fmri_spm.py
++++ b/examples/fmri_spm.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
+ # vi: set ft=python sts=4 ts=4 sw=4 et:
+ """
+--- a/examples/fmri_spm_auditory.py
++++ b/examples/fmri_spm_auditory.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
+ # vi: set ft=python sts=4 ts=4 sw=4 et:
+ """
+--- a/examples/fmri_spm_dartel.py
++++ b/examples/fmri_spm_dartel.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
+ # vi: set ft=python sts=4 ts=4 sw=4 et:
+ """
+--- a/examples/fmri_spm_face.py
++++ b/examples/fmri_spm_face.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
+ # vi: set ft=python sts=4 ts=4 sw=4 et:
+ """
+--- a/examples/fmri_spm_nested.py
++++ b/examples/fmri_spm_nested.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
+ # vi: set ft=python sts=4 ts=4 sw=4 et:
+ """
+--- a/examples/rsfmri_vol_surface_preprocessing.py
++++ b/examples/rsfmri_vol_surface_preprocessing.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
+ # vi: set ft=python sts=4 ts=4 sw=4 et:
+ """
+--- a/examples/rsfmri_vol_surface_preprocessing_nipy.py
++++ b/examples/rsfmri_vol_surface_preprocessing_nipy.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ """
+ =====================================
+ rsfMRI: ANTS, FS, FSL, NiPy, aCompCor
+--- a/examples/smri_ants_build_template.py
++++ b/examples/smri_ants_build_template.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
+ # vi: set ft=python sts=4 ts=4 sw=4 et:
+ """
+--- a/examples/smri_ants_registration.py
++++ b/examples/smri_ants_registration.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
+ # vi: set ft=python sts=4 ts=4 sw=4 et:
+ """
+--- a/examples/smri_antsregistration_build_template.py
++++ b/examples/smri_antsregistration_build_template.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
+ # vi: set ft=python sts=4 ts=4 sw=4 et:
+ """
+--- a/examples/smri_cbs_skullstripping.py
++++ b/examples/smri_cbs_skullstripping.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
+ # vi: set ft=python sts=4 ts=4 sw=4 et:
+ """
+--- a/examples/smri_freesurfer.py
++++ b/examples/smri_freesurfer.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ """
+ ================
+ sMRI: FreeSurfer
+--- a/examples/smri_fsreconall.py
++++ b/examples/smri_fsreconall.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ """
+ ================
+ sMRI: FSReconAll
+--- a/examples/tessellation_tutorial.py
++++ b/examples/tessellation_tutorial.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ """
+ =================================================
+ sMRI: Regional Tessellation and Surface Smoothing
+--- a/nipype/algorithms/tests/test_ErrorMap.py
++++ b/nipype/algorithms/tests/test_ErrorMap.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+
+ import pytest
+--- a/nipype/algorithms/tests/test_Overlap.py
++++ b/nipype/algorithms/tests/test_Overlap.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
+ # vi: set ft=python sts=4 ts=4 sw=4 et:
+--- a/nipype/algorithms/tests/test_confounds.py
++++ b/nipype/algorithms/tests/test_confounds.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+ import os
+
+--- a/nipype/algorithms/tests/test_splitmerge.py
++++ b/nipype/algorithms/tests/test_splitmerge.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+
+ from nipype.testing import example_data
+--- a/nipype/external/fsl_imglob.py
++++ b/nipype/external/fsl_imglob.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # imglob - expand list of image filenames
+ # Stephen Smith, Mark Jenkinson & Matthew Webster FMRIB Image Analysis Group
+ # Copyright (C) 2009 University of Oxford
+--- a/nipype/interfaces/base/tests/test_resource_monitor.py
++++ b/nipype/interfaces/base/tests/test_resource_monitor.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
+ # vi: set ft=python sts=4 ts=4 sw=4 et:
+--- a/nipype/interfaces/fsl/possum.py
++++ b/nipype/interfaces/fsl/possum.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
+ # vi: set ft=python sts=4 ts=4 sw=4 et:
+--- a/nipype/pipeline/engine/__init__.py
++++ b/nipype/pipeline/engine/__init__.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
+ # vi: set ft=python sts=4 ts=4 sw=4 et:
+--- a/nipype/pipeline/engine/base.py
++++ b/nipype/pipeline/engine/base.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
+ # vi: set ft=python sts=4 ts=4 sw=4 et:
+--- a/nipype/pipeline/engine/workflows.py
++++ b/nipype/pipeline/engine/workflows.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
+ # vi: set ft=python sts=4 ts=4 sw=4 et:
+--- a/nipype/scripts/cli.py
++++ b/nipype/scripts/cli.py
+@@ -1,4 +1,4 @@
+-#!python
++#!python3
+ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
+ # vi: set ft=python sts=4 ts=4 sw=4 et:
+ from io import open
+--- a/nipype/sphinxext/__init__.py
++++ b/nipype/sphinxext/__init__.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
+ # vi: set ft=python sts=4 ts=4 sw=4 et:
+--- a/nipype/sphinxext/plot_workflow.py
++++ b/nipype/sphinxext/plot_workflow.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
+ # vi: set ft=python sts=4 ts=4 sw=4 et:
+--- a/nipype/utils/tests/test_cmd.py
++++ b/nipype/utils/tests/test_cmd.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ from __future__ import (print_function, division, unicode_literals,
+ absolute_import)
+
+--- a/nipype/utils/tests/use_resources
++++ b/nipype/utils/tests/use_resources
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ #
+ # use_resources
+ '''
+--- a/setup.py
++++ b/setup.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
+ # vi: set ft=python sts=4 ts=4 sw=4 et:
+ """Nipype : Neuroimaging in Python pipelines and interfaces package.
+--- a/tools/build_interface_docs.py
++++ b/tools/build_interface_docs.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
+ # vi: set ft=python sts=4 ts=4 sw=4 et:
+ """Script to auto-generate interface docs.
+--- a/tools/build_modref_templates.py
++++ b/tools/build_modref_templates.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
+ # vi: set ft=python sts=4 ts=4 sw=4 et:
+ """Script to auto-generate our API docs.
+--- a/tools/ex2rst
++++ b/tools/ex2rst
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ #
+ # Note: this file is copied (possibly with minor modifications) from the
+ # sources of the PyMVPA project - http://pymvpa.org. It remains licensed as
+--- a/tools/gitwash_dumper.py
++++ b/tools/gitwash_dumper.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ ''' Checkout gitwash repo into directory and do search replace on name '''
+ from __future__ import (print_function, division, unicode_literals,
+ absolute_import)
+--- a/tools/make_examples.py
++++ b/tools/make_examples.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ """Run the py->rst conversion and run all examples.
+
+ This also creates the index.rst file appropriately, makes figures, etc.
diff --git a/debian/patches/series b/debian/patches/series
index 06f6b6381..9e1b9840b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,5 @@
+python3-docs.patch
+python3-shebangs.patch
deb_skip_doctest_pybids
deb_simplify_requires
deb_no_explicit_pydot
--
2.20.1
>From a6b03cf0606aa245f550b349ff3a93eb8f10041f Mon Sep 17 00:00:00 2001
From: Stuart Prescott <stu...@debian.org>
Date: Sat, 1 Feb 2020 01:27:24 +1100
Subject: [PATCH 3/3] Update rules for Python 3
---
debian/rules | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/debian/rules b/debian/rules
index 15d0492f7..52017506f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,24 +2,25 @@
# -*- mode: makefile; coding: utf-8 -*-
include /usr/share/cdbs/1/rules/debhelper.mk
-DEB_PYTHON_MODULE_PACKAGE = python-nipype
-DEB_PYTHON_MODULE_PACKAGES = python-nipype
+DEB_PYTHON_MODULE_PACKAGE = python3-nipype
+DEB_PYTHON_MODULE_PACKAGES = python3-nipype
include /usr/share/cdbs/1/class/python-distutils.mk
-DEB_DESTDIR = $(CURDIR)/debian/python-nipype
+DEB_DESTDIR = $(CURDIR)/debian/python3-nipype
export HOME=$(CURDIR)/build
-PYVERS = $(shell pyversions -vr)
-PYVER = $(shell pyversions -vd)
+PYVERS = $(shell py3versions -vr)
+PYVER = $(shell py3versions -vd)
+export PYTHON=python3
-IPYTHONVER := $(shell ipython -V || echo 0) # recent only needed for sphinxext
+IPYTHONVER := $(shell ipython3 -V || echo 0) # recent only needed for sphinxext
IPYTHONPATH := $(shell dpkg --compare-versions $(IPYTHONVER) lt 1 \
&& echo ":/usr/lib/python$(PYVER)/dist-packages/IPython1X" || echo '')
# just to prevent useless complaints
export FSLOUTPUTTYPE=NIFTI_GZ
-build/python-nipype::
+build/python3-nipype::
mkdir -p build
echo "backend : Agg" >| build/matplotlibrc
/bin/ls doc/changelog/*changelog | tac | xargs cat >| debian/nipype.changelog
@@ -28,7 +29,7 @@ build/python-nipype::
# Documentation
#
doc: doc-stamp
-doc-stamp: build/python-nipype
+doc-stamp: build/python3-nipype
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
: # TODO: We need to set matplotlib backend to Agg before building...
export PYTHONPATH=$$PWD$(IPYTHONPATH) MPLCONFIGDIR=$(CURDIR)/build; cd doc; LC_ALL=C.UTF-8 $(MAKE) html
@@ -37,11 +38,12 @@ endif
build/python-nipype-doc:: doc
-install/python-nipype::
+# TODO: the test should be run for all py3versions -s
+install/python3-nipype::
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
export PYTHONPATH=`/bin/ls -d $(DEB_DESTDIR)/usr/lib/python$(cdbs_python_current_version)/*-packages`$(IPYTHONPATH); \
cd build && \
- MPLCONFIGDIR=$(CURDIR)/build LC_ALL=C.UTF-8 py.test -v --doctest-modules ../nipype
+ MPLCONFIGDIR=$(CURDIR)/build LC_ALL=C.UTF-8 py.test-3 -v --doctest-modules ../nipype
# test_mesh_ops needs X for bloody tvtk.api, and then fails anyways with current mayavi2/tvtk:
# https://github.com/nipy/nipype/issues/1218, so skipping it for now
endif
--
2.20.1