Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
105
Merge Requests
105
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos
Commits
f0c9b57c
Commit
f0c9b57c
authored
Apr 05, 2024
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
component/default: system gcc can be used only if all gcc, g++ and gfortran exist.
parent
9e769522
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
7 deletions
+16
-7
component/defaults.cfg
component/defaults.cfg
+16
-7
No files found.
component/defaults.cfg
View file @
f0c9b57c
...
@@ -42,13 +42,22 @@ min_version = 5.4
...
@@ -42,13 +42,22 @@ min_version = 5.4
init =
init =
import os, subprocess
import os, subprocess
parse_version = lambda ver: tuple(map(int, ver.strip().split('.')))
parse_version = lambda ver: tuple(map(int, ver.strip().split('.')))
try:
version_list = []
current = subprocess.check_output(('gcc', '-dumpfullversion'),
for command in ('gcc', 'g++', 'gfortran'):
stderr=subprocess.STDOUT,
try:
universal_newlines=True).strip()
version = subprocess.check_output((command, '-dumpfullversion'),
except subprocess.CalledProcessError: # BBB: old GCC
stderr=subprocess.STDOUT,
current = subprocess.check_output(('gcc', '-dumpversion'),
universal_newlines=True).strip()
universal_newlines=True).strip()
except subprocess.CalledProcessError: # BBB: old GCC
version = subprocess.check_output((command, '-dumpversion'),
universal_newlines=True).strip()
except FileNotFoundError:
version = None
version_list.append(version)
if None in version_list:
current = '0.0.0'
else:
current = sorted(version_list, key=parse_version)[0]
self.system_version = current
self.system_version = current
# If we're still going to use the same GCC,
# If we're still going to use the same GCC,
# the conditions have no impact on the dependant parts.
# the conditions have no impact on the dependant parts.
...
...
Write
Preview
Markdown
is supported
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