Skip to content

Commit

Permalink
Python 3 updates (#4)
Browse files Browse the repository at this point in the history
* updated python-config

* Updated travis to use python-config for py2

* Update .travis.yml

* removed future imports
  • Loading branch information
ewu63 authored Apr 9, 2020
1 parent 79bf73b commit 900eeb0
Show file tree
Hide file tree
Showing 20 changed files with 6 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ before_install:
install:
# We thrown away the existing repo in Docker, and copy the new one in-place
- docker exec -it app /bin/bash -c "rm -rf $DOCKER_WORKING_DIR && cp -r $DOCKER_MOUNT_DIR $DOCKER_WORKING_DIR"
- 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"
- 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"

script:
# We need to source the mdolab bashrc before running anything
Expand Down
2 changes: 1 addition & 1 deletion config/defaults/config.LINUX_GFORTRAN.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ CC_FLAGS = -O2 -fPIC

# Define potentially different python, python-config and f2py executables:
PYTHON = python
PYTHON-CONFIG = python-config
PYTHON-CONFIG = python3-config # use python-config for python 2
F2PY = f2py

# Define additional flags for linking
Expand Down
2 changes: 1 addition & 1 deletion config/defaults/config.LINUX_INTEL.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ CC_FLAGS = -O2 -fPIC

# Define potentially different python, python-config and f2py executables:
PYTHON = python
PYTHON-CONFIG = python-config
PYTHON-CONFIG = python3-config # use python-config for python 2
F2PY = f2py

# Define additional flags for linking
Expand Down
2 changes: 1 addition & 1 deletion config/defaults/config.LINUX_INTEL_SCINET.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ CC_FLAGS = -O2 -fPIC

# Define potentially different python, python-config and f2py executables:
PYTHON = python
PYTHON-CONFIG = python-config
PYTHON-CONFIG = python3-config # use python-config for python 2
F2PY = f2py

# Define additional flags for linking
Expand Down
2 changes: 1 addition & 1 deletion config/defaults/config.OSX_GFORTRAN.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ CC_FLAGS = -O2 -fPIC

# Define potentially different python, python-config and f2py executables:
PYTHON = python
PYTHON-CONFIG = python-config
PYTHON-CONFIG = python3-config # use python-config for python 2
F2PY = f2py

# Define additional flags for linking
Expand Down
1 change: 0 additions & 1 deletion python/examples/test_curve.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import print_function
# This is a test script to test the functionality of the
# pySpline curve class

Expand Down
1 change: 0 additions & 1 deletion python/examples/test_surf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import print_function
# This is a test script to test the functionality of the
# pySpline surface
import numpy
Expand Down
1 change: 0 additions & 1 deletion python/examples/test_volume.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import print_function
# This simple script test some of the volume functionality in pySpline
import numpy
from pyspline import pySpline
Expand Down
2 changes: 0 additions & 2 deletions python/pySpline.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
Contains classes for working with B-spline :class:`Curve`, :class:`Surface` and
:class:`Volume`
"""
from __future__ import print_function
from __future__ import division

# ===========================================================================
# External Python modules
Expand Down
1 change: 0 additions & 1 deletion python/reg_tests/mdo_regression_helper.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import print_function
# This file contains two functions to help regression testing. The
# first is used to format float values with a specified absolute and
# relative tolerance. This information is used by the second function
Expand Down
1 change: 0 additions & 1 deletion python/reg_tests/run_reg_tests.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import print_function
# =============================================================================
# Standard Python modules
# =============================================================================
Expand Down
1 change: 0 additions & 1 deletion python/reg_tests/test_curves.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import print_function
# =============================================================================
# Standard Python modules
# =============================================================================
Expand Down
1 change: 0 additions & 1 deletion python/reg_tests/test_surfaces.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import print_function
# =============================================================================
# Standard Python modules
# =============================================================================
Expand Down
1 change: 0 additions & 1 deletion python/reg_tests/test_volumes.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import print_function
# =============================================================================
# Standard Python modules
# =============================================================================
Expand Down
2 changes: 1 addition & 1 deletion src/f2py/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ all:
@echo "#------------------------------------------------------#"

# Generate Numpy inlude directory
$(eval NUMPY_INCLUDES = $(shell $(PYTHON) -c 'from __future__ import print_function; import numpy; print(numpy.get_include())'))
$(eval NUMPY_INCLUDES = $(shell $(PYTHON) -c 'import numpy; print(numpy.get_include())'))
@echo "#------------------------------------------------------#"
@echo Numpy Include Directory: $(NUMPY_INCLUDES)
@echo "#------------------------------------------------------#"
Expand Down
1 change: 0 additions & 1 deletion src/f2py/get_f2py.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import print_function
#------------- VERY IMPORTANT ------------

# This script is necessary since f2py INSISTS on priting crap out when
Expand Down
1 change: 0 additions & 1 deletion src/f2py/importTest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#! /usr/bin/env python
from __future__ import print_function
import sys

print('Testing if module pyspline can be imported...')
Expand Down
1 change: 0 additions & 1 deletion tests/reg_tests/test_curves.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import print_function
# =============================================================================
# Standard Python modules
# =============================================================================
Expand Down
1 change: 0 additions & 1 deletion tests/reg_tests/test_surfaces.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import print_function
# =============================================================================
# Standard Python modules
# =============================================================================
Expand Down
1 change: 0 additions & 1 deletion tests/reg_tests/test_volumes.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import print_function
# =============================================================================
# Standard Python modules
# =============================================================================
Expand Down

0 comments on commit 900eeb0

Please sign in to comment.