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
mpcdf
obs
osc-plugins
Commits
60e63478
Commit
60e63478
authored
Mar 31, 2020
by
Lorenz Hüdepohl
Browse files
Python 2 compatibility
parent
ca80b621
Pipeline
#71747
passed with stage
in 15 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
mpcdf_common.py
View file @
60e63478
...
...
@@ -615,7 +615,7 @@ Macros:
for
oldrepo
in
root
.
findall
(
"./repository"
):
root
.
remove
(
oldrepo
)
def
repo
(
name
,
*
dependencies
,
compiler
=
False
,
mpi
=
False
,
cuda
=
False
,
cuda_mpi
=
False
,
additional_prefers
=
(),
**
macros
):
def
repo
(
name
,
dependencies
,
compiler
=
False
,
mpi
=
False
,
cuda
=
False
,
cuda_mpi
=
False
,
additional_prefers
=
(),
**
macros
):
old_repos
.
discard
(
name
)
have_compiler
=
compiler
or
mpi
or
cuda
or
cuda_mpi
have_mpi
=
mpi
or
cuda_mpi
...
...
@@ -719,11 +719,11 @@ Macros:
pgis
=
overloaded_project_attribute
(
api_url
,
project
,
"MPCDF:pgi_modules"
)
if
parent
:
repo
(
"System"
,
(
"software"
,
distribution
))
repo
(
"System"
,
(
(
"software"
,
distribution
)
,)
)
for
compiler
in
compilers
+
pgis
:
if
project
!=
"software"
:
dependencies
=
(
"software"
,
distribution
)
dependencies
=
(
(
"software"
,
distribution
)
,)
else
:
dependencies
=
()
repo
(
compiler
,
dependencies
,
compiler
=
True
,
...
...
@@ -731,17 +731,17 @@ Macros:
additional_prefers
=
(
"mpcdf_compiler_"
+
compiler
,))
for
mpi
in
filter
(
partial
(
valid_mpi
,
compiler
),
mpis
):
repo
(
mpi
+
"_"
+
compiler
,
(
project
,
compiler
),
mpi
=
True
,
repo
(
mpi
+
"_"
+
compiler
,
(
(
project
,
compiler
),
),
mpi
=
True
,
mpi_repository
=
mpi
,
mpi_module
=
mpi_module
(
mpi
))
for
cuda
in
cudas
:
for
compiler
in
filter
(
partial
(
valid_cuda
,
cuda
),
compilers
):
repo
(
cuda
+
"_"
+
compiler
,
(
project
,
compiler
),
cuda
=
True
,
cuda_repository
=
cuda
,
repo
(
cuda
+
"_"
+
compiler
,
(
(
project
,
compiler
),
),
cuda
=
True
,
cuda_repository
=
cuda
,
additional_prefers
=
(
"mpcdf_"
+
cuda
,))
for
mpi
in
filter
(
partial
(
valid_mpi
,
compiler
),
mpis
):
repo
(
cuda
+
"_"
+
mpi
+
"_"
+
compiler
,
(
project
,
cuda
+
"_"
+
compiler
),
(
project
,
mpi
+
"_"
+
compiler
),
(
(
project
,
cuda
+
"_"
+
compiler
),
(
project
,
mpi
+
"_"
+
compiler
)
)
,
cuda_mpi
=
True
)
if
old_repos
and
not
remove_old
:
...
...
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