Skip to content
Snippets Groups Projects
Commit 67967a53 authored by Paul McCarthy's avatar Paul McCarthy
Browse files

Make setup.py backwards compatible with ancient python.

parent b6870cf1
No related branches found
No related tags found
No related merge requests found
...@@ -71,7 +71,7 @@ class fsl_sdist(sdist): ...@@ -71,7 +71,7 @@ class fsl_sdist(sdist):
def __patch_py_file(self, filename, licence): def __patch_py_file(self, filename, licence):
licence = licence.split('\n') licence = licence.split('\n')
licence = ['# {}'.format(l) for l in licence] licence = ['# {0}'.format(l) for l in licence]
with open(filename, 'rt') as f: with open(filename, 'rt') as f:
lines = f.read().split('\n') lines = f.read().split('\n')
...@@ -82,7 +82,7 @@ class fsl_sdist(sdist): ...@@ -82,7 +82,7 @@ class fsl_sdist(sdist):
# Insert the fsl hashbang and the licence # Insert the fsl hashbang and the licence
lines = ['#!/usr/bin/env fslpython'] + ['#'] + licence + lines lines = ['#!/usr/bin/env fslpython'] + ['#'] + licence + lines
lines = ['{}\n'.format(l) for l in lines] lines = ['{0}\n'.format(l) for l in lines]
with open(filename, 'wt') as f: with open(filename, 'wt') as f:
f.writelines(lines) f.writelines(lines)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment