From: Michael R. Crusoe <crusoe@debian.org>
Subject: ensure all calls to a python executable are to `python3`
--- dipy.orig/dipy/core/profile.py
+++ dipy/dipy/core/profile.py
@@ -63,7 +63,7 @@
             print('ext', ext)
             if ext in ('.py', '.pyx'):  # python/cython file
                 print('profiling python/cython file ...')
-                subprocess.call(['python', '-m', 'cProfile',
+                subprocess.call(['python3', '-m', 'cProfile',
                                  '-o', 'profile.prof', call])
                 s = pstats.Stats('profile.prof')
                 stats = s.strip_dirs().sort_stats('time')
--- dipy.orig/doc/Makefile
+++ dipy/doc/Makefile
@@ -47,7 +47,7 @@
 	-cd examples_built && find . -not -name "README" -not -name ".gitignore" -exec rm -rfd {} \; || true
 
 gitwash-update:
-	python ../tools/gitwash_dumper.py devel dipy --repo-name=dipy --github-user=dipy \
+	python3 ../tools/gitwash_dumper.py devel dipy --repo-name=dipy --github-user=dipy \
             --project-url=https://dipy.org \
             --project-ml-url=https://mail.python.org/mailman/listinfo/neuroimaging
 
--- dipy.orig/doc/devel/installation_from_source.rst
+++ dipy/doc/devel/installation_from_source.rst
@@ -88,8 +88,8 @@
 
 ::
 
-    sudo apt-get install python-dev python-setuptools
-    sudo apt-get install python-numpy python-scipy
+    sudo apt-get install python3-dev python3-setuptools
+    sudo apt-get install python3-numpy python3-scipy
     sudo apt-get install cython
 
 then::
@@ -101,7 +101,7 @@
 
 You might want the optional packages too (highly recommended)::
 
-    sudo apt-get install ipython python-h5py python-vtk python-matplotlib
+    sudo apt-get install ipython python3-h5py python3-vtk python3-matplotlib
 
 
 Now follow :ref:`install-source-nix`.
@@ -123,7 +123,7 @@
 
 For getting this information, type this command in shell like ``cmd`` or Powershell_::
 
-    python -c "import platform;print(platform.python_compiler())"
+    python3 -c "import platform;print(platform.python_compiler())"
 
 This command should print information of this form::
 
@@ -274,7 +274,7 @@
 the virtual environment where ``DIPY`` lives. This can be solved by specifying
 the path to the ``Sphinx`` package in the virtual environment::
 
-    make html SPHINXBUILD='python <path_to_sphinx>/sphinx-build'
+    make html SPHINXBUILD='python3 <path_to_sphinx>/sphinx-build'
 
 
-.. include:: ../links_names.inc
\ No newline at end of file
+.. include:: ../links_names.inc
--- dipy.orig/doc/devel/make_release.rst
+++ dipy/doc/devel/make_release.rst
@@ -22,7 +22,7 @@
 * Generate, Review and update the release notes. Run the following command from
   the root directory of DIPY::
 
-    python tools/github_stats.py 1.7.0 > doc/release_notes/release1.8.rst
+    python3 tools/github_stats.py 1.7.0 > doc/release_notes/release1.8.rst
 
   where ``1.7.0`` was the last release tag name.
 
@@ -66,7 +66,7 @@
 
     make distclean
     git clean -fxd
-    python -m build  or  pip install --no-build-isolation  -e .
+    python3 -m build  or  pip install --no-build-isolation  -e .
 
 * Make sure all tests pass on your local machine (from the ``<dipy root>`` directory)::
 
--- dipy.orig/tools/pythonsudo
+++ dipy/tools/pythonsudo
@@ -7,10 +7,10 @@
 PYV=$1
 WORKON_HOME=/Users/mb312/.virtualenvs
 PYPATH=/Library/Frameworks/Python.framework/Versions/2.$PYV/bin
-VENV=$WORKON_HOME/python2$PYV
-VENV_LIB=$VENV/lib/python2.$PYV/site-packages
+VENV=$WORKON_HOME/python3$PYV
+VENV_LIB=$VENV/lib/python3.$PYV/site-packages
 export PATH=$PYPATH:$PATH:$VENV/bin
-export PYTHONPATH=$VENV_LIB:$VENV_LIB/Cython-0.14.1-py2.$PYV-macosx-10.3-i386.egg:/Users/mb312/.virtualenvs/python2$PYV/lib/python2.$PYV/site-packages/nibabel-1.0.0-py2.$PYV.egg
+export PYTHONPATH=$VENV_LIB:$VENV_LIB/Cython-0.14.1-py2.$PYV-macosx-10.3-i386.egg:/Users/mb312/.virtualenvs/python3$PYV/lib/python3.$PYV/site-packages/nibabel-1.0.0-py2.$PYV.egg
 export CC=/usr/bin/gcc-4.0
 export CXX=/usr/bin/g++-4.0
 bash
--- dipy.orig/tools/toollib.py
+++ dipy/tools/toollib.py
@@ -37,7 +37,7 @@
 # import compileall and then get dir os.path.split
 def compile_tree():
     """Compile all Python files below current directory."""
-    stat = os.system('python -m compileall .')
+    stat = os.system('python3 -m compileall .')
     if stat:
         msg = '*** ERROR: Some Python files in tree do NOT compile! ***\n'
         msg += 'See messages above for the actual file that produced it.\n'
--- dipy.orig/.github/ISSUE_TEMPLATE.md
+++ dipy/.github/ISSUE_TEMPLATE.md
@@ -9,13 +9,13 @@
 [If reporting a bug, please include the following important information:]
 - [ ] Code example
 - [ ] Relevant images (if any)
-- [ ] Operating system and version (run `python -c "import platform; print(platform.platform())"`)
-- [ ] Python version (run `python -c "import sys; print('Python', sys.version)"`)
-- [ ] dipy version (run `python -c "import dipy; print(dipy.__version__)"`)
+- [ ] Operating system and version (run `python3 -c "import platform; print(platform.platform())"`)
+- [ ] Python version (run `python3 -c "import sys; print('Python', sys.version)"`)
+- [ ] dipy version (run `python3 -c "import dipy; print(dipy.__version__)"`)
 - [ ] dependency version (numpy, scipy, nibabel, h5py, cvxpy, fury)
-    * import numpy; print("NumPy", numpy.__version__)
-    * import scipy; print("SciPy", scipy.__version__)
-    * import nibabel; print("Nibabel", nibabel.__version__)
-    * import h5py; print("H5py", h5py.__version__)
-    * import cvxpy; print("Cvxpy", cvxpy.__version__)
-    * import fury; print("fury", fury.__version__)
+    * `import numpy; print("NumPy", numpy.__version__)`
+    * `import scipy; print("SciPy", scipy.__version__)`
+    * `import nibabel; print("Nibabel", nibabel.__version__)`
+    * `import h5py; print("H5py", h5py.__version__)`
+    * `import cvxpy; print("Cvxpy", cvxpy.__version__)`
+    * `import fury; print("fury", fury.__version__)`
--- dipy.orig/Makefile
+++ dipy/Makefile
@@ -3,7 +3,7 @@
 # the setup.py file, this Makefile is just meant as a command
 # convenience/reminder while doing development.
 
-PYTHON ?= python
+PYTHON ?= python3
 PKGDIR=dipy
 DOCSRC_DIR=doc
 DOCDIR=${PKGDIR}/${DOCSRC_DIR}
@@ -89,4 +89,4 @@
 
 # Checks to see if local files pass formatting rules
 format:
-	python -m pycodestyle dipy
\ No newline at end of file
+	$(P$(P$(PYTHON) -m pycodestyle dipy
--- dipy.orig/tools/osxbuild.py
+++ dipy/tools/osxbuild.py
@@ -4,7 +4,7 @@
 
 This is a simple script, most of the heavy lifting is done in bdist_mpkg.
 
-To run this script:  'python build.py'
+To run this script:  'python3 build.py'
 
 Installer is built using sudo so file permissions are correct when installed on
 user system.  Script will prompt for sudo pwd.
