SHA256
1
0
forked from pool/python-pivy

Accepting request 974387 from home:frispete:branches:science

Hi Guys,

here's the new python-pivy version, that is the fallout of a FreeCAD
bug hunt on Leap 15.3, where switching to Draft Workbench resulted in
this TB for certain models:

in method 'SoAsciiText_string_set', argument 2 of type 'SoMFString *'
Traceback (most recent call last):
  File "<string>", line 132, in Activated
  File "/usr/lib64/FreeCAD/Mod/Draft/draftguitools/gui_snapper.py", line 1635, in show
    self.setTrackers()
  File "/usr/lib64/FreeCAD/Mod/Draft/draftguitools/gui_snapper.py", line 1679, in setTrackers
    self.grid = trackers.gridTracker()
  File "/usr/lib64/FreeCAD/Mod/Draft/draftguitools/gui_trackers.py", line 991, in __init__
    self.text1.string = " "
  File "/usr/lib64/python3.6/site-packages/pivy/coin.py", line 51917, in <lambda>
    __setattr__ = lambda self, name, value: _swig_setattr(self, SoAsciiText, name, value)
  File "/usr/lib64/python3.6/site-packages/pivy/coin.py", line 80, in _swig_setattr
    return _swig_setattr_nondynamic(self, class_type, name, value, 0)
  File "/usr/lib64/python3.6/site-packages/pivy/coin.py", line 69, in _swig_setattr_nondynamic
    return method(self, value)

https://grabcad.com/library/freecad-surfaced-mouse-1

The real fix for this issue is building pivy with swig 4.0.2, so 
could some kind soul enable swig 4.0.2 build (and use for build) from
this repo for 15.3, please.

- Update to 0.6.7:
  * aiming at python3.10 support
- Remove upstreamed fix_python_installdir.patch

OBS-URL: https://build.opensuse.org/request/show/974387
OBS-URL: https://build.opensuse.org/package/show/science/python-pivy?expand=0&rev=23
This commit is contained in:
2022-05-17 13:34:11 +00:00
committed by Git OBS Bridge
parent b3bf916566
commit 3fa971606d
5 changed files with 11 additions and 110 deletions
+7
View File
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon May 2 08:47:36 UTC 2022 - Hans-Peter Jansen <hpj@urpla.net>
- Update to 0.6.7:
* aiming at python3.10 support
- Remove upstreamed fix_python_installdir.patch
-------------------------------------------------------------------
Mon Mar 14 09:21:00 UTC 2022 - Dominique Leuenberger <dimstar@opensuse.org>
+1 -3
View File
@@ -21,7 +21,7 @@
#%%define skip_python310 1
Name: python-pivy
Version: 0.6.6
Version: 0.6.7
Release: 0
Summary: Coin Binding for Python
# GPL only applies to some examples
@@ -29,8 +29,6 @@ License: GPL-2.0-only AND ISC
Group: Development/Libraries/Python
URL: https://github.com/FreeCAD/pivy
Source0: https://github.com/FreeCAD/pivy/archive/%{version}.tar.gz#/pivy-%{version}.tar.gz
# PATCH-FIX-UPSTREAM
Patch0: https://github.com/coin3d/pivy/pull/92.patch#/fix_python_installdir.patch
BuildRequires: %{python_module devel}
BuildRequires: cmake
BuildRequires: fdupes
-104
View File
@@ -1,104 +0,0 @@
From e0b6a7e2a42fe8e15f28ddf49d1e540a9d481cec Mon Sep 17 00:00:00 2001
From: StefanBruens <stefan.bruens@rwth-aachen.de>
Date: Wed, 23 Feb 2022 01:43:53 +0100
Subject: [PATCH] Correct Python install directory to be arch specific
Binary (i.e. non-pure) python modules should be installed to an
arch specific directory.
Instead of doing this manually, use the Python_SITEARCH variable
provided by the new FindPython module, available since CMake 3.12.
---
CMakeLists.txt | 14 +++-----------
interfaces/CMakeLists.txt | 12 ++++++------
2 files changed, 9 insertions(+), 17 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 800a98c..1fe9ec9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,13 +14,12 @@ if (SoQt_FOUND)
find_package(Qt5 COMPONENTS Core Widgets Gui REQUIRED)
endif()
-find_package(PythonInterp REQUIRED)
-find_package(PythonLibs REQUIRED)
+find_package(Python REQUIRED COMPONENTS Interpreter Development)
# SWIGIFY HEADERS
# doing this with the origin python functions
-execute_process(COMMAND ${PYTHON_EXECUTABLE} -c
+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}');")
@@ -34,18 +33,11 @@ add_copy_directory(pivy ${CMAKE_SOURCE_DIR}/pivy
PATTERN *.py
)
-
-# find python install destination
-
-execute_process(COMMAND ${PYTHON_EXECUTABLE} -c
- "from distutils.sysconfig import get_python_lib; print(get_python_lib())"
- OUTPUT_VARIABLE python_libs OUTPUT_STRIP_TRAILING_WHITESPACE )
-
add_subdirectory(interfaces)
install(DIRECTORY
${CMAKE_BINARY_DIR}/pivy
- DESTINATION ${python_libs}
+ DESTINATION ${Python_SITEARCH}
FILES_MATCHING
PATTERN "*.py"
PATTERN "*.so"
diff --git a/interfaces/CMakeLists.txt b/interfaces/CMakeLists.txt
index 6c3a01c..92f9af6 100644
--- a/interfaces/CMakeLists.txt
+++ b/interfaces/CMakeLists.txt
@@ -28,19 +28,19 @@ 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})
+ target_link_libraries(coin PUBLIC ${Python_LIBRARIES})
endif ()
target_include_directories(coin
PUBLIC
${Coin_INCLUDE_DIR}
- ${PYTHON_INCLUDE_DIRS}
+ ${Python_INCLUDE_DIRS}
PRIVATE
${CMAKE_SOURCE_DIR}/interfaces
)
target_link_libraries(coin PUBLIC Coin::Coin)
-install(TARGETS coin DESTINATION ${python_libs}/pivy)
+install(TARGETS coin DESTINATION ${Python_SITEARCH}/pivy)
if (SoQt_FOUND)
@@ -63,7 +63,7 @@ if (SoQt_FOUND)
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})
+ target_link_libraries(soqt PUBLIC ${Python_LIBRARIES})
endif ()
target_include_directories(soqt
@@ -71,11 +71,11 @@ if (SoQt_FOUND)
${SoQt_INCLUDE_DIRS}
${Qt5Gui_INCLUDE_DIRS}
${Qt5Widgets_INCLUDE_DIRS}
- ${PYTHON_INCLUDE_DIRS}
+ ${Python_INCLUDE_DIRS}
PRIVATE
${CMAKE_SOURCE_DIR}/interfaces
)
target_link_libraries(soqt PUBLIC SoQt::SoQt)
- install(TARGETS soqt DESTINATION ${python_libs}/pivy/gui)
+ install(TARGETS soqt DESTINATION ${Python_SITEARCH}/pivy/gui)
endif()
-3
View File
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:27204574d894cc12aba5df5251770f731f326a3e7de4499e06b5f5809cc5659e
size 6618471
+3
View File
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:37e33d85117aac27640e011df74ddcd77f270428300df916b46ee5c50645d582
size 6618410