mirror of
https://gitlab.com/scemama/irpf90.git
synced 2024-12-21 20:03:33 +01:00
Corrected bug with unexisting directories
This commit is contained in:
parent
61997d670a
commit
89ab32443c
5
README
5
README
@ -7,7 +7,7 @@ Dependencies
|
||||
|
||||
- GNU make (>= 3.81 recommended)
|
||||
- Python > 2.3
|
||||
- Any Fortran 90 compiler (Intel recommended, for example)
|
||||
- Any Fortran 90 compiler (Intel recommended)
|
||||
|
||||
Installing IRPF90
|
||||
-----------------
|
||||
@ -21,6 +21,7 @@ ${IRPF90_HOME} is the location of your irpf90 directory::
|
||||
export PATH=${IRPF90_HOME}/bin:${PATH}
|
||||
export MANPATH=${IRPF90_HOME}/man:${MANPATH}
|
||||
EOF
|
||||
. ${HOME}/.bash_profile
|
||||
|
||||
|
||||
Using IRPF90
|
||||
@ -43,6 +44,6 @@ Author
|
||||
------
|
||||
|
||||
| Anthony Scemama, LCPQ-IRSAMC, CNRS-Universite Paul Sabatier
|
||||
| scemama@irsamc.ups-tlse.fr
|
||||
| <scemama@irsamc.ups-tlse.fr>
|
||||
| http://scemama.mooo.com
|
||||
|
||||
|
Binary file not shown.
@ -74,6 +74,8 @@ class CommandLine(object):
|
||||
self._include_dir = []
|
||||
for o,a in self.opts:
|
||||
if o in [ "-I", '--'+options['I'][0] ]:
|
||||
if len(a) < 1:
|
||||
print "Error: -I option needs a directory"
|
||||
if a[-1] != '/':
|
||||
a = a+'/'
|
||||
self._include_dir.append(a)
|
||||
|
@ -63,10 +63,17 @@ def init():
|
||||
makefile.create()
|
||||
|
||||
# Copy current files in the irpdir
|
||||
ls = os.listdir(os.getcwd())
|
||||
print ls
|
||||
for dir in ['./']+command_line.include_dir:
|
||||
try:
|
||||
os.stat(dir)
|
||||
except:
|
||||
print dir,'not in dir'
|
||||
continue
|
||||
for filename in os.listdir(dir):
|
||||
filename = dir+filename
|
||||
if not filename[0].startswith(".") and not os.path.isdir(filename):
|
||||
if not filename.startswith(".") and not os.path.isdir(filename):
|
||||
try:
|
||||
file = open(filename,"r")
|
||||
except IOError:
|
||||
|
@ -350,7 +350,11 @@ def create_irpf90_files():
|
||||
return filename.endswith(".irp.f") and not filename.startswith('.')
|
||||
result = filter ( is_irpf90_file, os.listdir(os.getcwd()) )
|
||||
for dir in command_line.include_dir:
|
||||
result += map(lambda x: dir+x, filter ( is_irpf90_file, os.listdir(dir) ) )
|
||||
try:
|
||||
os.stat(dir)
|
||||
result += map(lambda x: dir+x, filter ( is_irpf90_file, os.listdir(dir) ) )
|
||||
except:
|
||||
continue
|
||||
if command_line.do_codelet:
|
||||
result += [command_line.codelet[3]]
|
||||
return result
|
||||
|
@ -47,7 +47,7 @@ class Fmodule(object):
|
||||
def __init__(self,text,filename):
|
||||
self.text = put_info(text,filename)
|
||||
self.filename = filename[:-6]
|
||||
self.name = "%s_mod"%(self.filename).replace('/','__')
|
||||
self.name = "%s_mod"%(self.filename).replace('/','__').replace('.','Dot')
|
||||
|
||||
def is_main(self):
|
||||
if '_is_main' not in self.__dict__:
|
||||
|
@ -1 +1 @@
|
||||
version = "1.3.1"
|
||||
version = "1.3.3"
|
||||
|
Loading…
Reference in New Issue
Block a user