Skip to content

Commit 8b59878

Browse files
author
Charles PIGNEROL
committed
Version 1.5.2. Python 3.12 port.
1 parent a05d7e1 commit 8b59878

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

cmake/python_binding.cmake

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Version 0.5 (21/6/23, support Python 2/Python 3, répertoire d'installation des modules python fourni par le python utilisé)
1+
# Version 0.6 (28/08/23, support Python 2/Python 3, répertoire d'installation des modules python fourni par le python utilisé)
22

33
# Par défaut on utilise Python 2
44

@@ -9,6 +9,7 @@ find_package (SWIG 3 REQUIRED)
99
#find_package (Python REQUIRED COMPONENTS Interpreter Development) # Rem : Python3 a la priorité => inutilisé car empêche l'accès à Python2
1010
if (USE_PYTHON_3)
1111
message (STATUS "========================================= UTILISATION DE PYTHON 3 =========================================")
12+
set (Python3_FIND_STRATEGY LOCATION) # Nécessaire pour python >= 3.10
1213
find_package (Python3 REQUIRED COMPONENTS Interpreter Development)
1314
set (Python_INCLUDE_DIRS ${Python3_INCLUDE_DIRS})
1415
set (Python_EXECUTABLE ${Python3_EXECUTABLE})
@@ -45,7 +46,12 @@ macro (_set_from_python outvar python_code)
4546
endif ( )
4647
endmacro ( )
4748

48-
_set_from_python (_GET_PYTHON_SITEARCH "import sys; from distutils import sysconfig; sys.stdout.write (sysconfig.get_python_lib (plat_specific=True, standard_lib=False, prefix=''))")
49+
if (USE_PYTHON_3) # ATTENTION, ne marche peut être pas pour 3.0 <= python < 3.12. Le cas échéant la commande du else doit convenir.
50+
_set_from_python (_GET_PYTHON_SITEARCH "import os, sys, sysconfig; sitepackages=os.path.relpath (sysconfig.get_path('platlib'), sys.base_prefix); sys.stdout.write (sitepackages)")
51+
else (USE_PYTHON_3)
52+
_set_from_python (_GET_PYTHON_SITEARCH "import sys; from distutils import sysconfig; sys.stdout.write (sysconfig.get_python_lib (plat_specific=True, standard_lib=False, prefix=''))")
53+
endif (USE_PYTHON_3)
54+
4955
set (PYTHON_BINDING_DIR ${_GET_PYTHON_SITEARCH})
5056
set (CMAKE_PYTHON_RPATH_DIR ${CMAKE_INSTALL_PREFIX}/${_GET_PYTHON_SITEARCH})
5157

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 "1")
7+
set (GUI_TOOLKITS_VARIABLES_RELEASE_VERSION "2")
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.2 : 28/08/24
2+
===============
3+
4+
cmake/python_binding.cmake : portage Python 3.12.
5+
6+
17
Version 1.5.1 : 18/06/24
28
===============
39

0 commit comments

Comments
 (0)