Previously, Arcus, Savitar, and pynest2d were being build with a missing sip flag. This led to Cura
getting `ValueError: PyCapsule_GetPointer called with incorrect name`, if those libraries were not
imported (even if they were unused).
This flag was added in the following commits:
* 83393f989c
* e9e530d963
* bd440b50ad
Since the issue seems to be gone now, the unused imports should be removed from Cura.
All credits go to Rex Dieter for figuring that this missing flag was the issue.
https://src.fedoraproject.org/rpms/libarcus/pull-request/1#request_diff
CURA-8146
Only whenever the sentry_sdk module is there functions of this module will be used.
The only changes, which were needed to be made, are done on cura_app.py and cura.CrashHandler.
Whenever the module is not available, it's functions will be omitted.
The if-clauses could happen earlier, but this at least the bare minimum, and, to be honest, on Ultimaker's distribution it won't speed up anything.
I expect the if-clause to take the same amount of runtime sooner or later. The check is the same and it should be on Ultimaker's distribution always be "True".
Signed-off-by: Thomas Karl Pietrowski <thopiekar@gmail.com> (github: thopiekar)
CURA-6739
Note that this doesn't work with Python 3.5.7, but with 3.6 and 3.7. To
make Python 3.5.7 work, a fix needs to be backported from 3.6 for
ctypes.util.find_library() for Linux.
The expanduser function will expand to a combination of HOMEDRIVE and HOMEPATH which might not be the same as APPDATA if your configuration is very weird (e.g. you've changed your APPDATA location).
Contributes to CURA-6418.
- Create SingleInstance class to handling single instance stuff.
- Instead of calling getInstance() everywhere, initialize each object
explicitly in order when application starts and getInstance()s do not
create instances any more and they merely return the created
instances.
- Only set initial values in construtor functions __init__(). Move the
initialization of context-aware (i.e. things that depend on other
things) to separate functions.
- Split application creation and initialziation into several steps and
them should be called explicitly in the correct order.