aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Tismer <tismer@stackless.com>2021-08-13 12:09:45 +0200
committerChristian Tismer <tismer@stackless.com>2021-08-13 13:25:10 +0200
commitdaea67028c8c25467aa7f3dda3e1809c81a07bc3 (patch)
tree801c5b338d5500c4fbb01d049d9c1e9eedd70c6b
parentafa216bb3145009b819db643a44f47b20d5ccd2d (diff)
shiboken: remove the temporary shiboken6 alias
During transition from shiboken6.shiboken6 to shiboken6.Shiboken, there was a compatibility hack to have both versions available. Remove that for 6.2 since it is no longer needed and it creates unnecessary extra files that are disturbing. [ChangeLog][shiboken6] The temporary shiboken6.shiboken6 alias was removed. Now there is an unambiguous shiboken6.Shiboken, only. Task-number: PYSIDE-1637 Change-Id: Ib61e2feac892c07dd71d8a852b1c6ce80f569050 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
-rw-r--r--sources/shiboken6/generator/shiboken/cppgenerator.cpp8
-rw-r--r--sources/shiboken6/shibokenmodule/CMakeLists.txt28
-rw-r--r--sources/shiboken6/tests/shibokenmodule/module_test.py6
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()