-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[wip] create a flatpak #76
Conversation
I remember getting that error. Do not remember which was the solution, but you may want to try with adding these dependencies: |
I tried to not copy the dependencies folder, because I'm not supposed to do this since the main command is executed from , and now I have this error:
Do you think this means that cqe libraries are not recognized? |
@roipoussiere I have no idea sorry. 🤷♀️ 😅 |
@roipoussiere I'm guessing it's a version mismatch (lower version number) that doesn't include |
I think having a flatpak with CadQuery would be great. Keep up the work! |
This week I took over the development of a flatpak for cq-editor. The goal is to publish an all-in-one app that can be easily installed (several clicks or one command line) on all Linux distributions, without using Conda (I personally always have troubles with it). More precisely, I'm currently working 4 flatpaks:
Since those 2 lasts are CadQuery dependencies, it does't require so much effort for me to publish them but will potentially be useful for some users, so it's a good deal. I created 2 flatpaks for CQ oce and occt in order to anticipate the cq transition to occt, while working on a ready to use cq flatpak based on oce. By the way I'm interested by some explanations about this transition to occt, I noted the presence of the OCP repo and the cq ocp branch but I don't know if it's currently working or not. Note that I created dedicated repositories with the idea of publishing them on flathub (I will add them in its Github organization), but of course the flatpak manifest could also be included in the CadQuery/cq-editor repository if you want. Once finished, I may eventually work on a Snap app, which is an other application packaging system similar to Flatpak (this will not be so difficult is the flatpak is functional). I'm currently facing some issues concerning the CadQuery Flatpak development, I list them here, maybe you can help on some of them (I also have other issues that I'm investigating by myself before to create news tickets):
|
@roipoussiere that's great you found some time for this. I've looked at the issues you linked but unfortunately can't help off my head with them though I'd love to support the work if it won't eat up much time. If you have any other issues, don't hesitate and ask. |
@roipoussiere Thanks for taking this on.
Some tests are still failing, but there is a lot of work going into OCP, and the plan is that it will replace PythonOCC as our OCCT bindings. |
@jmwright Do you think it will be usable soon? Maybe it's better for me to focus on the OCP version for the flatpak. Anyway, I don't really understand how to install OCP on Linux, even after looked at the azure-pipelines file as explained in the readme, can you briefly explain? |
@roipoussiere If you don't need the bleeding edge updates, you can download the OCP*.so file from releases. https://github.com/CadQuery/OCP/releases And then currently you have to use that with the OCP branch of CadQuery. The OCP branch will eventually be merged into master once it's stable enough. |
Thanks. OCP import works but the tests fails because OCP.gp can not be imported. Same for you @jmwright? click to expandEEEEEEEE ====================================================================== ERROR: test_cad_objects (unittest.loader._FailedTest) ---------------------------------------------------------------------- ImportError: Failed to import test module: test_cad_objects Traceback (most recent call last): File "/usr/lib/python3.7/unittest/loader.py", line 436, in _find_test_path module = self._get_module_from_name(name) File "/usr/lib/python3.7/unittest/loader.py", line 377, in _get_module_from_name __import__(name) File "/run/build/cadquery/cadquery/tests/test_cad_objects.py", line 5, in from tests import BaseTest File "/app/lib/python3.7/site-packages/tests/__init__.py", line 1, in from cadquery import * File "/app/lib/python3.7/site-packages/cadquery/__init__.py", line 2, in from .occ_impl.geom import Plane, BoundBox, Vector, Matrix File "/app/lib/python3.7/site-packages/cadquery/occ_impl/geom.py", line 3, in from OCP.gp import gp_Vec, gp_Ax1, gp_Ax3, gp_Pnt, gp_Dir, gp_Trsf, gp_GTrsf, gp, gp_XYZ ModuleNotFoundError: No module named 'OCP.gp' le> from OCC.Core.gp import ( ====================================================================== ERROR: test_cadquery (unittest.loader._FailedTest) ---------------------------------------------------------------------- ImportError: Failed to import test module: test_cadquery Traceback (most recent call last): File "/usr/lib/python3.7/unittest/loader.py", line 436, in _find_test_path module = self._get_module_from_name(name) File "/usr/lib/python3.7/unittest/loader.py", line 377, in _get_module_from_name __import__(name) File "/run/build/cadquery/cadquery/tests/test_cadquery.py", line 11, in from pytest import approx ModuleNotFoundError: No module named 'pytest' File "/run/build/cadquery/cadquery/tests/test_cadquery.py", line 11, in from pytest import approx ====================================================================== ERROR: test_cqgi (unittest.loader._FailedTest) ---------------------------------------------------------------------- ImportError: Failed to import test module: test_cqgi Traceback (most recent call last): File "/usr/lib/python3.7/unittest/loader.py", line 436, in _find_test_path module = self._get_module_from_name(name) File "/usr/lib/python3.7/unittest/loader.py", line 377, in _get_module_from_name __import__(name) File "/run/build/cadquery/cadquery/tests/test_cqgi.py", line 10, in from cadquery import cqgi File "/app/lib/python3.7/site-packages/cadquery/__init__.py", line 2, in from .occ_impl.geom import Plane, BoundBox, Vector, Matrix File "/app/lib/python3.7/site-packages/cadquery/occ_impl/geom.py", line 3, in from OCP.gp import gp_Vec, gp_Ax1, gp_Ax3, gp_Pnt, gp_Dir, gp_Trsf, gp_GTrsf, gp, gp_XYZ ModuleNotFoundError: No module named 'OCP.gp' from OCC.Core.gp import ( ModuleNotFoundError: No module named 'OCC' ====================================================================== ERROR: test_exporters (unittest.loader._FailedTest) ---------------------------------------------------------------------- ImportError: Failed to import test module: test_exporters Traceback (most recent call last): File "/usr/lib/python3.7/unittest/loader.py", line 436, in _find_test_path module = self._get_module_from_name(name) File "/usr/lib/python3.7/unittest/loader.py", line 377, in _get_module_from_name __import__(name) File "/run/build/cadquery/cadquery/tests/test_exporters.py", line 9, in from cadquery import * File "/app/lib/python3.7/site-packages/cadquery/__init__.py", line 2, in from .occ_impl.geom import Plane, BoundBox, Vector, Matrix File "/app/lib/python3.7/site-packages/cadquery/occ_impl/geom.py", line 3, in from OCP.gp import gp_Vec, gp_Ax1, gp_Ax3, gp_Pnt, gp_Dir, gp_Trsf, gp_GTrsf, gp, gp_XYZ ModuleNotFoundError: No module named 'OCP.gp' ModuleNotFoundError: No module named 'OCC' |
Looks like OCP is not on you |
I can do a |
Not better.
click to expand================================ test session starts ================================ platform linux -- Python 3.7.4, pytest-5.4.2, py-1.8.1, pluggy-0.13.1 rootdir: /run/build/cadquery/cadquery collected 0 items / 8 errors |
fyi I do the following (assuming
Also, in a import sys
>>> sys.path
['', '/usr/lib/python37.zip', '/usr/lib/python3.7', '/usr/lib/python3.7/lib-dynload', '/usr/lib/python3.7/site-packages', '/app/lib/python3.7/site-packages']
>>> 'OCP' in sys.modules.keys()
True
>>> import OCP
>>> import OCP.gp
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'OCP.gp' |
Note that |
I have other projects to focus on right now, so if someone want to continue this work, feel free to contribute. I reference my sources in this comments. |
A (perhaps naive idea). Wouldnt it be possitle to pull the binary release for Linux and wrap that in a flatpak? Or at least use the same recepie when building it in the flatpak as for when its packaged here? @adam-urbanczyk ? Love the project btw |
Since cadquery can now be installed with pip, I think it makes more sense to create a pip package for cadquery editor instead a flatpack. |
now 2025... are there plans? seems simple to implement. It's extremely comfy to install programs with flatpak now, pip might not work for everyone, for example I don't want my computer to be filled with some random dependencies again. |
I meant pure wayland, not Xwayland, it's fine on powerful pc's but my underpowered celeron can't stand the overhead of xwayland (xwayland-satellite). I'm referring to something like QT_QPA_PLATFORM=wayland, native wayland~ |
/!\
do not merge - not working yet/!\
An attempt to fix #70.
I have no experience building flatpacks, I followed flatpak documentation.
It's not working yet, but well, it's a start.
Usage (for now):
This fails with this error:
Maybe it's because there is hardcoded paths in the repo?
edit: add flatpak command to download runtimes