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

Update Pybind11 to v2.10.0 #2660

Merged
merged 7 commits into from
Sep 5, 2022

Conversation

arrufat
Copy link
Contributor

@arrufat arrufat commented Sep 2, 2022

I shamelessly stole @pfeatherstone's fix for the latest version of Pybind11 (v2.10.0) from #2636.
Let's see if the tests pass…

@pfeatherstone
Copy link
Contributor

I don't mind at all. Piecemeal PRs are better anyway. Shame Davis won't set minimum cmake version to 3.11. Then dlib could use FetchContent to pull in pybind rather than embed the source code. In fact, cmake could be really clever and if C++17 is detected, then use nanobind instead which is supposed to be a lot faster to compile and run.

@davisking
Copy link
Owner

I don't mind at all. Piecemeal PRs are better anyway. Shame Davis won't set minimum cmake version to 3.11. Then dlib could use FetchContent to pull in pybind rather than embed the source code. In fact, cmake could be really clever and if C++17 is detected, then use nanobind instead which is supposed to be a lot faster to compile and run.

Ha, I'll update to 3.11 at some point. I'm surprised no one has complained to me yet about the upgrade to 3.8 :p

I don't want to make people use FetchContent though. That will go sideways. Like someone will have the package to install dlib and then it will fail due to a network problem fetching that. Or they are off the internet or whatever. That will definitely throw off python users.

@pfeatherstone
Copy link
Contributor

I guess so. Offline builds are not uncommon.

@arrufat
Copy link
Contributor Author

arrufat commented Sep 3, 2022

Ok, I don't know how to make macOS pick up the right version, I have never used a macOS device, so I am just shooting into the dark here… Why would they default to Python2? Has it been building on Python2 the whole time??

EDIT: Done, it was not so hard in the end :P

assert(dlib.partition_pixels(img[:,:,0].astype('float64')) == 125)
assert(dlib.partition_pixels(img[:,:,0].astype('uint16')) == 125)
assert(dlib.partition_pixels(img[:,:,0].astype('uint32')) == 125)
assert dlib.partition_pixels(img[:, :, 0].astype("uint8")) == 125
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why this doesn't work anymore… When I print the type of img[:, :, 0], it is an ndarray of numpy.uint8.

@davisking
Copy link
Owner

Nice, thanks for the update :)

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.

None yet

3 participants