Commits

Jed Brown committed a17cc78

petscnagupgrade.py: use ${PYTHON} and make compatible with Python-3

Comments (0)

Files changed (2)

bin/petscnagupgrade.py

   return 0
 #
 #
-if __name__ ==  '__main__': 
-  if os.environ.has_key('PETSC_DIR'):
+if __name__ ==  '__main__':
+  if 'PETSC_DIR' in os.environ:
     petscdir = os.environ['PETSC_DIR']
   elif os.path.exists(os.path.join('.', 'include', 'petscversion.h')):
     petscdir  = '.'
         fi
 
 petscnagupgrade:
-	-@PETSC_DIR=${PETSC_DIR} ${PETSC_DIR}/bin/petscnagupgrade.py
+	-@PETSC_DIR=${PETSC_DIR} ${PYTHON} ${PETSC_DIR}/bin/petscnagupgrade.py
 
 chk_loc:
 	@if [ ${LOC}foo = foo ] ; then \