Skip to content
Snippets Groups Projects
Commit 44c1c68a authored by Hans Fangohr's avatar Hans Fangohr
Browse files

Merge branch 'python3.6' into 'main'

Add compatibility for Python 3.6: follow-up

See merge request !134
parents b822c9f7 14b89b24
No related branches found
No related tags found
1 merge request!134Add compatibility for Python 3.6: follow-up
Pipeline #430330 passed
...@@ -26,7 +26,7 @@ install_requires = ...@@ -26,7 +26,7 @@ install_requires =
where=src where=src
[options.entry_points] [options.entry_points]
console_script = console_scripts =
mpsd-software = mpsd_software_manager.mpsd_software:main mpsd-software = mpsd_software_manager.mpsd_software:main
[options.extras_require] [options.extras_require]
......
...@@ -129,9 +129,9 @@ def clone_repo( ...@@ -129,9 +129,9 @@ def clone_repo(
["git", "branch", "-a"], check=True, capture_output=True ["git", "branch", "-a"], check=True, capture_output=True
) )
branches_list = branches_result.stdout.decode().split("\n") branches_list = branches_result.stdout.decode().split("\n")
# strip off 'remotes/origin' (needs Python 3.9): removeprefix = lambda s, p: s[len(p) :] if s.startswith(p) else s # noqa
branches_list = [ branches_list = [
b.strip().removeprefix("remotes/origin/") for b in branches_list removeprefix(b.strip(), "remotes/origin/") for b in branches_list
] ]
msg += f"Available branches are {branches_list}" msg += f"Available branches are {branches_list}"
logging.error(msg) logging.error(msg)
......
...@@ -67,7 +67,7 @@ def test_install_environment_zlib(create_mock_git_repository): ...@@ -67,7 +67,7 @@ def test_install_environment_zlib(create_mock_git_repository):
# subprocess.run( # subprocess.run(
# "cp -r foss2021a-mpi fuss1999a", # "cp -r foss2021a-mpi fuss1999a",
# shell=True, # shell=True,
# stdin=subprocess.PIPE, # stderr=subprocess.PIPE,
# stdout=subprocess.PIPE, # stdout=subprocess.PIPE,
# ) # )
# add zlib as a spec to global_generic # add zlib as a spec to global_generic
...@@ -93,7 +93,7 @@ def test_install_environment_zlib(create_mock_git_repository): ...@@ -93,7 +93,7 @@ def test_install_environment_zlib(create_mock_git_repository):
subprocess.run( subprocess.run(
["gcc -dumpfullversion"], ["gcc -dumpfullversion"],
shell=True, shell=True,
stdin=subprocess.PIPE, stderr=subprocess.PIPE,
stdout=subprocess.PIPE, stdout=subprocess.PIPE,
) )
.stdout.decode("utf-8") .stdout.decode("utf-8")
......
...@@ -45,7 +45,7 @@ def test_prepare_environment(tmp_path, create_mock_git_repository): ...@@ -45,7 +45,7 @@ def test_prepare_environment(tmp_path, create_mock_git_repository):
git_branch_output_raw = subprocess.run( git_branch_output_raw = subprocess.run(
f"cd {str(folders.repo_path)} && git branch", f"cd {str(folders.repo_path)} && git branch",
shell=True, shell=True,
stdin=subprocess.PIPE, stderr=subprocess.PIPE,
stdout=subprocess.PIPE, stdout=subprocess.PIPE,
) )
git_branch_stdout = git_branch_output_raw.stdout.decode("utf-8") git_branch_stdout = git_branch_output_raw.stdout.decode("utf-8")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment