From 67c081553e8a60a19059108c2c15cd28a5037977 Mon Sep 17 00:00:00 2001 From: Andrews Sobral Date: Sun, 31 Jul 2022 17:28:14 +0200 Subject: [PATCH] Added __version__ attribute to pybgs --- setup.py | 2 +- wrapper/python/bgslibrary_module.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 055ec32e21..c0211cb364 100644 --- a/setup.py +++ b/setup.py @@ -208,7 +208,7 @@ def build_cmake(self, extension): setup( name='pybgs', - version='3.2.0.post0', + version='3.2.0.post1', author='Andrews Sobral', author_email='andrewssobral@gmail.com', url='https://github.com/andrewssobral/bgslibrary', diff --git a/wrapper/python/bgslibrary_module.cpp b/wrapper/python/bgslibrary_module.cpp index 7e996b5e70..36f5609fdd 100644 --- a/wrapper/python/bgslibrary_module.cpp +++ b/wrapper/python/bgslibrary_module.cpp @@ -35,6 +35,8 @@ PYBIND11_MODULE(pybgs, m) { NDArrayConverter::init_numpy(); m.doc() = "python wrapper for bgslibrary using pybind11"; + py::object version = py::cast("3.2.0"); + m.attr("__version__") = version; // Basic test m.def("read_image", &read_image, "A function that read an image", py::arg("image"));