FreeBSD Bugzilla – Attachment 212949 Details for
Bug 244347
misc/openvdb: replace dependency from python 2.7 to default 3.7
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Upstream patch for support python 3
openvdb.diff (text/plain), 1.60 KB, created by
Vladimir Druzenko
on 2020-04-01 18:54:15 UTC
(
hide
)
Description:
Upstream patch for support python 3
Filename:
MIME Type:
Creator:
Vladimir Druzenko
Created:
2020-04-01 18:54:15 UTC
Size:
1.60 KB
patch
obsolete
>diff -urN misc/openvdb.orig/files/patch-openvdb_python_pyOpenVDBModule.cc misc/openvdb/files/patch-openvdb_python_pyOpenVDBModule.cc >--- misc/openvdb.orig/files/patch-openvdb_python_pyOpenVDBModule.cc >+++ misc/openvdb/files/patch-openvdb_python_pyOpenVDBModule.cc >@@ -0,0 +1,26 @@ >+--- openvdb/python/pyOpenVDBModule.cc.orig >++++ openvdb/python/pyOpenVDBModule.cc >+@@ -320,7 +320,11 @@ >+ /// @return nullptr if the given Python object is not convertible to the PointIndex. >+ static void* convertible(PyObject* obj) >+ { >++#if PY_MAJOR_VERSION >= 3 >++ if (!PyLong_Check(obj)) return nullptr; // not a Python integer >++#else >+ if (!PyInt_Check(obj)) return nullptr; // not a Python integer >++#endif >+ return obj; >+ } >+ >+@@ -337,7 +341,11 @@ >+ // Extract the PointIndex from the python integer >+ PointIndexT* index = static_cast<PointIndexT*>(storage); >+ >++#if PY_MAJOR_VERSION >= 3 >++ *index = static_cast<IntType>(PyLong_AsLong(obj)); >++#else >+ *index = static_cast<IntType>(PyInt_AsLong(obj)); >++#endif >+ } >+ >+ /// Register both the PointIndex-to-integer and the integer-to-PointIndex converters. >diff -urN misc/openvdb.orig/Makefile misc/openvdb/Makefile >--- misc/openvdb.orig/Makefile >+++ misc/openvdb/Makefile >@@ -28,7 +28,7 @@ > OPTIONS_DEFAULT= PYTHON TOOLS > OPTIONS_SUB= yes > >-PYTHON_USES= python:2.7 # 3.6 is broken: https://github.com/AcademySoftwareFoundation/openvdb/issues/427 >+PYTHON_USES= python > PYTHON_CMAKE_BOOL= OPENVDB_BUILD_PYTHON_MODULE > PYTHON_CMAKE_ON= -DFREEBSD_PYTHON_VER:STRING=${PYTHON_VER} -DUSE_NUMPY:BOOL=ON > PYTHON_LIB_DEPENDS= ${PY_BOOST}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
vvd
:
maintainer-approval?
Actions:
View
|
Diff
Attachments on
bug 244347
: 212949