Skip to content

WIP: Add helper for creating modules.#121

Merged
gerrymanoim merged 13 commits intomasterfrom
automodule
Jun 22, 2020
Merged

WIP: Add helper for creating modules.#121
gerrymanoim merged 13 commits intomasterfrom
automodule

Conversation

@llllllllll
Copy link
Copy Markdown
Contributor

The created modules help ensure that import_array and
py::abi::ensure_compatible_libpy_abi() are called correctly.
This wrapper also guards against C++ exceptions being thrown in the module init.
The wrapper also manages many Python 2/3 compatibility issues.

@llllllllll llllllllll force-pushed the automodule branch 2 times, most recently from 9e303af to db8bfec Compare February 18, 2020 17:58
@llllllllll llllllllll mentioned this pull request Mar 10, 2020
20 tasks
@llllllllll llllllllll changed the title ENH: Add helper for creating modules. WIP: Add helper for creating modules. Mar 10, 2020
Joe Jevnik and others added 2 commits June 18, 2020 12:17
The created modules help ensure that `import_array` and
`py::abi::ensure_compatible_libpy_abi()` are called correctly.
This wrapper also guards against C++ exceptions being thrown in the module init.
The wrapper also manages many Python 2/3 compatibility issues.
@gerrymanoim
Copy link
Copy Markdown
Contributor

@llllllllll - I removed the py2 compat code and rebased this branch against master, but I'm confused about what the state of the member_function code in autoclass.h should be.

@gerrymanoim
Copy link
Copy Markdown
Contributor

Note for myself, tests seem to be getting python2.7?

tests -I submodules/googletest/googletest/include \
	-lpthread -L/usr/lib/python2.7/config-x86_64-linux-gnu -L/usr/lib -lpython2.7 -lpthread -ldl  -lutil -lm  -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions -lstdc++fs -flto

I probably messed up the makefile merge.

TODO: investigate the clang sadness.

@gerrymanoim
Copy link
Copy Markdown
Contributor

Weirdly tests now fully pass locally (in gcc)

@gerrymanoim
Copy link
Copy Markdown
Contributor

I had trouble getting the list to work - open to ideas.

@gerrymanoim
Copy link
Copy Markdown
Contributor

Note:

  • get rid of _libpy_MOD_RETURN_ERROR and _libpy_MOD_RETURN_SUCCESS

Comment thread include/libpy/automodule.h Outdated
Comment thread Makefile
Comment thread Makefile Outdated
Comment thread include/libpy/detail/autoclass_cache.h Outdated
Comment thread include/libpy/automodule.h Outdated
@gerrymanoim gerrymanoim merged commit ac86568 into master Jun 22, 2020
@gerrymanoim gerrymanoim deleted the automodule branch June 22, 2020 22:44
llllllllll pushed a commit that referenced this pull request Jun 23, 2020
* ENH: Add helper for creating modules.

The created modules help ensure that `import_array` and
`py::abi::ensure_compatible_libpy_abi()` are called correctly.
This wrapper also guards against C++ exceptions being thrown in the module init.
The wrapper also manages many Python 2/3 compatibility issues.

Co-authored-by: Gerry Manoim <gmanoim@quantopian.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants