-
Notifications
You must be signed in to change notification settings - Fork 163
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
CadQuery phase 2: OCP #1099
CadQuery phase 2: OCP #1099
Conversation
I think we might be able to workaround the cmake mess with |
As maintainer of the opencascade package, I'm planning on removing the 7.4.0 line not very far into the future. AFAIK pkgcheck and repoman can't handle cross-repo dependencies, so a removal would silently break the
I haven't looked at your code yet, but all three packages, clang, vtk and occt ship with the new config style
Replace |
Thank you for the blessed work you have done, @waebbl.
Excellent! This simplifies my life, for which I am also grateful. I'll drop the 7.4.0 ebuild exactly as you say. 👍
Let us just safely assume that it's ugly, fragile, and dangerous.
EDIT: Ugh! Nothing I wrote below applies. I conveniently forgot to mention that OCP doesn't actually have a top-level
Since that command runs both outside of and before any CMake context, there's no relevant This is me sighing into my mechanical Kinesis Advantage keyboard seemingly refurbished from the 70's Star Trek set. 😩 ⌨️
|
@AndrewAmmerlaan: Your proposed Under optimistic utopian conditions, this should take a day or two to rework. And then there's reality. |
I never had to work with toml files before, so excuse me, if my suggestions are not usable.
Note the removal of the COMPONENTS option for occt. There's no component named OPENCASCADE defined in the config file, which might give an error if it's defined. If no components are specified, the occt config file looks for all modules which have been installed. We might also need to check whether the components passed for vtk are correct, but IIRC they are. |
If you call |
That feeling when you double facepalm yourself in the privacy of your own man-cave.
|
Yupper! You are right, because you are @AndrewAmmerlaan. Patching
This is why OCP needs a top-level |
add OCP, a mandatory dependency of CadQuery Signed-off-by: Cecil Curry <leycec@gmail.com>
Okay! We're now cooking with electrons. Andrew's exhaustive code review has yielded total success. This is no surprise. The only surprise is that I did what Andrew said this weekend rather than just binge-watch Ted Lasso. In short, I've now:
We're almost done! But we're not quite there. We still need to regenerate Open Cascade symbols with LIEF (Library for Instrumenting Executable Formats) in the In any case, let's push this before a freak thunderstorm demagnetizes the last good sectors on the ten year-old mechanical HDD hosting my most sensitive data. ⛈️ 💾 |
Awesome, thanks! There was one left over |
Bam. Thanks so much for the insightful code reviews and cleanup! I really appreciate how helpful, constructive, and fun everyone is here. Another CadQuery PR bites the Up next: "CadQuery phase 2.5: OCP + LIEF," where we improve the OCP ebuild to dump local OCP symbols with LIEF before generating OCP bindings for safety. The tension is palpable. |
This PR continues the ancient viking saga of CadQuery first transcribed in #1097. We boldly package the next major dependency: OCP, Python bindings to the entirety of Open Cascade auto-generated by pywrap. This PR is much smaller and saner than phase 1, mostly because the only things OCP needs are (A) Open Cascade and (B) pywrap, which are all packaged. We now give thanks.
Since Gentoo slots Open Cascade into the prior 7.4.0 line and ongoing 7.5.x line, this PR follows suite by providing two suspiciously similar OCP ebuilds:
cadquery-ocp-7.4.0.ebuild
, the most recent stable release of OCP targetting Open Cascade 7.4.0. Shockingly, it works. I know, right? 😮cadquery-ocp-7.5.2_rc20210706.ebuild
, the most recent Git commit of OCP targetting Open Cascade 7.5.2. Shockingly, it also works. What is even going on here?These two ebuilds are mostly duplicates of one other. Minor differences between the two all stem from minor differences between Open Cascade 7.4.0 and 7.5.2. Basically, Open Cascade 7.5.2 supports JSON and is packaged by Gentoo into saner system directories (e.g.,
/usr/include/opencascade-7.5.2/
rather than/usr/lib64/opencascade-7.4.0/ros/include/
). That's it. We now give thanks.Everything mostly makes sense on the packaging front... subject to these familiar caveats:
sed
solves all these problems and more. Thanks, Stallman, for you continue to grace us with modern solutions to age-old problems.cmake
invocation. Thecmake
eclass doesn't play nicely with thedistutils-r1
eclass, so I ditched it. Instead, we invokecmake
manually. Unfortunately, ...sigh the build process by which OCP generates bindings isn't quite as automated as one would hope – by which I mean it's totally unautomated. I had to manually reverse engineer this process from their Anaconda-specificbuild-bindings-job.yml
file. To compound matters, this process needs header include directories for Clang, VTK, and Open Cascade – but there isn't an automated way to query for those directories. Neither Clang, VTK, nor Open Cascade install.pc
files for inspection bypkg-config
. Although Clang, VTK, and Open Cascade do all install.cmake
files for inspection bycmake
, OCP ignores those files and instead ships its own brokenFindOpenCascade.cmake
file that completely fails at its only job. So, we (A) manually find header include directories and (B) patch those directories intoFindOpenCascade.cmake
. It works, but it sucks. I'll be filing an upstream mega-issue detailing all of this suckage once we finish packaging CadQuery in full.Upstream will pay for their crimes! Until they do, OCP is actually really amazing – ignoring the packaging crisis detailed above. OCP not only provides one-to-one Python bindings for Open Cascade but, when combined with CadQuery, a much higher-level and easier-to-use API for converting curmudgeonly CAD formats birthed in the seventh circle of Hell like STEP, IGES, and DXF into reasonable VTK
PolyData
objects.Honestly, I consider STEP, IGES, and DXF unusable without OCP. All hail CadQuery for it makes the insane things sane again.