Control: tags 1009037 + patch Control: tags 1009037 + pending Dear maintainer,
I've prepared an NMU for pivy (versioned as 0.6.7-0.1) and uploaded it to DELAYED/14. Please feel free to tell me if I should cancel it. cu Adrian
diff -Nru pivy-0.6.5/CMakeLists.txt pivy-0.6.7/CMakeLists.txt --- pivy-0.6.5/CMakeLists.txt 2020-01-12 23:51:59.000000000 +0200 +++ pivy-0.6.7/CMakeLists.txt 2022-04-28 12:54:45.000000000 +0300 @@ -1,29 +1,47 @@ -project(pivy_cmake_setup NONE) -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.14) +project(pivy) -find_package(Coin CONFIG REQUIRED) - -if (Coin_INCLUDE_DIR) - MESSAGE(STATUS "COIN_FOUND: true") -else() - MESSAGE(STATUS "COIN_FOUND: false") -endif() +option(DISABLE_SWIG_WARNINGS "if on no swig warnings are shown" OFF) -MESSAGE(STATUS "COIN_INCLUDE_DIR: ${Coin_INCLUDE_DIR}") -MESSAGE(STATUS "COIN_LIB_DIR: ${Coin_LIB_DIR}") -MESSAGE(STATUS "COIN_VERSION: ${Coin_VERSION}") +find_package(SWIG 4.0.0 REQUIRED) +include(${SWIG_USE_FILE}) +find_package(Coin CONFIG REQUIRED) +find_package(SoQt CONFIG) +if (SoQt_FOUND) + find_package(Qt5 COMPONENTS Core Widgets Gui REQUIRED) +endif() -find_package(soqt CONFIG QUIET) +find_package(Python REQUIRED COMPONENTS Interpreter Development) -if (SoQt_INCLUDE_DIRS) - MESSAGE(STATUS "SOQT_FOUND: true") -else() - MESSAGE(STATUS "SOQT_FOUND: false") -endif() +# SWIGIFY HEADERS +# doing this with the origin python functions -MESSAGE(STATUS "SOQT_INCLUDE_DIR: ${SoQt_INCLUDE_DIRS}") -MESSAGE(STATUS "SOQT_LIB_DIR: ${SoQt_LIBRARY_DIRS}") -MESSAGE(STATUS "SOQT_VERSION: ${SoQt_VERSION}") +execute_process(COMMAND ${Python_EXECUTABLE} -c +"import sys; sys.path.append('${CMAKE_SOURCE_DIR}'); \ +import install_helpers; install_helpers.swigify('${CMAKE_SOURCE_DIR}', '${Coin_INCLUDE_DIR}');") + + +# copy the python module +include(TargetCopyFiles.cmake) + +add_custom_target(pivy ALL) +add_copy_directory(pivy ${CMAKE_SOURCE_DIR}/pivy + DESTINATION ${CMAKE_BINARY_DIR}/pivy + PATTERN *.py +) + +add_subdirectory(interfaces) + +install(DIRECTORY + ${CMAKE_BINARY_DIR}/pivy + DESTINATION ${Python_SITEARCH} + FILES_MATCHING + PATTERN "*.py" + PATTERN "*.so" + PATTERN "*.dylib" + PATTERN "*.dll" + PATTERN "*.pyd" + ) diff -Nru pivy-0.6.5/debian/changelog pivy-0.6.7/debian/changelog --- pivy-0.6.5/debian/changelog 2020-01-28 04:37:31.000000000 +0200 +++ pivy-0.6.7/debian/changelog 2022-05-11 22:08:30.000000000 +0300 @@ -1,3 +1,11 @@ +pivy (0.6.7-0.1) unstable; urgency=low + + * Non-maintainer upload. + * New upstream release. + - Improved Python 3.10 compatibility. (Closes: #1009037) + + -- Adrian Bunk <b...@debian.org> Wed, 11 May 2022 22:08:30 +0300 + pivy (0.6.5-1) unstable; urgency=medium * [2ac31f3] Remove upstreamed patches (all) diff -Nru pivy-0.6.5/distutils_cmake/CMakeLists.txt pivy-0.6.7/distutils_cmake/CMakeLists.txt --- pivy-0.6.5/distutils_cmake/CMakeLists.txt 1970-01-01 02:00:00.000000000 +0200 +++ pivy-0.6.7/distutils_cmake/CMakeLists.txt 2022-04-28 12:54:45.000000000 +0300 @@ -0,0 +1,22 @@ +cmake_minimum_required(VERSION 3.5) +project(pivy_cmake_setup NONE) + + +find_package(Coin CONFIG REQUIRED) + +if (Coin_FOUND) + MESSAGE(STATUS "COIN_FOUND: TRUE") + MESSAGE(STATUS "COIN_INCLUDE_DIR: ${Coin_INCLUDE_DIR}") + MESSAGE(STATUS "COIN_LIB_DIR: ${Coin_LIB_DIR}") + MESSAGE(STATUS "COIN_VERSION: ${Coin_VERSION}") +endif() + + +find_package(SoQt CONFIG) + +if (SoQt_FOUND) + MESSAGE(STATUS "SOQT_FOUND: True") + MESSAGE(STATUS "SOQT_INCLUDE_DIR: ${SoQt_INCLUDE_DIRS}") + MESSAGE(STATUS "SOQT_LIB_DIR: ${SoQt_LIBRARY_DIRS}") + MESSAGE(STATUS "SOQT_VERSION: ${SoQt_VERSION}") +endif() diff -Nru pivy-0.6.5/examples/contrib/iv2pov.py pivy-0.6.7/examples/contrib/iv2pov.py --- pivy-0.6.5/examples/contrib/iv2pov.py 2020-01-12 23:51:59.000000000 +0200 +++ pivy-0.6.7/examples/contrib/iv2pov.py 2022-04-28 12:54:45.000000000 +0300 @@ -28,7 +28,7 @@ ## * Better camera support ## * Search graph for lights or cameras BEFORE processing. Add ## if missing. -## * Better material handeling +## * Better material handling ## * Make it into a library? ## diff -Nru pivy-0.6.5/examples/examiner_embed4.py pivy-0.6.7/examples/examiner_embed4.py --- pivy-0.6.5/examples/examiner_embed4.py 2020-01-12 23:51:59.000000000 +0200 +++ pivy-0.6.7/examples/examiner_embed4.py 2022-04-28 12:54:45.000000000 +0300 @@ -26,7 +26,10 @@ from pivy.coin import * from pivy.gui.soqt import * -from PySide2.QtGui import * +try: + from PySide2.QtWidgets import * +except ImportError: + from PySide2.QtGui import * from PySide2.QtCore import * class EmbeddedWindow(QMainWindow): diff -Nru pivy-0.6.5/examples/Mentor/07.2.TextureCoordinates.py pivy-0.6.7/examples/Mentor/07.2.TextureCoordinates.py --- pivy-0.6.5/examples/Mentor/07.2.TextureCoordinates.py 2020-01-12 23:51:59.000000000 +0200 +++ pivy-0.6.7/examples/Mentor/07.2.TextureCoordinates.py 2022-04-28 12:54:45.000000000 +0300 @@ -20,7 +20,7 @@ # This is an example from the Inventor Mentor # chapter 7, example 2. # -# This example illustrates using texture coordindates on +# This example illustrates using texture coordinates on # a Face Set. # diff -Nru pivy-0.6.5/examples/Mentor/10.7.PickFilterManip.py pivy-0.6.7/examples/Mentor/10.7.PickFilterManip.py --- pivy-0.6.5/examples/Mentor/10.7.PickFilterManip.py 2020-01-12 23:51:59.000000000 +0200 +++ pivy-0.6.7/examples/Mentor/10.7.PickFilterManip.py 2022-04-28 12:54:45.000000000 +0300 @@ -37,7 +37,7 @@ # Returns path to xform left of the input path tail. # Inserts the xform if none found. In this example, -# assume that the xform is always the node preceeding +# assume that the xform is always the node preceding # the selected shape. def findXform(p): # Copy the input path up to tail's parent. @@ -63,7 +63,7 @@ return returnPath # Returns the manip affecting this path. In this example, -# the manip is always preceeding the selected shape. +# the manip is always preceding the selected shape. def findManip(p): # Copy the input path up to tail's parent. returnPath = p.copy(0, p.getLength() - 1) diff -Nru pivy-0.6.5/.github/workflows/test-env-action.yml pivy-0.6.7/.github/workflows/test-env-action.yml --- pivy-0.6.5/.github/workflows/test-env-action.yml 1970-01-01 02:00:00.000000000 +0200 +++ pivy-0.6.7/.github/workflows/test-env-action.yml 2022-04-28 12:54:45.000000000 +0300 @@ -0,0 +1,40 @@ +name: lint-build-test + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build_n_lint: + runs-on: ${{ matrix.os }} + strategy: + max-parallel: 9 + matrix: + os: [windows-latest, ubuntu-latest, macos-latest] + python-version: ["3.8", "3.9", "3.10"] + + steps: + - uses: actions/checkout@v2 + name: Checkout + + - uses: conda-incubator/setup-miniconda@v2 + with: + python-version: ${{ matrix.python-version }} + auto-activate-base: true + activate-environment: test + + - name: install packages + run: | + conda install flake8 conda-build + + - if: matrix.os == 'ubuntu-latest' + name: Lint with flake8 + run: | + ${CONDA}/bin/flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics --exclude=.svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg,scons,SoPyScript + + - name: create package with conda + run: | + cd packaging; + conda build . -c conda-forge --python=${{ matrix.python-version }} diff -Nru pivy-0.6.5/install_helpers.py pivy-0.6.7/install_helpers.py --- pivy-0.6.5/install_helpers.py 1970-01-01 02:00:00.000000000 +0200 +++ pivy-0.6.7/install_helpers.py 2022-04-28 12:54:45.000000000 +0300 @@ -0,0 +1,72 @@ +import os +import sys +import shutil + + +PIVY_HEADER = """\ +#ifdef __PIVY__ +%%include %s +#endif + +""" + +def copy_and_swigify_headers(includedir, dirname, files): + """Copy the header files to the local include directories. Add an + #include line at the beginning for the SWIG interface files...""" + + for file in files: + if not os.path.isfile(os.path.join(dirname, file)): + continue + + if file[-2:] == ".i": + file = os.path.join(dirname, file) + + file_i = file.split(os.path.sep) + file_i = [i for i in file_i if i != ".."] + file_i = os.path.join(*file_i) + + file_h = file_i[:-2] + ".h" + from_file = os.path.join(includedir, file_h) + + file_h = file[:-2] + ".h" + to_file = os.path.abspath(file_h) + + if os.path.exists(from_file): + shutil.copyfile(from_file, to_file) + sys.stdout.write('create swigified header: ' + to_file + '\n') + fd = open(to_file, 'r+') + contents = fd.readlines() + + ins_line_nr = -1 + for line in contents: + ins_line_nr += 1 + if line.find("#include ") != -1: + break + + if ins_line_nr != -1: + contents.insert(ins_line_nr, PIVY_HEADER % (file_i)) + fd.seek(0) + fd.writelines(contents) + else: + print("[failed]") + sys.exit(1) + fd.close + # fixes for SWIG 1.3.21 and upwards + # (mostly workarounding swig's preprocessor "function like macros" + # preprocessor bug when no parameters are provided which then results + # in no constructors being created in the wrapper) + elif file[-4:] == ".fix": + sys.stdout.write(' ' + os.path.join(dirname, file)[:-4]) + shutil.copyfile(os.path.join(dirname, file), + os.path.join(dirname, file)[:-4]) + # had to introduce this because windows is a piece of crap + elif sys.platform == "win32" and file[-6:] == ".win32": + sys.stdout.write(' ' + os.path.join(dirname, file)[:-6]) + shutil.copyfile(os.path.join(dirname, file), + os.path.join(dirname, file)[:-6]) + + +def swigify(interface_dir, include_dir): + dir_gen = os.walk(os.path.relpath(os.path.join(interface_dir, "Inventor"))) + for _dir, _, names in dir_gen: + copy_and_swigify_headers(include_dir, _dir, names) \ No newline at end of file diff -Nru pivy-0.6.5/interfaces/CMakeLists.txt pivy-0.6.7/interfaces/CMakeLists.txt --- pivy-0.6.5/interfaces/CMakeLists.txt 1970-01-01 02:00:00.000000000 +0200 +++ pivy-0.6.7/interfaces/CMakeLists.txt 2022-04-28 12:54:45.000000000 +0300 @@ -0,0 +1,81 @@ +function(set_swig_properties NAME) + set_property(SOURCE ${NAME} PROPERTY CPLUSPLUS ON) + set_property(SOURCE ${NAME} PROPERTY SWIG_FLAGS "-includeall") + set_property(SOURCE ${NAME} APPEND PROPERTY SWIG_FLAGS "-py3") + set_property(SOURCE ${NAME} APPEND PROPERTY SWIG_FLAGS "-D__PIVY__") + if(DISABLE_SWIG_WARNINGS) + set_property(SOURCE ${NAME} APPEND PROPERTY SWIG_FLAGS + "-w302,306,307,312,314,325,361,362,467,389,503,509,510") + endif(DISABLE_SWIG_WARNINGS) +endfunction() + + +set_swig_properties(coin.i) + +# remember: the order of the includes is important! +# swig needs the generated headers first (these headers are replacing the origin Inventor headers) +set_property(SOURCE coin.i PROPERTY INCLUDE_DIRECTORIES "${CMAKE_SOURCE_DIR}") +set_property(SOURCE coin.i APPEND PROPERTY INCLUDE_DIRECTORIES "${CMAKE_SOURCE_DIR}/fake_headers") +set_property(SOURCE coin.i APPEND PROPERTY INCLUDE_DIRECTORIES "${Coin_INCLUDE_DIR}") + + +swig_add_library(coin + LANGUAGE python + OUTPUT_DIR ${CMAKE_BINARY_DIR}/pivy + SOURCES coin.i) + +if (APPLE) + set_target_properties(coin PROPERTIES LINK_FLAGS "-undefined dynamic_lookup") +elseif (WIN32) + set_target_properties(coin PROPERTIES COMPILE_FLAGS "/bigobj") + target_link_libraries(coin PUBLIC ${Python_LIBRARIES}) +endif () + +target_include_directories(coin + PUBLIC + ${Coin_INCLUDE_DIR} + ${Python_INCLUDE_DIRS} + PRIVATE + ${CMAKE_SOURCE_DIR}/interfaces + ) + +target_link_libraries(coin PUBLIC Coin::Coin) +install(TARGETS coin DESTINATION ${Python_SITEARCH}/pivy) + + +if (SoQt_FOUND) + + set_swig_properties(soqt.i) + + # remember: the order of the includes is important! + # swig needs the generated headers first (these headers are replacing the origin Inventor headers) + set_property(SOURCE soqt.i PROPERTY INCLUDE_DIRECTORIES "${CMAKE_SOURCE_DIR}") + set_property(SOURCE soqt.i APPEND PROPERTY INCLUDE_DIRECTORIES "${CMAKE_SOURCE_DIR}/fake_headers") + set_property(SOURCE soqt.i APPEND PROPERTY INCLUDE_DIRECTORIES "${SoQt_INCLUDE_DIRS}") + + + swig_add_library(soqt + LANGUAGE python + OUTPUT_DIR ${CMAKE_BINARY_DIR}/pivy/gui + SOURCES soqt.i) + + if (APPLE) + set_target_properties(soqt PROPERTIES LINK_FLAGS "-undefined dynamic_lookup") + elseif (WIN32) + set_target_properties(coin PROPERTIES COMPILE_FLAGS "/bigobj") + target_link_libraries(soqt PUBLIC ${Python_LIBRARIES}) + endif () + + target_include_directories(soqt + PUBLIC + ${SoQt_INCLUDE_DIRS} + ${Qt5Gui_INCLUDE_DIRS} + ${Qt5Widgets_INCLUDE_DIRS} + ${Python_INCLUDE_DIRS} + PRIVATE + ${CMAKE_SOURCE_DIR}/interfaces + ) + + target_link_libraries(soqt PUBLIC SoQt::SoQt) + install(TARGETS soqt DESTINATION ${Python_SITEARCH}/pivy/gui) +endif() diff -Nru pivy-0.6.5/interfaces/coin_header_includes.h pivy-0.6.7/interfaces/coin_header_includes.h --- pivy-0.6.5/interfaces/coin_header_includes.h 2020-01-12 23:51:59.000000000 +0200 +++ pivy-0.6.7/interfaces/coin_header_includes.h 2022-04-28 12:54:45.000000000 +0300 @@ -352,6 +352,7 @@ #include <Inventor/misc/SoGLBigImage.h> #include <Inventor/misc/SoGLImage.h> #include <Inventor/misc/SoGlyph.h> +#include <Inventor/misc/SoGeo.h> #include <Inventor/misc/SoLightPath.h> #include <Inventor/misc/SoNormalGenerator.h> #include <Inventor/misc/SoNotification.h> @@ -404,6 +405,10 @@ #include <Inventor/nodes/SoFile.h> #include <Inventor/nodes/SoFont.h> #include <Inventor/nodes/SoFontStyle.h> +#include <Inventor/nodes/SoGeoCoordinate.h> +#include <Inventor/nodes/SoGeoLocation.h> +#include <Inventor/nodes/SoGeoOrigin.h> +#include <Inventor/nodes/SoGeoSeparator.h> #include <Inventor/nodes/SoGroup.h> #include <Inventor/nodes/SoImage.h> #include <Inventor/nodes/SoIndexedFaceSet.h> diff -Nru pivy-0.6.5/interfaces/coin.i pivy-0.6.7/interfaces/coin.i --- pivy-0.6.5/interfaces/coin.i 2020-01-12 23:51:59.000000000 +0200 +++ pivy-0.6.7/interfaces/coin.i 2022-04-28 12:54:45.000000000 +0300 @@ -28,6 +28,10 @@ // https://stackoverflow.com/questions/40959436/swig-python-detected-a-memory-leak-of-type-uint32-t-no-destructor-found %include "stdint.i" +%begin %{ +#define PY_SSIZE_T_CLEAN +%} + %{ #if defined(_WIN32) || defined(__WIN32__) #include <windows.h> @@ -54,8 +58,8 @@ %{ /* Workaround for FILE* typemap. Import IO module instead of using extern PyTypeObject PyIOBase_Type, - because the windows pyhton lib does not export PyIOBase_Type. - Coppied from: https://github.com/Kagami/pygraphviz/commit/fe442dc16accb629c3feaf157af75f67ccabbd6e + because the windows python lib does not export PyIOBase_Type. + Copied from: https://github.com/Kagami/pygraphviz/commit/fe442dc16accb629c3feaf157af75f67ccabbd6e */ #if PY_MAJOR_VERSION >= 3 static PyObject *PyIOBase_TypeObj; @@ -95,15 +99,11 @@ */ %pythoncode %{ -for x in list(locals()): - value = locals()[x] - try: - if isinstance(value, type) and issubclass(value, SoFieldContainer): - for name in list(value.__dict__): - val = value.__dict__[name] - if isinstance(val, property): - delattr(value, name) - except NameError: - # value == SoSearchAction_duringSearchAll ??? - pass +for key in list(locals()): + x = locals()[key] + if isinstance(x, type) and issubclass(x, SoFieldContainer): + for name in list(x.__dict__): + thing = x.__dict__[name] + if isinstance(thing, property): + delattr(x, name) %} \ No newline at end of file diff -Nru pivy-0.6.5/interfaces/pivy_common_typemaps.i pivy-0.6.7/interfaces/pivy_common_typemaps.i --- pivy-0.6.5/interfaces/pivy_common_typemaps.i 2020-01-12 23:51:59.000000000 +0200 +++ pivy-0.6.7/interfaces/pivy_common_typemaps.i 2022-04-28 12:54:45.000000000 +0300 @@ -28,19 +28,12 @@ #define IS_PY3K #endif -/* a casting helper function */ -SWIGEXPORT PyObject * -cast(PyObject * self, PyObject * args) +PyObject * +cast_internal(PyObject * self, PyObject * obj, const char * type_name, int type_len) { swig_type_info * swig_type = 0; void * cast_obj = 0; - char * type_name, * ptr_type; - int type_len; - PyObject * obj = 0; - - if (!PyArg_ParseTuple(args, "Os#:cast", &obj, &type_name, &type_len)) { - SWIG_fail; - } + char * ptr_type; /* * add a pointer sign to the string coming from the interpreter @@ -74,7 +67,24 @@ if (SWIG_arg_fail(1)) { SWIG_fail; } return SWIG_NewPointerObj((void*)cast_obj, swig_type, 0); - fail: +fail: + return NULL; +} + +/* a casting helper function */ +SWIGEXPORT PyObject * +cast(PyObject * self, PyObject * args) +{ + char * type_name; + int type_len; + PyObject * obj = 0; + + if (!PyArg_ParseTuple(args, "Os#:cast", &obj, &type_name, &type_len)) { + SWIG_fail; + } + + return cast_internal(self, obj, type_name, type_len); +fail: return NULL; } @@ -86,18 +96,15 @@ /* autocast the result to the corresponding type */ if (base && base->isOfType(SoFieldContainer::getClassTypeId())) { - PyObject * cast_args = NULL; PyObject * obj = NULL; SoType type = base->getTypeId(); /* in case of a non built-in type get the closest built-in parent */ while (!(type.isBad() || result)) { obj = SWIG_NewPointerObj((void*)base, SWIGTYPE_p_SoBase, 0); - cast_args = Py_BuildValue("(Os)", obj, type.getName().getString()); - result = cast(NULL, cast_args); + result = cast_internal(NULL, obj, type.getName().getString(), type.getName().getLength()); - Py_DECREF(cast_args); Py_DECREF(obj); if (!result) { type = type.getParent(); } @@ -120,18 +127,15 @@ /* autocast the result to the corresponding type */ if (path) { - PyObject * cast_args = NULL; PyObject * obj = NULL; SoType type = path->getTypeId(); /* in case of a non built-in type get the closest built-in parent */ while (!(type.isBad() || result)) { obj = SWIG_NewPointerObj((void*)path, SWIGTYPE_p_SoPath, 0); - cast_args = Py_BuildValue("(Os)", obj, type.getName().getString()); - result = cast(NULL, cast_args); + result = cast_internal(NULL, obj, type.getName().getString(), type.getName().getLength()); - Py_DECREF(cast_args); Py_DECREF(obj); if (!result) { type = type.getParent(); } @@ -154,18 +158,15 @@ /* autocast the result to the corresponding type */ if (field) { - PyObject * cast_args = NULL; PyObject * obj = NULL; SoType type = field->getTypeId(); /* in case of a non built-in type get the closest built-in parent */ while (!(type.isBad() || result)) { obj = SWIG_NewPointerObj((void*)field, SWIGTYPE_p_SoField, 0); - cast_args = Py_BuildValue("(Os)", obj, type.getName().getString()); - result = cast(NULL, cast_args); + result = cast_internal(NULL, obj, type.getName().getString(), type.getName().getLength()); - Py_DECREF(cast_args); Py_DECREF(obj); if (!result) { type = type.getParent(); } @@ -188,18 +189,15 @@ /* autocast the result to the corresponding type */ if (event) { - PyObject * cast_args = NULL; PyObject * obj = NULL; SoType type = event->getTypeId(); /* in case of a non built-in type get the closest built-in parent */ while (!(type.isBad() || result)) { obj = SWIG_NewPointerObj((void*)event, SWIGTYPE_p_SoEvent, 0); - cast_args = Py_BuildValue("(Os)", obj, type.getName().getString()); - result = cast(NULL, cast_args); + result = cast_internal(NULL, obj, type.getName().getString(), type.getName().getLength()); - Py_DECREF(cast_args); Py_DECREF(obj); if (!result) { type = type.getParent(); } diff -Nru pivy-0.6.5/interfaces/soqt2.i pivy-0.6.7/interfaces/soqt2.i --- pivy-0.6.5/interfaces/soqt2.i 2020-01-12 23:51:59.000000000 +0200 +++ pivy-0.6.7/interfaces/soqt2.i 2022-04-28 12:54:45.000000000 +0300 @@ -104,7 +104,7 @@ static PyObject* getShiboken() { - // this function asumes shiboken is available directly + // this function assumes shiboken is available directly // pip installs it in a wrong place // if you have installed shiboken with pip please symlink to correct directory PyObject * shiboken = NULL; diff -Nru pivy-0.6.5/interfaces/soqt.i pivy-0.6.7/interfaces/soqt.i --- pivy-0.6.5/interfaces/soqt.i 2020-01-12 23:51:59.000000000 +0200 +++ pivy-0.6.7/interfaces/soqt.i 2022-04-28 12:54:45.000000000 +0300 @@ -27,8 +27,8 @@ %{ /* Workaround for FILE* typemap. Import IO module instead of using extern PyTypeObject PyIOBase_Type, - because the windows pyhton lib does not export PyIOBase_Type. - Coppied from: https://github.com/Kagami/pygraphviz/commit/fe442dc16accb629c3feaf157af75f67ccabbd6e + because the windows python lib does not export PyIOBase_Type. + Copied from: https://github.com/Kagami/pygraphviz/commit/fe442dc16accb629c3feaf157af75f67ccabbd6e */ #if PY_MAJOR_VERSION >= 3 static PyObject *PyIOBase_TypeObj = NULL; @@ -121,7 +121,7 @@ static PyObject* getShiboken() { - // this function asumes shiboken is available directly + // this function assumes shiboken is available directly // pip installs it in a wrong place // if you have installed shiboken with pip please symlink to correct directory PyObject * shiboken = NULL; diff -Nru pivy-0.6.5/Inventor/fields/SoMFVec2f.i pivy-0.6.7/Inventor/fields/SoMFVec2f.i --- pivy-0.6.5/Inventor/fields/SoMFVec2f.i 2020-01-12 23:51:59.000000000 +0200 +++ pivy-0.6.7/Inventor/fields/SoMFVec2f.i 2022-04-28 12:54:45.000000000 +0300 @@ -39,7 +39,7 @@ /* free the list */ %typemap(freearg) const float xy[][2] { - if($1) delete[] $1; + if($1) free($1); } %typemap(in) const float xy[2] (float temp[2]) { diff -Nru pivy-0.6.5/Inventor/fields/SoMFVec3d.i pivy-0.6.7/Inventor/fields/SoMFVec3d.i --- pivy-0.6.5/Inventor/fields/SoMFVec3d.i 2020-01-12 23:51:59.000000000 +0200 +++ pivy-0.6.7/Inventor/fields/SoMFVec3d.i 2022-04-28 12:54:45.000000000 +0300 @@ -39,7 +39,7 @@ /* free the list */ %typemap(freearg) const double xyz[][3] { - if ($1) { delete[] $1; } + if ($1) { free($1); } } %typemap(in) const double xyz[3] (double temp[3]) { diff -Nru pivy-0.6.5/Inventor/fields/SoMFVec3f.i pivy-0.6.7/Inventor/fields/SoMFVec3f.i --- pivy-0.6.5/Inventor/fields/SoMFVec3f.i 2020-01-12 23:51:59.000000000 +0200 +++ pivy-0.6.7/Inventor/fields/SoMFVec3f.i 2022-04-28 12:54:45.000000000 +0300 @@ -39,9 +39,10 @@ /* free the list */ %typemap(freearg) const float xyz[][3] { - if ($1) { delete[] $1; } + if ($1) { free($1); } } + %typemap(in) const float xyz[3] (float temp[3]) { convert_SbVec3f_array($input, temp); $1 = temp; diff -Nru pivy-0.6.5/Inventor/fields/SoMFVec4f.i pivy-0.6.7/Inventor/fields/SoMFVec4f.i --- pivy-0.6.5/Inventor/fields/SoMFVec4f.i 2020-01-12 23:51:59.000000000 +0200 +++ pivy-0.6.7/Inventor/fields/SoMFVec4f.i 2022-04-28 12:54:45.000000000 +0300 @@ -39,7 +39,7 @@ /* free the list */ %typemap(freearg) const float xy[][2] { - if ($1) { delete[] $1; } + if ($1) { free($1); } } %typemap(in) const float xyzw[4] (float temp[4]) { diff -Nru pivy-0.6.5/Inventor/nodekits/SoBaseKit.i pivy-0.6.7/Inventor/nodekits/SoBaseKit.i --- pivy-0.6.5/Inventor/nodekits/SoBaseKit.i 2020-01-12 23:51:59.000000000 +0200 +++ pivy-0.6.7/Inventor/nodekits/SoBaseKit.i 2022-04-28 12:54:45.000000000 +0300 @@ -2,6 +2,8 @@ %extend SoBaseKit { %pythoncode %{ def __getattr__(self,name): + if name == 'this': + return SoNode.__getattr__(self,name) c = _coin.SoBaseKit_getNodekitCatalog(self) if c.getPartNumber(name) >= 0: part = self.getPart(name,1) diff -Nru pivy-0.6.5/packaging/conda/bld.bat pivy-0.6.7/packaging/conda/bld.bat --- pivy-0.6.5/packaging/conda/bld.bat 1970-01-01 02:00:00.000000000 +0200 +++ pivy-0.6.7/packaging/conda/bld.bat 2022-04-28 12:54:45.000000000 +0300 @@ -0,0 +1,10 @@ +mkdir build +cd build + +cmake -G "Ninja" ^ + -D CMAKE_BUILD_TYPE="Release" ^ + -D CMAKE_INSTALL_PREFIX:FILEPATH=%LIBRARY_PREFIX% ^ + .. + + +ninja install \ No newline at end of file diff -Nru pivy-0.6.5/packaging/conda/build.sh pivy-0.6.7/packaging/conda/build.sh --- pivy-0.6.5/packaging/conda/build.sh 2020-01-12 23:51:59.000000000 +0200 +++ pivy-0.6.7/packaging/conda/build.sh 2022-04-28 12:54:45.000000000 +0300 @@ -1,3 +1,6 @@ +mkdir -p build +cd build + if [[ ${HOST} =~ .*linux.* ]]; then sed -i 's|_qt5gui_find_extra_libs(EGL.*)|_qt5gui_find_extra_libs(EGL "EGL" "" "")|g' $PREFIX/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake sed -i 's|_qt5gui_find_extra_libs(OPENGL.*)|_qt5gui_find_extra_libs(OPENGL "GL" "" "")|g' $PREFIX/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake @@ -5,5 +8,9 @@ PIVY_CPP_FLAGS='-std=c++1z ' -$PYTHON setup.py clean -$PYTHON setup.py install +cmake -G "Ninja" \ + -D CMAKE_BUILD_TYPE="Release" \ + -D CMAKE_INSTALL_PREFIX:FILEPATH=$PREFIX \ + .. + +ninja install \ No newline at end of file diff -Nru pivy-0.6.5/packaging/conda/meta.yaml pivy-0.6.7/packaging/conda/meta.yaml --- pivy-0.6.5/packaging/conda/meta.yaml 2020-01-12 23:51:59.000000000 +0200 +++ pivy-0.6.7/packaging/conda/meta.yaml 2022-04-28 12:54:45.000000000 +0300 @@ -1,21 +1,51 @@ package: name: pivy - version: 0.6.0 + version: "master" build: - number: 4 + number: 0 source: path: ../../ requirements: - build: - - python - - swig - - coin - run: - - python - - coin + build: + - {{ compiler("cxx") }} + - {{ cdt('mesa-libgl-devel') }} # [linux] + - msinttypes # [win] + - cmake + - ninja + - swig + host: + - python + - coin3d + - soqt + - qt + run: + - python + - coin3d + - qt + - pyside2 + - soqt + +test: + source-files: + - tests/* + imports: + - pivy.coin + - pivy.gui.soqt + script: + - coin_tests.py + about: - summary: python buindings to coin \ No newline at end of file + home: https://github.com/FreeCAD/pivy + license: ISC + license_file: LICENSE + summary: python bindings to coin3d. + doc_url: https://github.com/FreeCAD/pivy + dev_url: https://github.com/FreeCAD/pivy + +extra: + recipe-maintainers: + - looooo diff -Nru pivy-0.6.5/packaging/debian/build_with_debian.md pivy-0.6.7/packaging/debian/build_with_debian.md --- pivy-0.6.5/packaging/debian/build_with_debian.md 1970-01-01 02:00:00.000000000 +0200 +++ pivy-0.6.7/packaging/debian/build_with_debian.md 2022-04-28 12:54:45.000000000 +0300 @@ -0,0 +1,29 @@ +# deb from pivy-source + +- download latest release + https://github.com/looooo/pivy/releases +- `py2dsc <pivy_archive>` +- add additional dependencies in pivy_<version>.debian.tar.xz: +debian/control +``` +Build-Depends: debhelper (>= 9), python-support, python-all-dev, +libsoqt4-dev, libcoin80-dev, libsimage-dev, swig +. +. +. +Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}, python-qt4-gl +``` +- `cd deb_dist/pivy/pivy_<version>` +- `dpkg-buildpackage -rfakeroot -uc -us` + + +# build with 14.04 trusty + +- sudo docker run -i -t -v ~/projects/:/projects --name ubuntu_1404 ubuntu:trusty +- sudo apt-get update +- sudo apt-get install libcoin80-dev libsimage-dev libsoqt-dev swig debhelper python-support python3-all-dev python-stdeb# python-all-dev +- build pivy (previous step) + + +# update version +http://manpages.ubuntu.com/manpages/xenial/man1/uupdate.1.html \ No newline at end of file diff -Nru pivy-0.6.5/packaging/debian/debian/changelog pivy-0.6.7/packaging/debian/debian/changelog --- pivy-0.6.5/packaging/debian/debian/changelog 1970-01-01 02:00:00.000000000 +0200 +++ pivy-0.6.7/packaging/debian/debian/changelog 2022-04-28 12:54:45.000000000 +0300 @@ -0,0 +1,109 @@ +pivy (0.6.2-yakkety3) yakkety; urgency=medium + + * development moved to github and git + * python3 support + * pyside instead of pyqt + + -- looooo <sppedfl...@gmail.com> Tue, 13 Jun 2017 06:17:07 +0200 + +pivy (0.5.0~v609hg-3.1) unstable; urgency=medium + + * Non-maintainer upload. + * Remove long useless debian/pycompat file. + * Build-Depend on dh-python instead of python-support. Closes: + #786149 + * use X-Python-Version control field instead of the debian/pyversions + file. + * debian/control: bump Standards-Version to 3.9.6, no changes needed. + + -- Mattia Rizzolo <mat...@debian.org> Mon, 14 Dec 2015 01:10:04 +0000 + +pivy (0.5.0~v609hg-3) unstable; urgency=low + + * [ffc321b] Update/fix VCS-fields. + * [6a8ffda] Use dh 9. Clean debian/rules. + * [06471e5] Remove README.source. + * [a9eec4e] Add --parallel option. + * [e1c6b3f] Add myself as uploader. + + -- Anton Gladky <gl...@debian.org> Sat, 06 Jul 2013 23:33:11 +0200 + +pivy (0.5.0~v609hg-2) unstable; urgency=low + + * Build-dep on libcoin80-dev and latest libsoqt4-dev. + * Change maintainer to Debian Science Maintainers, + add Teemu Ikonen to Uploaders. + * Upgrade to standards-version 3.9.4. + + -- Teemu Ikonen <tpiko...@gmail.com> Thu, 30 May 2013 12:59:43 +0200 + +pivy (0.5.0~v609hg-1) unstable; urgency=low + + * New snapshot from upstream mercurial repository + * New upstream version fixes pivy.gui.soqt import (closes: #583323) + * Change versioning scheme to follow hg revisions + * 'Fix' watch file (it finds only ancient pivy versions) + * copyright: Update years, change to current DEP5 format + * Add debian/source/format file with text "3.0 (quilt)" + * Add debian/source/options file + - Use bz2 with maximum compression + - Generate a single debian-changes patch + * control: + - Update standards-version to 3.9.2 + - Add Vcs-* fields + * rules: + - Add build-arch and build-indep targets to please lintian + - Add get-orig-source target to fetch source from upstream hg repo + * QuarterWidget.py: Replace string exception with an IOError + (closes: #585313) + * Building with swig 2.0.4-4 fixes FTBS (closes: #639077) + + -- Teemu Ikonen <tpiko...@gmail.com> Wed, 21 Sep 2011 14:31:38 +0200 + +pivy (0.5.0~svn765-2) unstable; urgency=low + + * control: + Add dependency to python-qt4-gl to binary package. + Mention quarter in the description. + * copyright: remove scons files, update copyright holder name + from Systems in Motion to Kongsberg SIM + * Upload to unstable (closes: #504617) + + -- Teemu Ikonen <tpiko...@gmail.com> Sat, 19 Sep 2009 23:09:28 +0200 + +pivy (0.5.0~svn765-1) unstable; urgency=low + + * New upstream SVN snapshot + * Use a svn revision in the version number, in stead of date + * control: Update to standards-version 3.8.3 + * rules: Remove call to dh_clean -k, add call to dh_prep + * Add a README.source file explaining how to recreate the orig.tar + from upstream SVN + + -- Teemu Ikonen <tpiko...@gmail.com> Fri, 11 Sep 2009 23:54:48 +0200 + +pivy (0.5.0~svn2009.06.18-1) UNRELEASED; urgency=low + + * New upstream version + * control: + - Remove build-dep from cdbs + - Update libsoqt4-dev versioned build-dep to the version in unstable. + * rules: + - Let 'dh clean' run the setup.py clean target + * copyright: Update + * Upload to unstable (closes: #504617) + + -- Teemu Ikonen <tpiko...@gmail.com> Sat, 01 Aug 2009 15:34:07 +0200 + +pivy (0.5.0~svn2008.12.11-1) UNRELEASED; urgency=low + + * New upstream version from SVN snapshots + * rules: use pure debhelper instead of CDBS + + -- Teemu Ikonen <tpiko...@gmail.com> Sat, 13 Dec 2008 13:03:45 +0100 + +pivy (0.3.0-1) UNRELEASED; urgency=low + + * Initial packaging + + -- Teemu Ikonen <tpiko...@gmail.com> Thu, 13 Nov 2008 15:31:51 +0100 diff -Nru pivy-0.6.5/packaging/debian/debian/compat pivy-0.6.7/packaging/debian/debian/compat --- pivy-0.6.5/packaging/debian/debian/compat 1970-01-01 02:00:00.000000000 +0200 +++ pivy-0.6.7/packaging/debian/debian/compat 2022-04-28 12:54:45.000000000 +0300 @@ -0,0 +1 @@ +9 diff -Nru pivy-0.6.5/packaging/debian/debian/control pivy-0.6.7/packaging/debian/debian/control --- pivy-0.6.5/packaging/debian/debian/control 1970-01-01 02:00:00.000000000 +0200 +++ pivy-0.6.7/packaging/debian/debian/control 2022-04-28 12:54:45.000000000 +0300 @@ -0,0 +1,49 @@ +Source: pivy +Section: python +Priority: extra +Maintainer: looooo <sppedfl...@gmail.com> +Uploaders: looooo <sppedfl...@gmail.com> +Build-Depends: debhelper (>= 9), dh-python, python3-all-dev, python-all-dev, + libsoqt4-dev (>= 1.5.0-2.1), libcoin80-dev, libsimage-dev, swig3.0 +Standards-Version: 3.9.6 +Vcs-Git: git://anonscm.debian.org/debian-science/packages/pivy.git +Vcs-Browser: http://anonscm.debian.org/gitweb/?p=debian-science/packages/pivy.git +Homepage: http://pivy.coin3d.org/ +X-Python-Version: >= 2.4 +X-Python3-Version: >= 3.4 + +Package: python-pivy +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}, python-qt4-gl +Provides: ${python:Provides} +Description: Coin binding for Python + Pivy is a Coin binding for Python. Coin is a high-level 3D graphics library + with a C++ API. Coin uses scene-graph data structures to render real-time + graphics suitable for mostly all kinds of scientific and engineering + visualization applications. + Pivy allows: + . + * Development of Coin applications and extensions in Python + * Interactive modification of Coin programs from within the + Python interpreter at runtime + * Incorporation of Scripting Nodes into the scene graph which + are capable of executing Python code and callbacks + * Use of Coin within PyQt4 applications with the quarter module + +Package: python3-pivy +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}, python-qt4-gl +Provides: ${python:Provides} +Description: Coin binding for Python + Pivy is a Coin binding for Python. Coin is a high-level 3D graphics library + with a C++ API. Coin uses scene-graph data structures to render real-time + graphics suitable for mostly all kinds of scientific and engineering + visualization applications. + Pivy allows: + . + * Development of Coin applications and extensions in Python + * Interactive modification of Coin programs from within the + Python interpreter at runtime + * Incorporation of Scripting Nodes into the scene graph which + are capable of executing Python code and callbacks + * Use of Coin within PyQt4 applications with the quarter module diff -Nru pivy-0.6.5/packaging/debian/debian/copyright pivy-0.6.7/packaging/debian/debian/copyright --- pivy-0.6.5/packaging/debian/debian/copyright 1970-01-01 02:00:00.000000000 +0200 +++ pivy-0.6.7/packaging/debian/debian/copyright 2022-04-28 12:54:45.000000000 +0300 @@ -0,0 +1,25 @@ +Format: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=174 +Upstream-Name: Pivy +Upstream-Contact: https://www.coin3d.org/mailman/listinfo/coin-discuss/ +Source: http://hg.sim.no/Pivy/default/ + +Files: * +Copyright: 2002-2011, Kongsberg SIM (formerly known as Systems in Motion) +License: pivy-license + +Files: debian/* +Copyright: 2008-2011, Teemu Ikonen <tpiko...@gmail.com> +License: pivy-license + +License: pivy-license + Permission to use, copy, modify, and distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + . + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff -Nru pivy-0.6.5/packaging/debian/debian/docs pivy-0.6.7/packaging/debian/debian/docs --- pivy-0.6.5/packaging/debian/debian/docs 1970-01-01 02:00:00.000000000 +0200 +++ pivy-0.6.7/packaging/debian/debian/docs 2022-04-28 12:54:45.000000000 +0300 @@ -0,0 +1,6 @@ +NEWS +README.md +HACKING +THANKS +docs/ruby-inventor.txt + diff -Nru pivy-0.6.5/packaging/debian/debian/rules pivy-0.6.7/packaging/debian/debian/rules --- pivy-0.6.5/packaging/debian/debian/rules 1970-01-01 02:00:00.000000000 +0200 +++ pivy-0.6.7/packaging/debian/debian/rules 2022-04-28 12:54:45.000000000 +0300 @@ -0,0 +1,14 @@ +#!/usr/bin/make -f + +%: + dh $@ --with python2,python3 --buildsystem=python_distutils + + +override_dh_auto_install: + python3 setup.py install --force --root=debian/python3-pivy --no-compile -O0 --install-layout=deb + python3 setup.py clean + python2 setup.py install --force --root=debian/python-pivy --no-compile -O0 --install-layout=deb + python3 setup.py clean + +override_dh_auto_build: + echo "don't build, just install" diff -Nru pivy-0.6.5/packaging/debian/debian/source/format pivy-0.6.7/packaging/debian/debian/source/format --- pivy-0.6.5/packaging/debian/debian/source/format 1970-01-01 02:00:00.000000000 +0200 +++ pivy-0.6.7/packaging/debian/debian/source/format 2022-04-28 12:54:45.000000000 +0300 @@ -0,0 +1 @@ +3.0 (quilt) diff -Nru pivy-0.6.5/packaging/debian/debian/source/options pivy-0.6.7/packaging/debian/debian/source/options --- pivy-0.6.5/packaging/debian/debian/source/options 1970-01-01 02:00:00.000000000 +0200 +++ pivy-0.6.7/packaging/debian/debian/source/options 2022-04-28 12:54:45.000000000 +0300 @@ -0,0 +1,3 @@ +compression = "bzip2" +compression-level = 9 +single-debian-patch diff -Nru pivy-0.6.5/packaging/debian/debian/watch pivy-0.6.7/packaging/debian/debian/watch --- pivy-0.6.5/packaging/debian/debian/watch 1970-01-01 02:00:00.000000000 +0200 +++ pivy-0.6.7/packaging/debian/debian/watch 2022-04-28 12:54:45.000000000 +0300 @@ -0,0 +1,2 @@ +version=3 +http://pivy.coin3d.org/download/pivy/releases/(\d\.\d\.\d)/Pivy-(\d\.\d\.\d)\.tar\.gz diff -Nru pivy-0.6.5/pivy/graphics/__init__.py pivy-0.6.7/pivy/graphics/__init__.py --- pivy-0.6.5/pivy/graphics/__init__.py 2020-01-12 23:51:59.000000000 +0200 +++ pivy-0.6.7/pivy/graphics/__init__.py 2022-04-28 12:54:45.000000000 +0300 @@ -48,6 +48,8 @@ @points.setter def points(self, points): + # check if we got a list of 3D points + assert(len(points[0]) == len(points[-1]) == 3) self.data.point.setValue(0, 0, 0) self.data.point.setValues(0, len(points), points) @@ -93,6 +95,7 @@ def drag_objects(self): if self.enabled: return [self] + return [] def delete(self): if self.enabled and not self._delete: @@ -226,7 +229,7 @@ self.highlight_object(obj) def send_ray(self, mouse_pos): - """sends a ray trough the scene and return the nearest entity""" + """sends a ray through the scene and return the nearest entity""" ray_pick = coin.SoRayPickAction(self.render_manager.getViewportRegion()) ray_pick.setPoint(coin.SbVec2s(*mouse_pos)) ray_pick.setRadius(10) @@ -271,21 +274,6 @@ obj = self.send_ray(pos) self.select_object(obj, event.wasCtrlDown()) - def select_all_cb(self, event_callback): - event = event_callback.getEvent() - if (event.getKey() == ord('a')): - if event.getState() == event.DOWN: - if self.selected_objects: - for o in self.selected_objects: - o.unselect() - self.selected_objects = [] - else: - for obj in self.objects: - if obj.dynamic: - self.selected_objects.append(obj) - self.color_selected() - self.selection_changed() - def deselect_all(self): if self.selected_objects: for o in self.selected_objects: @@ -346,7 +334,7 @@ if self.drag_objects: # first delete the selection_cb, and higlight_cb self.unregister() - # now add a callback that calls the dragfunction of the selected entites + # now add a callback that calls the dragfunction of the selected entities self.start_pos = self.cursor_pos(event) self._dragCB = self.events.addEventCallback( coin.SoEvent.getClassTypeId(), self.dragCB) @@ -436,14 +424,18 @@ self.selection_changed() # needs upper case as this must overwrite the addChild from coin.SoSeparator - def removeAllChildren(self): + def removeAllChildren(self, clear_all=False): for i in self.dynamic_objects: i.delete() self.dynamic_objects = [] self.static_objects = [] self.selected_objects = [] self.over_object = None - super(InteractionSeparator, self).removeAllChildren() + if clear_all: + super(InteractionSeparator, self).removeAllChildren() + else: + # only deletes graphics objects + self.objects.removeAllChildren() # needs upper case as this must overwrite the addChild from coin.SoSeparator def addChild(self, child): @@ -454,4 +446,4 @@ else: self.static_objects.append(child) else: - super(InteractionSeparator, self).addChild(child) \ No newline at end of file + super(InteractionSeparator, self).addChild(child) diff -Nru pivy-0.6.5/pivy/pivy_meta.py pivy-0.6.7/pivy/pivy_meta.py --- pivy-0.6.5/pivy/pivy_meta.py 2020-01-12 23:51:59.000000000 +0200 +++ pivy-0.6.7/pivy/pivy_meta.py 2022-04-28 12:54:45.000000000 +0300 @@ -1 +1 @@ -__version__ = "0.6.5" +__version__ = "0.6.7" diff -Nru pivy-0.6.5/pivy/quarter/devices/DeviceManager.py pivy-0.6.7/pivy/quarter/devices/DeviceManager.py --- pivy-0.6.5/pivy/quarter/devices/DeviceManager.py 2020-01-12 23:51:59.000000000 +0200 +++ pivy-0.6.7/pivy/quarter/devices/DeviceManager.py 2022-04-28 12:54:45.000000000 +0300 @@ -51,7 +51,7 @@ self.lastmousepos = SbVec2s(0, 0) def translateEvent(self, qevent): - """Runs trough the list of registered devices to translate event""" + """Runs through the list of registered devices to translate event""" if qevent.type() == QEvent.MouseMove: self.globalpos = qevent.globalPos() diff -Nru pivy-0.6.5/pivy/quarter/eventhandlers/EventManager.py pivy-0.6.7/pivy/quarter/eventhandlers/EventManager.py --- pivy-0.6.5/pivy/quarter/eventhandlers/EventManager.py 2020-01-12 23:51:59.000000000 +0200 +++ pivy-0.6.7/pivy/quarter/eventhandlers/EventManager.py 2022-04-28 12:54:45.000000000 +0300 @@ -29,7 +29,7 @@ self.eventhandlers = [] def handleEvent(self, qevent): - """Runs trough the list of registered devices to translate events""" + """Runs through the list of registered devices to translate events""" for handler in self.eventhandlers: if handler.handleEvent(qevent): return True diff -Nru pivy-0.6.5/pivy/quarter/QuarterWidget.py pivy-0.6.7/pivy/quarter/QuarterWidget.py --- pivy-0.6.5/pivy/quarter/QuarterWidget.py 2020-01-12 23:51:59.000000000 +0200 +++ pivy-0.6.7/pivy/quarter/QuarterWidget.py 2022-04-28 12:54:45.000000000 +0300 @@ -432,7 +432,7 @@ self.sorendermanager.scheduleRedraw() def enableHeadlight(self, onoff): - """ Enable/disable the headlight. This wille toggle the SoDirectionalLigh::on + """ Enable/disable the headlight. This will toggle the SoDirectionalLigh::on field (returned from getHeadlight()).""" self.headlight.on = onoff diff -Nru pivy-0.6.5/README.md pivy-0.6.7/README.md --- pivy-0.6.5/README.md 2020-01-12 23:51:59.000000000 +0200 +++ pivy-0.6.7/README.md 2022-04-28 12:54:45.000000000 +0300 @@ -2,7 +2,17 @@ --------------------------- [](https://travis-ci.org/Coin3D/pivy) -Pivy uses [distutils][0]. To build Pivy, run +Starting with version 0.6.6 pivy it's possible to build pivy with cmake: + +```bash + $ cd pivy + $ mkdir build + $ cd build + $ cmake .. + $ make +``` + +Alternative it's still possible to use [distutils][0]: ```bash $ python3 setup.py build diff -Nru pivy-0.6.5/scons/scons-time.py pivy-0.6.7/scons/scons-time.py --- pivy-0.6.5/scons/scons-time.py 2020-01-12 23:51:59.000000000 +0200 +++ pivy-0.6.7/scons/scons-time.py 2022-04-28 12:54:45.000000000 +0300 @@ -599,7 +599,7 @@ def logfile_name(self, invocation): """ - Returns the absolute path of a log file for the specificed + Returns the absolute path of a log file for the specified invocation number. """ name = self.prefix_run + '-%d.log' % invocation diff -Nru pivy-0.6.5/setup_old.py pivy-0.6.7/setup_old.py --- pivy-0.6.5/setup_old.py 2020-01-12 23:51:59.000000000 +0200 +++ pivy-0.6.7/setup_old.py 2022-04-28 12:54:45.000000000 +0300 @@ -411,7 +411,7 @@ CPP_FLAGS = "-I" + quote(INCLUDE_DIR) + " " + \ "-I" + quote(os.path.join(os.getenv("COINDIR"), "include", "Inventor", "annex")) + \ " /DCOIN_DLL /wd4244 /wd4049" - # aquire highest non-debug Coin library version + # acquire highest non-debug Coin library version try: LDFLAGS_LIBS = quote(max(glob.glob(os.path.join(os.getenv("COINDIR"), "lib", "coin?.lib")))) + " " # with cmake the coin library is named Coin4.lib diff -Nru pivy-0.6.5/setup.py pivy-0.6.7/setup.py --- pivy-0.6.5/setup.py 2020-01-12 23:51:59.000000000 +0200 +++ pivy-0.6.7/setup.py 2022-04-28 12:54:45.000000000 +0300 @@ -192,7 +192,7 @@ 'pivy.graphics.viewer'] def check_with_cmake(self): - dirname = os.path.dirname(__file__) + dirname = os.path.join(os.path.dirname(__file__), "distutils_cmake") cmake_command = ['cmake', dirname] try: cmake_command += ['-G', os.environ['GENERATOR']] @@ -519,7 +519,7 @@ CPP_FLAGS += "-I" + quote(INCLUDE_DIR) + " " + \ "-I" + quote(os.path.join(os.getenv("COINDIR"), "include", "Inventor", "annex")) + \ " /DCOIN_DLL /wd4244 /wd4049" - # aquire highest non-debug Coin library version + # acquire highest non-debug Coin library version try: LDFLAGS_LIBS = quote( max(glob.glob(os.path.join(os.getenv("COINDIR"), "lib", "coin?.lib")))) + " " diff -Nru pivy-0.6.5/SoPyScript/SoPyScript.cpp pivy-0.6.7/SoPyScript/SoPyScript.cpp --- pivy-0.6.5/SoPyScript/SoPyScript.cpp 2020-01-12 23:51:59.000000000 +0200 +++ pivy-0.6.7/SoPyScript/SoPyScript.cpp 2022-04-28 12:54:45.000000000 +0300 @@ -38,7 +38,7 @@ #include "swigpyrun.h" #include "SoPyScript.h" -// Python code snippet to load in a URL through the urrlib module +// Python code snippet to load in a URL through the urllib module #define PYTHON_URLLIB_URLOPEN "\ import urllib\n\ try:\n\ diff -Nru pivy-0.6.5/TargetCopyFiles.cmake pivy-0.6.7/TargetCopyFiles.cmake --- pivy-0.6.5/TargetCopyFiles.cmake 1970-01-01 02:00:00.000000000 +0200 +++ pivy-0.6.7/TargetCopyFiles.cmake 2022-04-28 12:54:45.000000000 +0300 @@ -0,0 +1,156 @@ +# The MIT License (MIT) + +# Copyright (c) 2013 University College London + +# Permission is hereby granted, free of charge, to any person obtaining a copy of +# this software and associated documentation files (the "Software"), to deal in +# the Software without restriction, including without limitation the rights to +# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +# the Software, and to permit persons to whom the Software is furnished to do so, +# subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +# Adds a target which simply copies files from one place to another. +# See https://github.com/UCL/GreatCMakeCookOff/wiki for information + +include(CMakeParseArguments) + +function(add_copy_files FILECOPIER_TARGET) + cmake_parse_arguments( + FILECOPIER + "VERBOSE" + "DESTINATION;GLOB" + "REPLACE;FILES" + ${ARGN} + ) + + if(NOT TARGET "${FILECOPIER_TARGET}") + add_custom_target(${FILECOPIER_TARGET}) + endif() + get_target_property(result ${FILECOPIER_TARGET} TYPE) + if(NOT FILECOPIER_DESTINATION) + set(destination ${CMAKE_CURRENT_BINARY_DIR}) + else() + get_filename_component(destination "${FILECOPIER_DESTINATION}" ABSOLUTE) + endif() + if(NOT FILECOPIER_GLOB AND NOT FILECOPIER_FILES) + set(input_sources ${FILECOPIER_UNPARSED_ARGUMENTS}) + elseif(FILECOPIER_GLOB AND FILECOPIER_FILES) + message(FATAL_ERROR "copy_files takes one of GLOB or FILES, not both") + elseif(FILECOPIER_FILES) + set(input_sources ${FILECOPIER_FILES}) + else() + file(GLOB input_sources ${FILECOPIER_GLOB}) + endif() + + if(FILECOPIER_REPLACE) + list(LENGTH FILECOPIER_REPLACE replace_length) + if(NOT ${replace_length} EQUAL 2) + message(FATAL_ERROR "copy_files argument REPLACE takes two inputs") + endif() + list(GET FILECOPIER_REPLACE 0 PATTERN) + list(GET FILECOPIER_REPLACE 1 REPLACEMENT) + endif() + + foreach(input ${input_sources}) + get_filename_component(output ${input} NAME) + if(NOT "${FILECOPIER_REPLACE}" STREQUAL "") + string(REGEX REPLACE "${PATTERN}" "${REPLACEMENT}" output ${output}) + endif() + set(output ${destination}/${output}) + get_filename_component(input_abs "${input}" ABSOLUTE) + get_filename_component(output_abs "${output}" ABSOLUTE) + set(verbosity COMMENT "Copying ${input} to ${destination}") + if(NOT ${FILECOPIER_VERBOSE}) + unset(verbosity) + endif() + if(NOT "${input_abs}" STREQUAL "${output_abs}") + add_custom_command( + TARGET ${FILECOPIER_TARGET} + PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${input_abs} ${output_abs} + ${verbosity} + DEPENDS "${input}" + ) + endif() + endforeach() +endfunction() + +function(add_copy_directory dircopy_TARGET directory) + cmake_parse_arguments(dircopy + "VERBOSE" "DESTINATION;RELATIVE" "EXCLUDE;GLOB" ${ARGN}) + + get_filename_component(directory "${directory}" ABSOLUTE) + if(NOT TARGET ${dircopy_TARGET}) + add_custom_target(${dircopy_TARGET}) + endif() + if(NOT dircopy_GLOB) + set(dircopy_GLOB "*") + endif() + if(NOT dircopy_EXCLUDE) + unset(dircopy_EXCLUDE) + endif() + if(NOT dircopy_DESTINATION) + set(dircopy_DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") + else() + get_filename_component(dircopy_DESTINATION "${dircopy_DESTINATION}" ABSOLUTE) + endif() + if(NOT dircopy_RELATIVE) + set(dircopy_RELATIVE "${directory}") + else() + get_filename_component(dircopy_RELATIVE "${dircopy_RELATIVE}" ABSOLUTE) + endif() + + # Figure out globs for files that could be copied + unset(in_globs) + foreach(pattern ${dircopy_GLOB}) + list(APPEND in_globs "${directory}/${pattern}") + endforeach() + # Figure out globs for files that won't be copied + unset(exclude_globs) + foreach(pattern ${dircopy_EXCLUDE}) + list(APPEND exclude_globs "${directory}/${pattern}") + endforeach() + + # Figure out files to copy + file(GLOB_RECURSE in_files RELATIVE "${dircopy_RELATIVE}" ${in_globs}) + if(NOT "${exclude_globs}" STREQUAL "") + file(GLOB_RECURSE exclude_files RELATIVE "${dircopy_RELATIVE}" ${exclude_globs}) + if(exclude_files) + list(REMOVE_ITEM in_files ${exclude_files}) + endif() + endif() + + # And do the copying + foreach(infile ${in_files}) + set(output "${dircopy_DESTINATION}/${infile}") + set(input "${dircopy_RELATIVE}/${infile}") + get_filename_component(output_abs "${output}" ABSOLUTE) + get_filename_component(input_abs "${input}" ABSOLUTE) + set(verbosity COMMENT "Copying ${infile} to ${dircopy_DESTINATION}") + if(NOT ${dircopy_VERBOSE}) + unset(verbosity) + endif() + if(NOT "${input_abs}" STREQUAL "${output_abs}") + add_custom_command( + TARGET ${dircopy_TARGET} + PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${input_abs} ${output_abs} + ${verbosity} + DEPENDS "${input}" + ) + endif() + endforeach() +endfunction() +