Skip to content

Commit

Permalink
Merge pull request #9178 from OSGeo/backport-9174-to-release/3.8
Browse files Browse the repository at this point in the history
[Backport release/3.8] Python bindings: remove run of 'python -m lib2to3' that is a no-op,...
  • Loading branch information
rouault authored Feb 1, 2024
2 parents 001b48f + 8ccdca7 commit 4138c5d
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions swig/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,19 +97,6 @@ set(GDAL_PYTHON_CSOURCES
COMMAND ${CMAKE_COMMAND} ${WERROR_DEV_FLAG} "-DFILE=${_file}" -P ${CMAKE_CURRENT_SOURCE_DIR}/modify_cpp_files.cmake)
endforeach()

if (NOT Python_EXECUTABLE)
message(FATAL_ERROR "Python_EXECUTABLE variable not set")
endif()
foreach(_file IN ITEMS ${GDAL_PYTHON_PYSOURCES})
file(TO_NATIVE_PATH "${_file}" _native_file)
add_custom_command(
OUTPUT ${_file}
APPEND
COMMAND
${Python_EXECUTABLE} -m lib2to3 --fix=import --fix=next --fix=renames --fix=unicode --fix=ws_comma --fix=xrange
--write --write-unchanged-files --nobackups ${_native_file})
endforeach()

add_custom_target(python_generated_files
DEPENDS ${GDAL_PYTHON_PYSOURCES} ${GDAL_PYTHON_CSOURCES}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
Expand Down

0 comments on commit 4138c5d

Please sign in to comment.