diff --git a/recipe/meta.yaml b/recipe/meta.yaml index f87c7de0..df3dd221 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -19,8 +19,15 @@ source: # change tools module location - patches/tools.patch + # Fix major regression in 6.8.0 + # https://github.com/spyder-ide/qtpy/issues/494 + # https://github.com/conda-forge/pyside2-feedstock/issues/247 + # https://codereview.qt-project.org/c/pyside/pyside-setup/+/597328 + # https://bugreports.qt.io/browse/PYSIDE-2888 + - patches/try_to_fix_star_import_crash.diff + build: - number: 0 + number: 1 entry_points: - pyside6-rcc = PySide6.scripts.pyside_tool:rcc - pyside6-uic = PySide6.scripts.pyside_tool:uic @@ -148,6 +155,11 @@ test: # Regression to avoid clobber with qt-main package - test ! -f $PREFIX/bin/uic # [unix] - if exist %LIBRARY_BIN%\uic.exe exit 1 # [win] + # Star imports have broken many times on PySide6 + # https://github.com/spyder-ide/qtpy/issues/494 + # https://github.com/spyder-ide/qtpy/issues/480 + # We add it here for safety so we don't release really broken packages + - python -c "import PySide6; from PySide6.QtCore import *" about: home: https://wiki.qt.io/PySide2 diff --git a/recipe/patches/try_to_fix_star_import_crash.diff b/recipe/patches/try_to_fix_star_import_crash.diff new file mode 100644 index 00000000..75ec07c0 --- /dev/null +++ b/recipe/patches/try_to_fix_star_import_crash.diff @@ -0,0 +1,29 @@ +diff --git a/sources/shiboken6/libshiboken/sbkmodule.cpp b/sources/shiboken6/libshiboken/sbkmodule.cpp +index acadc60..1800f8d 100644 +--- a/sources/shiboken6/libshiboken/sbkmodule.cpp ++++ b/sources/shiboken6/libshiboken/sbkmodule.cpp +@@ -93,8 +93,10 @@ static void incarnateHelper(PyObject *module, const std::string_view names, + startPos = dotPos + 1; + dotPos = names.find('.', startPos); + } +- // now we have the type to create. ++ // now we have the type to create. (May be done already) + auto funcIter = nameToFunc.find(std::string(names)); ++ if (funcIter == nameToFunc.end()) ++ return; + // - call this function that returns a PyTypeObject + auto tcStruct = funcIter->second; + auto initFunc = tcStruct.func; +@@ -178,7 +180,11 @@ void resolveLazyClasses(PyObject *module) + while (!nameToFunc.empty()) { + auto it = nameToFunc.begin(); + auto attrNameStr = it->first; +- incarnateType(module, attrNameStr.c_str(), nameToFunc); ++ if (attrNameStr.find('.') == std::string::npos) { ++ incarnateType(module, attrNameStr.c_str(), nameToFunc); ++ } else { ++ nameToFunc.erase(it); ++ } + } + } +