Comments (16)
In case anyone here is itching to get back to work on their FreeCAD projects, #91 should do the trick!
from pivy.
Can you try running the privy test?
from pivy.
Sure, what's the command? I'm using CMake for the build system.
Is it built in, or do I just need to run the test files with python?
from pivy.
I ran the tests against my installed package and unsurprisingly there are errors:
https://hobbes1069.fedorapeople.org/coin_tests.log
from pivy.
I am currently stuck with python3.10 update at pyside2. Therefore it most likely need some time until I can test privy with python 3.10.
from pivy.
Me too. I've worked through some of it though.
https://src.fedoraproject.org/rpms/python-pyside2/blob/rawhide/f/python3.10.patch
I have some more but haven't committed it yet.
$ cat pyside-python310.patch
Index: pyside-setup-opensource-src-5.15.2/sources/shiboken2/libshiboken/basewrap per.cpp
===================================================================
--- pyside-setup-opensource-src-5.15.2.orig/sources/shiboken2/libshiboken/basewr apper.cpp
+++ pyside-setup-opensource-src-5.15.2/sources/shiboken2/libshiboken/basewrapper .cpp
@@ -366,7 +366,7 @@ SbkObjectType *SbkObject_TypeF(void)
static PyTypeObject *type = nullptr;
if (!type) {
type = reinterpret_cast<PyTypeObject *>(SbkType_FromSpec(&SbkObject_Typ e_spec));
- Py_TYPE(type) = SbkObjectType_TypeF();
+ Py_SET_TYPE(type, SbkObjectType_TypeF());
Py_INCREF(Py_TYPE(type));
type->tp_weaklistoffset = offsetof(SbkObject, weakreflist);
type->tp_dictoffset = offsetof(SbkObject, ob_dict);
@@ -1110,7 +1110,7 @@ introduceWrapperType(PyObject *enclosing
typeSpec->slots[0].pfunc = reinterpret_cast<void *>(baseType ? baseType : S bkObject_TypeF());
PyObject *heaptype = SbkType_FromSpecWithBases(typeSpec, baseTypes);
- Py_TYPE(heaptype) = SbkObjectType_TypeF();
+ Py_SET_TYPE(heaptype, SbkObjectType_TypeF());
Py_INCREF(Py_TYPE(heaptype));
auto *type = reinterpret_cast<SbkObjectType *>(heaptype);
#if PY_VERSION_HEX < 0x03000000
from pivy.
Great, I will try the patches. Which version of pyside2 / qt are you compiling?
from pivy.
Not sure if it makes a lot of sense to backport these changes. Maybe it's better to wait for a newer qt / pyside2 version to be packaged for conda-forge. I guess qt6.x and pyside2 6.x will have python 3.10 support.
from pivy.
Pyside2 5.15.2
Qt 5.15.2
Yes, the first patch was backported from a Pyside2 6.x commit. I don't know how much work they will put into Pyside2 5.x at this point, but is FreeCAD compatible with Qt6? I don't even want to think about migrating all of Fedora :)
from pivy.
Yep, I see the troubles. I will try to patch pyside 5.13 to work with python 3.10. once done I will come back to this issue.
from pivy.
Sounds good. I played around with trying to find python related commits from 6.2.2 and try to backport but it became a rabbit hole and I had to give up.
from pivy.
@hobbes1069 conda-forge is updating to qt5.15 so we can work on the same issue. I asked a question @ gitter. I hope someone takes care of this issue:
https://gitter.im/PySide/pyside2?at=61bb76659a9ec834fbd1c865
from pivy.
@hobbes1069 It looks like the FreeCAD issue is partly related to Coin3 vs. Coin4. The fc35 pivy is built against Coin4, while the FreeCAD modules seem to be using the Coin3 API (???).
$>dnf repoquery --provides Coin3
Last metadata expiration check: 3:06:45 ago on Fri 31 Dec 2021 07:18:25 PM PST.
Coin3 = 3.1.3-29.fc35
Coin3(x86-32) = 3.1.3-29.fc35
Coin3(x86-64) = 3.1.3-29.fc35
libCoin.so.60
libCoin.so.60()(64bit)** <===
$> dnf repoquery --provides Coin4
Last metadata expiration check: 3:08:23 ago on Fri 31 Dec 2021 07:18:25 PM PST.
Coin4 = 4.0.0-9.fc35
Coin4(x86-32) = 4.0.0-9.fc35
Coin4(x86-64) = 4.0.0-9.fc35
libCoin.so.80
libCoin.so.80()(64bit) <===
dnf repoquery --requires python3-pivy
Last metadata expiration check: 3:09:46 ago on Fri 31 Dec 2021 07:18:25 PM PST.
/usr/bin/python3
libCoin.so.80()(64bit) <===
libSoQt.so.20()(64bit)
libc.so.6(GLIBC_2.14)(64bit)
libgcc_s.so.1()(64bit)
libgcc_s.so.1(GCC_3.0)(64bit)
libgcc_s.so.1(GCC_3.3.1)(64bit)
libstdc++.so.6()(64bit)
libstdc++.so.6(CXXABI_1.3)(64bit)
libstdc++.so.6(CXXABI_1.3.8)(64bit)
libstdc++.so.6(CXXABI_1.3.9)(64bit)
libstdc++.so.6(GLIBCXX_3.4)(64bit)
python(abi) = 3.10
rtld(GNU_HASH)
The following works just fine in the FreeCAD Python console:
from pivy import coin
doc = App.newDocument("testpivy")
view = Gui.ActiveDocument.ActiveView
sg=view.getScenegraph()
sg.addChild(coin.SoCube())
This minimum excerpt from the Draft workbench code produces an error similar to the above:
pick = coin.SoPickStyle()
pick.style.setValue(coin.SoPickStyle.UNPICKABLE)
The issue is that the style attribute does not exist. Which may be due to incompatible APIs between Coin3 and Coin4 (I do not know either one).
from pivy.
a couple of use noticed similar issues on macos as well. those of us who building and install freecad on macos with macos homebrew have seen issues related to python 3.10
it appears shiboken2 v5.15.2 will not compile / build with the latest python 3.10
FreeCAD/homebrew-freecad#267 (comment)
there was a bug reported upstream below,
https://bugreports.qt.io/browse/PYSIDE-1436
i mention all of this because apparently python 3.10 has introduced some changes that aren't compatible with libraries like shiboken2 in its current state unfortunately. and i doubt the upstream qt maintainers are gunna wanna back port fixes to get shiboken2 v5.15.2 and pyside2 v5.15.2 to work with python 3.10
from pivy.
From what version onwards is pivy compatible with python 3.10, is it 0.6.6?
from pivy.
@adrianinsaval it should be in 0.6.7
.
from pivy.
Related Issues (20)
- SoGui.init(sys.argv[0]) run error HOT 6
- 'pivy._coin' has no attribute 'delete_SoGeo' HOT 7
- circular import error HOT 16
- Possible to SegFault SoPerspectiveCamera.getMatrix
- Pivy fails to build with Python 3.12 HOT 4
- Pivy failes to build with Python 3.13 HOT 4
- ImportError: cannot import name 'QActionGroup' from 'pivy.qt.QtWidgets' HOT 5
- imp module is removed in Python 3.12 HOT 2
- LINK : fatal error LNK1104: 无法打开文件“"G:\coin\coin\VS\Coin\lib\Coin4d.lib"”
- move to github actions and build for multiple python versions
- Transfer ownership of PyPi entry HOT 2
- How do you recommend projects find pivy using CMake ? (Is there a Findpivy.cmake?) HOT 4
- Recursion in SoBaseKit.__getattr__ HOT 4
- unable to open file "...\Coin3D\lib\Coin4.lib" HOT 1
- Neither setup.py nor CMake build works without issues
- Could not find a package configuration file provided by "Coin" HOT 4
- macos build failure using cmake HOT 20
- SoVMRLTransform.setMatrix doesn't accept a parameter
- FreeCAD fails SIGSEGV, some pivy tests/ FAIL, one fails with SIGSEGV HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pivy.