Conversation
c0a6496 to
1b63707
Compare
|
Hi @cjshearer, can you use the trame feature of cadquery in jupyter notebook, and check if we need this patch for trame/trame-client: https://github.com/qbisi/nur-fem/blob/master/pkgs/python-by-name/trame/copytree-writable.patch. |
|
@qbisi I haven't used a jupyter notebook in a long time, especially not on nixpkgs - is there some kind of existing example you could refer me to, so that I can test that? Also, do you think that would that require packaging trame-jupyter-extension as well? If so, I'd be worried about scope-creep; my goal wasn't to make each dependency work for everything, but to get a modern cadquery/cq-editor version back in nixpkgs. |
|
Maybe this one: CadQuery/cadquery#1786 |
1b63707 to
a89257e
Compare
Oh, I understand now! Yeah, I tested that. Test script
|
|
|
@cjshearer with #442540, we can create a python venv with some system python packages from nixpkgs while others from pypi. The key to use cq-editor is to package the hard c dep cadquery-ocp in nixpkgs, while we can install other pure python/javascript pacakges from pypi. Maintaing trame* packages can be painfull jobs as these projects are managed/published by npm's semantic-release which is unfriendly to linux distro maintainers. But i am not against that you take the responsibility to package all these depdenencies cq-editor need in nixpkgs. |
a89257e to
1ac45de
Compare
…from pypi These dependencies contain pure python and js, so we can avoid the complexity of packing them from git without patching any binaries.
1ac45de to
12b5712
Compare
|
It's time to go cadquery-ocp-7.9.3.0 directly with #486359 |
|
Ah, that's why cadquery-ocp failed after rebasing on master 😆. I'll get right on that. |
|
@qbisi, #486359 is actually somewhat of a problem - upstream cadquery still depends on ocp 7.8.1. Just like the AUR package, this would put us ahead of upstream (cadquery PR for OCP 7.9), causing cadquery to fail during import: DetailsExecuting pythonImportsCheckPhase
Check whether the following modules can be imported: cadquery
Traceback (most recent call last):
File "<string>", line 1, in <module>
import sys; import importlib; list(map(lambda mod: importlib.import_module(mod), sys.argv[1:]))
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<string>", line 1, in <lambda>
import sys; import importlib; list(map(lambda mod: importlib.import_module(mod), sys.argv[1:]))
~~~~~~~~~~~~~~~~~~~~~~~^^^^^
File "/nix/store/slhpx9glq7vl99bwi93bgrhn3syv98s1-python3-3.13.11/lib/python3.13/importlib/__init__.py", line 88, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 1023, in exec_module
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
File "/nix/store/c9a9nfvg92z13qji291byqsli4nx7y00-python3.13-cadquery-2.6.1/lib/python3.13/site-packages/cadquery/__init__.py", line 11, in <module>
from .occ_impl.shapes import (
...<9 lines>...
)
File "/nix/store/c9a9nfvg92z13qji291byqsli4nx7y00-python3.13-cadquery-2.6.1/lib/python3.13/site-packages/cadquery/occ_impl/shapes.py", line 359, in <module>
ta.TopAbs_VERTEX: TopoDS.Vertex_s,
^^^^^^^^^^^^^^^
AttributeError: module 'OCP.TopoDS.TopoDS' has no attribute 'Vertex_s'. Did you mean: 'Vertex'?
building '/nix/store/b48hpx9hcg999bnpfj0v3wcyan3nls9x-python3-3.13.11-env.drv'...
created 966 symlinks in user environment
Traceback (most recent call last):
File "/home/cjshearer/repos/nixpkgs/./pkgs/development/python-modules/cadquery/test.py", line 12, in <module>
from cadquery.fig import Figure
File "/nix/store/9xik2vvx6bl2byw7gcs89gsbd07sh092-python3-3.13.11-env/lib/python3.13/site-packages/cadquery/__init__.py", line 11, in <module>
from .occ_impl.shapes import (
...<9 lines>...
)
File "/nix/store/9xik2vvx6bl2byw7gcs89gsbd07sh092-python3-3.13.11-env/lib/python3.13/site-packages/cadquery/occ_impl/shapes.py", line 359, in <module>
ta.TopAbs_VERTEX: TopoDS.Vertex_s,
^^^^^^^^^^^^^^^
AttributeError: module 'OCP.TopoDS.TopoDS' has no attribute 'Vertex_s'. Did you mean: 'Vertex'? |
12b5712 to
b5092b1
Compare
|
Maybe we can wait for CadQuery/cadquery#1968. I would also prefer generating cadquery-ocp source with pywrap based on opencascad-occt 7.9.3 like @tnytown's work in #433247. Vtk/opencascade-occt (Not vtk-full) in nixpkgs does not neccessary have mpi related symbol, it's better we dump the symbol and generate source from vtk/opencascade-occt in nixpkgs. |
|
Hi, good to see work on this constellation of packages progressing! Let me know if any help is needed with cadquery-ocp; I have some local work that I'll tidy up and push. |
|
The tip at #433247 has a working |

Adds cq-editor, cadquery, and their dependencies.
The latest attempt for some of these dependencies (notably cadquery/cadquery-ocp) stalled in this PR.
Note that while previous packagers (including myself) attempted to codegen the OCP python bindings, I have chosen here to take the simpler and more reliable approach of using the python bindings from the GitHub releases for OCP (which we then build).
I recognize that this approach does not cover darwin, but I do not have a Mac to test on anyway. If someone would like to add Mac support, I would encourage them to try, but suggest that this should be done in a follow-up PR; this PR is massive as-is.
If someone else with experience packaging this (@tnytown, @vincentbernat, @marcus7070) would like to jump in as a maintainer for these, please feel free!
Also tagging previous reviewers: @Sigmanificient, @qbisi.
Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.