Skip to content

Commit 900eeb0

Browse files
authored
Python 3 updates (#4)
* updated python-config * Updated travis to use python-config for py2 * Update .travis.yml * removed future imports
1 parent 79bf73b commit 900eeb0

20 files changed

+6
-21
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ before_install:
2828
install:
2929
# We thrown away the existing repo in Docker, and copy the new one in-place
3030
- docker exec -it app /bin/bash -c "rm -rf $DOCKER_WORKING_DIR && cp -r $DOCKER_MOUNT_DIR $DOCKER_WORKING_DIR"
31-
- docker exec -it app /bin/bash -c ". \$HOME/.bashrc_mdolab && cd $DOCKER_WORKING_DIR && cp config/defaults/config.LINUX_GFORTRAN.mk config/config.mk && make"
31+
- docker exec -it app /bin/bash -c ". \$HOME/.bashrc_mdolab && cd $DOCKER_WORKING_DIR && cp config/defaults/config.LINUX_GFORTRAN.mk config/config.mk && sed -i 's/python3-config/python-config/g' config/config.mk && make"
3232

3333
script:
3434
# We need to source the mdolab bashrc before running anything

config/defaults/config.LINUX_GFORTRAN.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ CC_FLAGS = -O2 -fPIC
1313

1414
# Define potentially different python, python-config and f2py executables:
1515
PYTHON = python
16-
PYTHON-CONFIG = python-config
16+
PYTHON-CONFIG = python3-config # use python-config for python 2
1717
F2PY = f2py
1818

1919
# Define additional flags for linking

config/defaults/config.LINUX_INTEL.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ CC_FLAGS = -O2 -fPIC
1313

1414
# Define potentially different python, python-config and f2py executables:
1515
PYTHON = python
16-
PYTHON-CONFIG = python-config
16+
PYTHON-CONFIG = python3-config # use python-config for python 2
1717
F2PY = f2py
1818

1919
# Define additional flags for linking

config/defaults/config.LINUX_INTEL_SCINET.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ CC_FLAGS = -O2 -fPIC
1313

1414
# Define potentially different python, python-config and f2py executables:
1515
PYTHON = python
16-
PYTHON-CONFIG = python-config
16+
PYTHON-CONFIG = python3-config # use python-config for python 2
1717
F2PY = f2py
1818

1919
# Define additional flags for linking

config/defaults/config.OSX_GFORTRAN.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ CC_FLAGS = -O2 -fPIC
1313

1414
# Define potentially different python, python-config and f2py executables:
1515
PYTHON = python
16-
PYTHON-CONFIG = python-config
16+
PYTHON-CONFIG = python3-config # use python-config for python 2
1717
F2PY = f2py
1818

1919
# Define additional flags for linking

python/examples/test_curve.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from __future__ import print_function
21
# This is a test script to test the functionality of the
32
# pySpline curve class
43

python/examples/test_surf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from __future__ import print_function
21
# This is a test script to test the functionality of the
32
# pySpline surface
43
import numpy

python/examples/test_volume.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from __future__ import print_function
21
# This simple script test some of the volume functionality in pySpline
32
import numpy
43
from pyspline import pySpline

python/pySpline.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
Contains classes for working with B-spline :class:`Curve`, :class:`Surface` and
66
:class:`Volume`
77
"""
8-
from __future__ import print_function
9-
from __future__ import division
108

119
# ===========================================================================
1210
# External Python modules

python/reg_tests/mdo_regression_helper.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from __future__ import print_function
21
# This file contains two functions to help regression testing. The
32
# first is used to format float values with a specified absolute and
43
# relative tolerance. This information is used by the second function

python/reg_tests/run_reg_tests.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from __future__ import print_function
21
# =============================================================================
32
# Standard Python modules
43
# =============================================================================

python/reg_tests/test_curves.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from __future__ import print_function
21
# =============================================================================
32
# Standard Python modules
43
# =============================================================================

python/reg_tests/test_surfaces.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from __future__ import print_function
21
# =============================================================================
32
# Standard Python modules
43
# =============================================================================

python/reg_tests/test_volumes.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from __future__ import print_function
21
# =============================================================================
32
# Standard Python modules
43
# =============================================================================

src/f2py/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ all:
2121
@echo "#------------------------------------------------------#"
2222

2323
# Generate Numpy inlude directory
24-
$(eval NUMPY_INCLUDES = $(shell $(PYTHON) -c 'from __future__ import print_function; import numpy; print(numpy.get_include())'))
24+
$(eval NUMPY_INCLUDES = $(shell $(PYTHON) -c 'import numpy; print(numpy.get_include())'))
2525
@echo "#------------------------------------------------------#"
2626
@echo Numpy Include Directory: $(NUMPY_INCLUDES)
2727
@echo "#------------------------------------------------------#"

src/f2py/get_f2py.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from __future__ import print_function
21
#------------- VERY IMPORTANT ------------
32

43
# This script is necessary since f2py INSISTS on priting crap out when

src/f2py/importTest.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#! /usr/bin/env python
2-
from __future__ import print_function
32
import sys
43

54
print('Testing if module pyspline can be imported...')

tests/reg_tests/test_curves.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from __future__ import print_function
21
# =============================================================================
32
# Standard Python modules
43
# =============================================================================

tests/reg_tests/test_surfaces.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from __future__ import print_function
21
# =============================================================================
32
# Standard Python modules
43
# =============================================================================

tests/reg_tests/test_volumes.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from __future__ import print_function
21
# =============================================================================
32
# Standard Python modules
43
# =============================================================================

0 commit comments

Comments
 (0)