Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RadioObservatory
LOFAR
Commits
6a002edb
Commit
6a002edb
authored
6 years ago
by
Mattia Mancini
Browse files
Options
Downloads
Patches
Plain Diff
OSB-44
: requesting version gt 4.0 for python module celery
parent
7df1dd1b
No related branches found
No related tags found
2 merge requests
!89
Monitoring maintenance Epic branch merge
,
!1
Resolve OSB-13 "Monitoringmaintenance "
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CMake/FindPythonModule.cmake
+15
-1
15 additions, 1 deletion
CMake/FindPythonModule.cmake
LCU/Maintenance/DBInterface/CMakeLists.txt
+1
-1
1 addition, 1 deletion
LCU/Maintenance/DBInterface/CMakeLists.txt
with
16 additions
and
2 deletions
CMake/FindPythonModule.cmake
+
15
−
1
View file @
6a002edb
...
...
@@ -61,7 +61,7 @@ macro(find_python_module _module)
cmake_parse_arguments
(
PYTHON_
${
_MODULE
}
_FIND
"REQUIRED"
"HINTS"
"HINTS
;VERSION
"
""
${
ARGN
}
)
...
...
@@ -75,6 +75,7 @@ macro(find_python_module _module)
# Try to import the python module we need to find, and get its file path.
if
(
PYTHON_EXECUTABLE
)
set
(
ENV{PYTHONPATH}
${
PYTHON_
${
_MODULE
}
_FIND_HINTS
}
:$ENV{PYTHONPATH}
)
set
(
_cmd
"from __future__ import print_function; import
${
_module
}
; print(
${
_module
}
.__file__)"
)
execute_process
(
COMMAND
"
${
PYTHON_EXECUTABLE
}
"
"-c"
"
${
_cmd
}
"
...
...
@@ -83,6 +84,19 @@ macro(find_python_module _module)
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE
)
set
(
_cmd
"from __future__ import print_function; import
${
_module
}
; print(
${
_module
}
.__version__)"
)
if
(
${
PYTHON_
${
_MODULE
}
_FIND_VERSION
}
)
# Check the version of the module
execute_process
(
COMMAND
"
${
PYTHON_EXECUTABLE
}
"
"-c"
"
${
_cmd
}
"
RESULT_VARIABLE _result_version
OUTPUT_VARIABLE _output_version
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE
)
message
(
STATUS
"requested version
${
PYTHON_
${
_module
}
_FIND_VERSION
}
"
)
if
(
${
_output_version
}
VERSION_LESS
${
PYTHON_
${
_MODULE
}
_FIND_VERSION
}
)
message
(
FATAL_ERROR
"The installed version of PYTHON_
${
_MODULE
}
is <=
${
PYTHON_
${
_MODULE
}
_FIND_VERSION
}
"
)
endif
()
endif
()
# Set PYTHON_<MODULE> variable in the cache, if <module> was found.
if
(
_result EQUAL 0
)
set
(
PYTHON_
${
_MODULE
}
${
_output
}
CACHE FILEPATH
...
...
This diff is collapsed.
Click to expand it.
LCU/Maintenance/DBInterface/CMakeLists.txt
+
1
−
1
View file @
6a002edb
...
...
@@ -12,7 +12,7 @@ find_python_module(django REQUIRED)
find_python_module
(
psycopg2 REQUIRED
)
find_python_module
(
rest_framework REQUIRED
)
#sudo pip install djangorestframework
find_python_module
(
requests REQUIRED
)
find_python_module
(
celery REQUIRED
)
find_python_module
(
celery REQUIRED
VERSION 4
)
find_python_module
(
django_filters REQUIRED
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment