Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Michiel Cottaar
fslpy
Commits
67967a53
Commit
67967a53
authored
Nov 21, 2016
by
Paul McCarthy
Browse files
Make setup.py backwards compatible with ancient python.
parent
b6870cf1
Changes
1
Hide whitespace changes
Inline
Side-by-side
setup.py
View file @
67967a53
...
...
@@ -71,7 +71,7 @@ class fsl_sdist(sdist):
def
__patch_py_file
(
self
,
filename
,
licence
):
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
:
lines
=
f
.
read
().
split
(
'
\n
'
)
...
...
@@ -82,7 +82,7 @@ class fsl_sdist(sdist):
# Insert the fsl hashbang and the licence
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
:
f
.
writelines
(
lines
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment