Skip to content
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

[Question] Modifying setup.py with pybind used in a submodule #83

Open
HunterStephens opened this issue Jul 12, 2021 · 2 comments
Open

Comments

@HunterStephens
Copy link

HunterStephens commented Jul 12, 2021

If I have a module built with pybind as sub-module how would my already constructed setup.py incorporate this? For example, my package is structured like this.

\--package_home
         setup.py
         \--base_package
                 __init__.py
                 a1.py
                 a2.py
                 \--sub_package
                          __init__.py
                          [pybind .so module would go here]
                          b1.py
                          
@henryiii
Copy link
Collaborator

You'd just use the full dotted path for the submodule name.

@Parskatt
Copy link

Parskatt commented May 15, 2024

@henryiii Could you clarify / make an example with a mixed python/c++ module with pybind?

I assume I would modify the setup.py to specify the folder containing the python package as "packages = X". Would ext_modules automatically end up in the root of that package folder?

I guess I can just verify this myself.

EDIT: So this works, but the name needs to have the relpath, as you write above.

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

No branches or pull requests

3 participants