szaghi / FoBiS

FoBiS.py, Fortran projects Building System for poor people
138 stars 35 forks source link

configparser.InterpolationSyntaxError: '%' must be followed by '%' #105

Closed ComplicatedPhenomenon closed 4 years ago

ComplicatedPhenomenon commented 5 years ago

Dear @szaghi, I am using python provided by anaconda on Mac Os. I met the problem

$ FoBiS.py  build
Traceback (most recent call last):
  File "/Users/xx/anaconda3/bin/FoBiS.py", line 4, in <module>
    __import__('pkg_resources').run_script('FoBiS.py==2.9.5', 'FoBiS.py')
  File "/Users/xx/anaconda3/lib/python3.7/site-packages/pkg_resources/__init__.py", line 661, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/Users/xx/anaconda3/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1448, in run_script
    exec(script_code, namespace, namespace)
  File "/Users/xx/anaconda3/lib/python3.7/site-packages/FoBiS.py-2.9.5-py3.7.egg/EGG-INFO/scripts/FoBiS.py", line 21, in <module>
  File "/Users/xx/anaconda3/lib/python3.7/site-packages/FoBiS.py-2.9.5-py3.7.egg/fobis/fobis.py", line 45, in main
  File "/Users/xx/anaconda3/lib/python3.7/site-packages/FoBiS.py-2.9.5-py3.7.egg/fobis/fobis.py", line 58, in run_fobis
  File "/Users/xx/anaconda3/lib/python3.7/site-packages/FoBiS.py-2.9.5-py3.7.egg/fobis/FoBiSConfig.py", line 65, in __init__
  File "/Users/xx/anaconda3/lib/python3.7/site-packages/FoBiS.py-2.9.5-py3.7.egg/fobis/Fobos.py", line 76, in __init__
  File "/Users/xx/anaconda3/lib/python3.7/site-packages/FoBiS.py-2.9.5-py3.7.egg/fobis/Fobos.py", line 238, in _set_cliargs
  File "/Users/xx/anaconda3/lib/python3.7/site-packages/FoBiS.py-2.9.5-py3.7.egg/fobis/Fobos.py", line 176, in _check_local_variables
  File "/Users/xx/anaconda3/lib/python3.7/site-packages/FoBiS.py-2.9.5-py3.7.egg/fobis/Fobos.py", line 144, in _get_local_variables
  File "/Users/xx/anaconda3/lib/python3.7/configparser.py", line 857, in items
    return [(option, value_getter(option)) for option in d.keys()]
  File "/Users/xx/anaconda3/lib/python3.7/configparser.py", line 857, in <listcomp>
    return [(option, value_getter(option)) for option in d.keys()]
  File "/Users/xx/anaconda3/lib/python3.7/configparser.py", line 854, in <lambda>
    section, option, d[option], d)
  File "/Users/xx/anaconda3/lib/python3.7/configparser.py", line 394, in before_get
    self._interpolate_some(parser, option, L, value, section, defaults, 1)
  File "/Users/xx/anaconda3/lib/python3.7/configparser.py", line 444, in _interpolate_some
    "found: %r" % (rest,))
configparser.InterpolationSyntaxError: '%' must be followed by '%' or '(', found: '%^%PENF/%" -czf PENF.tar.gz *'

It happens to all of the fortan libraries I have while building via FoBiS.py.

szaghi commented 5 years ago

Hi, sorry for the delay.

Probably there is something wired with Python3, I am still basing on python 2.7.x even if I know that others are using it with Python3.x

I'll try to dig it deeper soon.

ComplicatedPhenomenon commented 5 years ago

Thanks, How could I forget this very possible reason? That answers my problems then!

szaghi commented 4 years ago

@ComplicatedPhenomenon can you test this issue with the new 3.0.0 version?

I have to update the setup, there is a requirement not listed that is future module, if after installation FoBiS.py does not work it is probably that module missing.

ComplicatedPhenomenon commented 4 years ago

It works as you predicted.

(base) wm@wm:~/StringiFor$ conda env create -n FoBiS
(base) wm@wm:~/StringiFor$ conda activate FoBiS
(FoBiS) wm@wm:~/StringiFor$ conda install pip
(FoBiS) wm@wm:~/StringiFor$ pip install FoBiS.py
(FoBiS) wm@wm:~/StringiFor$ conda install future
(FoBiS) wm@wm:~/StringiFor$ FoBiS.py build
...
Building src/tests/stringifor/stringifor-doctest-2.f90
Nothing to compile, all objects are up-to-date
Linking exe/stringifor-doctest-2
Target src/tests/stringifor/stringifor-doctest-2.f90 has been successfully built

Thanks.