Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update.py: Python version verifcation ? #176

Closed
miroi opened this issue Jul 23, 2016 · 2 comments
Closed

update.py: Python version verifcation ? #176

miroi opened this issue Jul 23, 2016 · 2 comments

Comments

@miroi
Copy link
Contributor

miroi commented Jul 23, 2016

Hi Rado,

would it be please possible to add Python version verification for update.py ?

It's more convenient to have Python version requirement explicitly typed in the screen when lower version of Python is used.

milias@login.grid.umb.sk:~/Work/qch/software/dirac/devel_trunk/cmake/.python update.py  ..
- parsing autocmake.yml
Traceback (most recent call last):
  File "update.py", line 283, in <module>
    main(sys.argv)
  File "update.py", line 241, in main
    process_yaml(argv)
  File "update.py", line 128, in process_yaml
    config = parse_yaml(stream)
  File "/home/milias/Work/qch/software/dirac/devel_trunk/cmake/autocmake/parse_yaml.py", line 16, in parse_yaml
    config = interpolate(config, config)
  File "/home/milias/Work/qch/software/dirac/devel_trunk/cmake/autocmake/interpolate.py", line 26, in interpolate
    l.append(interpolate(x, d_map))
  File "/home/milias/Work/qch/software/dirac/devel_trunk/cmake/autocmake/interpolate.py", line 26, in interpolate
    l.append(interpolate(x, d_map))
  File "/home/milias/Work/qch/software/dirac/devel_trunk/cmake/autocmake/interpolate.py", line 28, in interpolate
    l.append(replace(x, d_map))
  File "/home/milias/Work/qch/software/dirac/devel_trunk/cmake/autocmake/interpolate.py", line 6, in replace
    s = s.replace("%({})".format(var), str(d[var]))
ValueError: zero length field name in format
milias@login.grid.umb.sk:~/Work/qch/software/dirac/devel_trunk/cmake/.python -V
Python 2.6.6
milias@login.grid.umb.sk:~/Work/qch/software/dirac/devel_trunk/cmake/.
@bast
Copy link
Member

bast commented Jul 23, 2016

I agree with you Miro - I will implement that.

@bast bast closed this as completed in 2374f5b Jul 23, 2016
@bast
Copy link
Member

bast commented Jul 23, 2016

This is now done for Python 2.6. Python 2.4 will still throw an ugly message because of with. It would need restructuring the code to remedy that which I will not do for the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants