diff options
| -rw-r--r-- | sources/shiboken6/generator/shiboken/cppgenerator.cpp | 8 | ||||
| -rw-r--r-- | sources/shiboken6/shibokenmodule/CMakeLists.txt | 28 | ||||
| -rw-r--r-- | sources/shiboken6/tests/shibokenmodule/module_test.py | 6 |
3 files changed, 0 insertions, 42 deletions
diff --git a/sources/shiboken6/generator/shiboken/cppgenerator.cpp b/sources/shiboken6/generator/shiboken/cppgenerator.cpp index 1254ed19b..56a25d2ca 100644 --- a/sources/shiboken6/generator/shiboken/cppgenerator.cpp +++ b/sources/shiboken6/generator/shiboken/cppgenerator.cpp @@ -6426,14 +6426,6 @@ bool CppGenerator::finishGeneration() << "_SignatureStrings);\n" << "\nreturn module;\n" << outdent << "}\n"; - // Temporary hack to allow that the same module can be used both as - // `Shiboken` and `shiboken6`; this will go away in 6.1. - if (moduleName() == QLatin1String("Shiboken")) { - s << "\n// This function should be removed in version 6.2.\n" - << "extern \"C\" LIBSHIBOKEN_EXPORT PyObject *PyInit_shiboken6()\n{\n" << indent - << "return PyInit_Shiboken();\n" << outdent - << "}\n"; - } file.done(); return true; } diff --git a/sources/shiboken6/shibokenmodule/CMakeLists.txt b/sources/shiboken6/shibokenmodule/CMakeLists.txt index db0e45cc5..e0693b8e2 100644 --- a/sources/shiboken6/shibokenmodule/CMakeLists.txt +++ b/sources/shiboken6/shibokenmodule/CMakeLists.txt @@ -62,31 +62,3 @@ configure_file("${shiboken_version_path}" install(FILES "${CMAKE_CURRENT_BINARY_DIR}/_git_shiboken_module_version.py" DESTINATION "${PYTHON_SITE_PACKAGES}/shiboken6") - -# Temporary copy of `Shiboken` to `shiboken6` until PySide 6.2 -# This code can (but need not) be removed after that. -file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/copy_renamed_binary.py" "if True: - import os, sys - from shutil import copyfile - fpath = sys.argv[-1] - fname = os.path.basename(fpath).replace('Shiboken', 'shiboken6') - # copying to `build` - builddir = '${CMAKE_CURRENT_BINARY_DIR}' - newname = os.path.join(builddir, '..', fname) - version_info = (${shiboken_MAJOR_VERSION}, ${shiboken_MINOR_VERSION}) - if version_info < (6, 2): - copyfile(fpath, newname) - # PYSIDE-1541: copying to `install` will be handled by INSTAll below. - # That solves the permission problems. - ") - -add_custom_command(TARGET shibokenmodule POST_BUILD - COMMAND ${PYTHON_EXECUTABLE} - "${CMAKE_CURRENT_BINARY_DIR}/copy_renamed_binary.py" - "$<TARGET_FILE:shibokenmodule>" - COMMENT "running Python postprocess" - ) - -install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../" - DESTINATION "${PYTHON_SITE_PACKAGES}/shiboken6/" - FILES_MATCHING PATTERN "shiboken6.*") diff --git a/sources/shiboken6/tests/shibokenmodule/module_test.py b/sources/shiboken6/tests/shibokenmodule/module_test.py index b3c28688d..f75d28c3b 100644 --- a/sources/shiboken6/tests/shibokenmodule/module_test.py +++ b/sources/shiboken6/tests/shibokenmodule/module_test.py @@ -120,12 +120,6 @@ class TestShiboken(unittest.TestCase): Shiboken.delete(obj) self.assertFalse(obj in Shiboken.getAllValidWrappers()) - # PYSIDE-1514: Check if shiboken6.shiboken6 exists for versions < 6.2 - def testOldShibokenName(self): - if Shiboken.__version_info__[:2] < (6, 2): - import shiboken6.shiboken6 - else: - self.assertRaises(ImportError, __import__, "shiboken6.shiboken6") if __name__ == '__main__': unittest.main() |
