krober10nd / SeismicMesh

2D/3D serial and parallel triangular mesh generation tool for finite element methods.
https://seismicmesh.readthedocs.io/
GNU General Public License v3.0
123 stars 32 forks source link

simplifying build scripts #208

Closed krober10nd closed 3 years ago

krober10nd commented 3 years ago

203

krober10nd commented 3 years ago

@nschloe hey, hope all is well. I'm trying to migrate over to the new simplified pybind11 syntax for building the cpp codes. Locally when I build on my laptop, things seem to work but as you can see on the CI system none of the builds are able to find the compiled source codes.

Any help would be appreciated.

P.S., I did not understand what the point of this first command after pybind11 is (highlighted); I just made it _SeismicMesh but I suspect that may be a problem too. In pygalmesh it was _pygalmesh so I assumed it was the package name.

Screen Shot 2021-04-04 at 11 16 37 AM
nschloe commented 3 years ago

Your CPP module is called _SeismicMesh, not .cpp...

krober10nd commented 3 years ago

I see, thanks. In the previous build system, it put the *.so files in each directory so I could do relative module imports. Now I see that this produces one shared library with all them in it so will have to change the imports all to absolute imports I guess.

krober10nd commented 3 years ago

ah I think I can just create several pybind11 extensions in setup.py so that the *.so end up in the correct folders.

krober10nd commented 3 years ago

Now I get a bunch of

E   ImportError: dynamic module does not define module export function (PyInit__SeismicMesh)
krober10nd commented 3 years ago

It's a naming issue. Working on the tedious fix.

krober10nd commented 3 years ago

cool tests all pass...

so now the user if they're using the recent PEP518 standard, then they will not have to manually install pybind11 as this is done via the pytoml file upon building?

nschloe commented 3 years ago

so now the user if they're using the recent PEP518 standard, then they will not have to manually install pybind11 as this is done via the pytoml file upon building?

It's installed automatically, indeed.

nschloe commented 3 years ago

Biggest gain for you is probably this though:

screenshot

krober10nd commented 3 years ago

Yea I agree. The more lines, the more problems.