Skip to content

Commit aece816

Browse files
author
Charles PIGNEROL
committed
Version 1.5.3. Python3 used by default, without explicit request.
1 parent 6f82eec commit aece816

File tree

3 files changed

+24
-17
lines changed

3 files changed

+24
-17
lines changed

cmake/python_binding.cmake

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,17 @@
1-
# Version 0.6 (28/08/23, support Python 2/Python 3, répertoire d'installation des modules python fourni par le python utilisé)
1+
# Version 0.7 (26/11/24, support Python 2/Python 3, répertoire d'installation des modules python fourni par le python utilisé)
22

3-
# Par défaut on utilise Python 2
3+
# On utilise Python 3 sauf si python 2 est demandé
44

55
include (GNUInstallDirs)
66
find_package (SWIG 3 REQUIRED)
77

88

99
#find_package (Python REQUIRED COMPONENTS Interpreter Development) # Rem : Python3 a la priorité => inutilisé car empêche l'accès à Python2
10-
if (USE_PYTHON_3)
11-
message (STATUS "========================================= UTILISATION DE PYTHON 3 =========================================")
12-
set (Python3_FIND_STRATEGY LOCATION) # Nécessaire pour python >= 3.10
13-
find_package (Python3 REQUIRED COMPONENTS Interpreter Development)
14-
set (Python_INCLUDE_DIRS ${Python3_INCLUDE_DIRS})
15-
set (Python_EXECUTABLE ${Python3_EXECUTABLE})
16-
set (Python_VERSION ${Python3_VERSION})
17-
set (Python_LIBRARIES ${Python3_LIBRARIES})
18-
set (Python_LIBRARY_DIRS ${Python3_LIBRARY_DIRS})
19-
set (PYTHON_MAJOR_VERSION 3)
20-
elseif (USE_PYTHON_2)
10+
if (USE_PYTHON_2)
2111
message (STATUS "========================================= UTILISATION DE PYTHON 2 =========================================")
12+
message (STATUS "======================> Python2_EXECUTABLE =${Python2_EXECUTABLE}")
13+
message (STATUS "======================> Python2_INCLUDE_DIRS =${Python2_INCLUDE_DIRS}")
14+
message (STATUS "======================> Python2_LIBRARIES =${Python2_LIBRARIES}")
2215
find_package (Python2 REQUIRED COMPONENTS Interpreter Development)
2316
set (Python_INCLUDE_DIRS ${Python2_INCLUDE_DIRS})
2417
set (Python_EXECUTABLE ${Python2_EXECUTABLE})
@@ -27,9 +20,17 @@ elseif (USE_PYTHON_2)
2720
set (Python_LIBRARY_DIRS ${Python2_LIBRARY_DIRS})
2821
set (PYTHON_MAJOR_VERSION 2)
2922
else ( )
30-
message (STATUS "========================================= VERSION DE PYTHON NON DEFINIE =========================================")
31-
message (FATAL_ERROR "==> UTILISEZ -DUSE_PYTHON_2 OU -DUSE_PYTHON_3 A LA LIGNE DE COMMANDE")
32-
endif (USE_PYTHON_3)
23+
message (STATUS "========================================= UTILISATION DE PYTHON 3 =========================================")
24+
set (USE_PYTHON_3 ON)
25+
set (Python3_FIND_STRATEGY LOCATION) # Nécessaire pour python >= 3.10
26+
find_package (Python3 REQUIRED COMPONENTS Interpreter Development)
27+
set (Python_INCLUDE_DIRS ${Python3_INCLUDE_DIRS})
28+
set (Python_EXECUTABLE ${Python3_EXECUTABLE})
29+
set (Python_VERSION ${Python3_VERSION})
30+
set (Python_LIBRARIES ${Python3_LIBRARIES})
31+
set (Python_LIBRARY_DIRS ${Python3_LIBRARY_DIRS})
32+
set (PYTHON_MAJOR_VERSION 3)
33+
endif (USE_PYTHON_2)
3334

3435

3536
# Recherche du répertoire d'installation des modules (procédure spack organizer) :

cmake/version.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44

55
set (GUI_TOOLKITS_VARIABLES_MAJOR_VERSION "1")
66
set (GUI_TOOLKITS_VARIABLES_MINOR_VERSION "5")
7-
set (GUI_TOOLKITS_VARIABLES_RELEASE_VERSION "2")
7+
set (GUI_TOOLKITS_VARIABLES_RELEASE_VERSION "3")
88
set (GUI_TOOLKITS_VARIABLES_VERSION ${GUI_TOOLKITS_VARIABLES_MAJOR_VERSION}.${GUI_TOOLKITS_VARIABLES_MINOR_VERSION}.${GUI_TOOLKITS_VARIABLES_RELEASE_VERSION})

versions.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
Version 1.5.3 : 26/11/24
2+
===============
3+
4+
cmake/python_binding.cmake : python 3 utilisé par défaut, sans demande explicite.
5+
6+
17
Version 1.5.2 : 28/08/24
28
===============
39

0 commit comments

Comments
 (0)