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

Please allow to use the pre-installed bybind11 package #23

Closed
yurivict opened this issue Dec 21, 2018 · 5 comments
Closed

Please allow to use the pre-installed bybind11 package #23

yurivict opened this issue Dec 21, 2018 · 5 comments
Assignees
Labels

Comments

@yurivict
Copy link

The pybind11 package is available for a wide variety of systems: https://repology.org/metapackage/pybind11/versions, so there is no need to download and rebuild it separately.

@sgsaenger
Copy link
Owner

Yes, but I'm new to cmake and have no clue how to reliably find the system-wide installation.
As it's header-only, i don't reckon it a pressing issue, but hints or PRs are welcome!

@yurivict
Copy link
Author

yurivict commented Dec 21, 2018

For a header-only library it can add a cmake variable PYBIND11_HEADER_PATH variable that would use these headers.

@yurivict
Copy link
Author

Better yet, Python binding should be its own, separate project. Systems generally have multiple versions of python installed at the same time, and the binding also needs to be independently installed at the same time for each of them. setup.py-based bindings are the best, and a way to go.

@sgsaenger
Copy link
Owner

For a header-only library it can add a cmake variable PYBIND11_HEADER_PATH variable that would use these headers.

Ah, of course. So defaulting to external/pybind11, but can be replaced with user-/maintainer-defined values. Will look into it.

Better yet, Python binding should be its own, separate project. Systems generally have multiple versions of python installed at the same time, and the binding also needs to be independently installed at the same time for each of them. setup.py-based bindings are the best, and a way to go.

The targeted python version can be choosen as for all pybind11-projects, so that's a non-issue.
I've thought about splitting it up, but there are two problems:

  • especially on windows, path-mangling and package-management is not the norm, so i want to (eventually) distribute the python stuff alongside the rest. This'll lead to either circular dependencies or the need for a master-project with three subprojects.
  • not the slightes clue how to correctly distribute this over PyPI, as the building would need to be performed by setup.py (no clue how to make sure that the user has all C++-dependencies) or a ton of wheels be created.
    Both are kinda too much work for too little gain, atm.

@sgsaenger
Copy link
Owner

setup.py-based installation is now implemented, together with searching for a systemwide pybind11 installation before falling back to external/pybind11.
Beginning with the next release vipster will be available on PyPI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants