Skip to content

Commit f639cf2

Browse files
committed
More Python3 fixes
1 parent 0afdbf7 commit f639cf2

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

debian/patches/python3.patch

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,19 @@ Description: Force usage of Python3
3535

3636
trailing-spaces:
3737
find . -name "*[.py|.rst]" -type f | xargs perl -pi -e 's/[ \t]*$$//'
38+
@@ -56,10 +56,10 @@ inplace:
39+
$(PYTHON) setup.py build_ext -i
40+
41+
test-code: in
42+
- py.test --doctest-modules nipype
43+
+ py.test-3 --doctest-modules nipype
44+
45+
test-coverage: clean-tests in
46+
- py.test --doctest-modules --cov-config .coveragerc --cov=nipype nipype
47+
+ py.test-3 --doctest-modules --cov-config .coveragerc --cov=nipype nipype
48+
49+
test: tests # just another name
50+
tests: clean test-code
3851
@@ -70,7 +70,7 @@ html:
3952

4053
specs:
@@ -66,3 +79,14 @@ Description: Force usage of Python3
6679
../../../examples/frontiers_paper""")
6780
os.chdir(doc_path)
6881

82+
--- a/nipype/__init__.py
83+
+++ b/nipype/__init__.py
84+
@@ -36,7 +36,7 @@ class NipypeTester(object):
85+
try:
86+
import pytest
87+
except ImportError:
88+
- raise RuntimeError("py.test not installed, run: pip install pytest")
89+
+ raise RuntimeError("py.test-3 not installed, run: pip install pytest")
90+
args = []
91+
if not doctests:
92+
args.extend(["-p", "no:doctest"])

debian/rules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ override_dh_auto_test:
3535
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
3636
export PYTHONPATH=$(shell pybuild --print build_dir --interpreter python3); \
3737
cd build && \
38-
MPLCONFIGDIR=$(CURDIR)/build LC_ALL=C.UTF-8 py.test -v --doctest-modules ../nipype
38+
MPLCONFIGDIR=$(CURDIR)/build LC_ALL=C.UTF-8 py.test-3 -v --doctest-modules ../nipype
3939
# test_mesh_ops needs X for bloody tvtk.api, and then fails anyways with current mayavi2/tvtk:
4040
# https://github.com/nipy/nipype/issues/1218, so skipping it for now
4141
endif

0 commit comments

Comments
 (0)