Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport release/3.8] Python bindings: remove run of 'python -m lib2to3' that is a no-op,... #9178

Merged
merged 1 commit into from
Feb 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading