Skip to content

Commit

Permalink
8313321: Set minimum python version in WebKit cmake scripts
Browse files Browse the repository at this point in the history
Reviewed-by: kcr, sykora
  • Loading branch information
Hima Bindu Meda committed Oct 18, 2023
1 parent cd7383a commit bb07bcf
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions modules/javafx.web/src/main/native/Source/cmake/WebKitCommon.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,24 @@ if (NOT HAS_RUN_WEBKIT_COMMON)
find_package(Perl 5.10.0 REQUIRED)
find_package(PerlModules COMPONENTS English FindBin JSON::PP REQUIRED)

# This module looks preferably for version 3 of Python. If not found, version 2 is searched.
find_package(Python COMPONENTS Interpreter REQUIRED)
# Set the variable with uppercase name to keep compatibility with code and users expecting it.
set(PYTHON_EXECUTABLE ${Python_EXECUTABLE} CACHE FILEPATH "Path to the Python interpreter")
# This module looks preferably for version 3 of Python.
if (CMAKE_SYSTEM_NAME MATCHES "Windows")
find_package(Python3 3.8.0 REQUIRED)
find_package(Python3 COMPONENTS Interpreter REQUIRED)
# Set the variable with uppercase name to keep compatibility with code and users expecting it.
set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE} CACHE FILEPATH "Path to the Python interpreter")
if (NOT PYTHON_EXECUTABLE OR Python3_VERSION VERSION_LESS 3.8.0)
message(FATAL_ERROR "Python 3.8 or higher is required.")
endif ()
else ()
find_package(Python3 3.6.0 REQUIRED)
find_package(Python3 COMPONENTS Interpreter REQUIRED)
# Set the variable with uppercase name to keep compatibility with code and users expecting it.
set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE} CACHE FILEPATH "Path to the Python interpreter")
if (NOT PYTHON_EXECUTABLE OR Python3_VERSION VERSION_LESS 3.6.0)
message(FATAL_ERROR "Python 3.6 or higher is required.")
endif ()
endif ()

# We cannot check for RUBY_FOUND because it is set only when the full package is installed and
# the only thing we need is the interpreter. Unlike Python, cmake does not provide a macro
Expand Down

3 comments on commit bb07bcf

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@HimaBinduMeda
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/backport jfx21u

@openjdk
Copy link

@openjdk openjdk bot commented on bb07bcf Oct 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@HimaBinduMeda the backport was successfully created on the branch HimaBinduMeda-backport-bb07bcf7 in my personal fork of openjdk/jfx21u. To create a pull request with this backport targeting openjdk/jfx21u:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit bb07bcf7 from the openjdk/jfx repository.

The commit being backported was authored by Hima Bindu Meda on 18 Oct 2023 and was reviewed by Kevin Rushforth and Joeri Sykora.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jfx21u:

$ git fetch https://github.com/openjdk-bots/jfx21u.git HimaBinduMeda-backport-bb07bcf7:HimaBinduMeda-backport-bb07bcf7
$ git checkout HimaBinduMeda-backport-bb07bcf7
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jfx21u.git HimaBinduMeda-backport-bb07bcf7

Please sign in to comment.