Hello community,

here is the log from the commit of package python-pivy for openSUSE:Factory 
checked in at 2019-06-12 13:10:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pivy (Old)
 and      /work/SRC/openSUSE:Factory/.python-pivy.new.4811 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pivy"

Wed Jun 12 13:10:54 2019 rev:7 rq:702650 version:0.6.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pivy/python-pivy.changes  2019-02-06 
14:07:51.814644364 +0100
+++ /work/SRC/openSUSE:Factory/.python-pivy.new.4811/python-pivy.changes        
2019-06-12 13:10:56.249028183 +0200
@@ -1,0 +2,9 @@
+Mon May 13 10:17:38 UTC 2019 - Christophe Giboudeaux <christo...@krop.fr>
+
+- Add 0001-Allow-using-SoQt-snapshots-with-stable-Coin-version.patch
+  This will allow using SoQt snapshots with stable Coin releases.
+- Add 0002-Fix-the-qmake-executable-name.patch. The qmake executable
+  is called qmake-qt5 for openSUSE.
+- Run spec-cleaner
+
+-------------------------------------------------------------------

New:
----
  0001-Allow-using-SoQt-snapshots-with-stable-Coin-version.patch
  0002-Fix-the-qmake-executable-name.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-pivy.spec ++++++
--- /var/tmp/diff_new_pack.4I84fM/_old  2019-06-12 13:10:56.877027525 +0200
+++ /var/tmp/diff_new_pack.4I84fM/_new  2019-06-12 13:10:56.877027525 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-pivy
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,26 +17,28 @@
 
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
-
 Name:           python-pivy
 Version:        0.6.4
 Release:        0
 Summary:        Coin Binding for Python
 License:        ISC AND GPL-2.0-or-later
 Group:          Development/Libraries/Python
-Url:            https://github.com/FreeCAD/pivy
+URL:            https://github.com/FreeCAD/pivy
 Source0:        
https://github.com/FreeCAD/pivy/archive/%{version}.tar.gz#/Pivy-%{version}.tar.gz
 # PATCH-FIX-UPSTREAM -- https://github.com/FreeCAD/pivy/issues/39
 Patch0:         Fix-issue-39-PyUnicode_AsUTF8-returns-const-char.patch
+# PATCH-FIX-OPENSUSE 
0001-Allow-using-SoQt-snapshots-with-stable-Coin-version.patch -- Use CMake to 
find Coin and SoQt
+Patch1:         0001-Allow-using-SoQt-snapshots-with-stable-Coin-version.patch
+# PATCH-FIX-OPENSUSE 0002-Fix-the-qmake-executable-name.patch -- Fix the qmake 
executable name
+Patch2:         0002-Fix-the-qmake-executable-name.patch
 BuildRequires:  %{python_module devel}
 BuildRequires:  Coin-devel
 BuildRequires:  SoQt-devel
+BuildRequires:  cmake
 BuildRequires:  fdupes
 BuildRequires:  gcc
 BuildRequires:  python-rpm-macros
 BuildRequires:  swig
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-
 %python_subpackages
 
 %description
@@ -54,13 +56,9 @@
   executing Python code and callbacks
 
 %prep
-%setup -q -n pivy-%{version}
-%patch0 -p1
+%autosetup -p1 -n pivy-%{version}
 
 %build
-# use setup_old.py until we have a Coin with cmake support
-mv setup.py setup_new.py
-mv setup_old.py setup.py
 export CFLAGS="%{optflags}"
 %{python_build ; rm pivy/coin_wrap.cpp pivy/gui/soqt_wrap.cpp }
 
@@ -69,7 +67,7 @@
 
 %python_expand %fdupes %{buildroot}%{$python_sitelib}/pivy/
 
-%files %python_files
+%files %{python_files}
 %license LICENSE 
 %doc AUTHORS HACKING NEWS README.md THANKS
 %{python_sitelib}/pivy/

++++++ 0001-Allow-using-SoQt-snapshots-with-stable-Coin-version.patch ++++++
>From 57acc4ac6b621fb4985e22bb505f0069858352f1 Mon Sep 17 00:00:00 2001
From: Christophe Giboudeaux <christo...@krop.fr>
Date: Mon, 13 May 2019 12:13:06 +0200
Subject: [PATCH] Allow using SoQt snapshots with stable Coin version.

The current SoQt snapshots use CMake config files while the Coin version
currently available doesn't.

In order to use CMake to find path, we'll use a FindCoin.cmake module.
---
 CMakeLists.txt | 15 +++++----
 FindCoin.cmake | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 97 insertions(+), 6 deletions(-)
 create mode 100644 FindCoin.cmake

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 76d0d06..8473d8e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,17 +1,18 @@
-project(pivy_cmake_setup NONE)
+# libraries cannot be found if the project is 'NONE')
+project(pivy_cmake_setup)
 cmake_minimum_required(VERSION 3.5)
 
+set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
+find_package(Coin MODULE REQUIRED)
 
-find_package(Coin CONFIG REQUIRED)
-
-if (Coin_INCLUDE_DIR)
+if (Coin_INCLUDE_DIRS)
     MESSAGE(STATUS "COIN_FOUND: " true)
 else()
     MESSAGE(STATUS "COIN_FOUND: " false)
 endif()
 
-MESSAGE(STATUS "COIN_INCLUDE_DIR: " ${Coin_INCLUDE_DIR})
-MESSAGE(STATUS "COIN_LIB_DIR: " ${Coin_LIB_DIR})
+MESSAGE(STATUS "COIN_INCLUDE_DIR: " ${Coin_INCLUDE_DIRS})
+MESSAGE(STATUS "COIN_LIB_DIR: " ${PC_Coin_LIBDIR})
 MESSAGE(STATUS "COIN_VERSION: " ${Coin_VERSION})
 
 
@@ -23,6 +24,8 @@ if (SoQt_INCLUDE_DIRS)
 else()
     MESSAGE(STATUS "SOQT_FOUND: " false)
 endif()
+# python is confused if the include directories contain more than one path
+list(REMOVE_DUPLICATES SoQt_INCLUDE_DIRS)
 
 MESSAGE(STATUS "SOQT_INCLUDE_DIR: " ${SoQt_INCLUDE_DIRS})
 MESSAGE(STATUS "SOQT_LIB_DIR: " ${SoQt_LIBRARY_DIRS})
diff --git a/FindCoin.cmake b/FindCoin.cmake
new file mode 100644
index 0000000..3c6762a
--- /dev/null
+++ b/FindCoin.cmake
@@ -0,0 +1,88 @@
+#.rst:
+# FindCoin
+# ---------
+#
+# Try to find the Coin library.
+# This module is temporary and only meant to find older Coin versions when 
using
+# GIT snapshots for SoQt.
+#
+# This will define the following variables:
+#
+# ``Coin_FOUND``
+#     Coin was found.
+#
+# ``Coin_VERSION``
+#     The version of Coin.
+#
+# ``Coin_INCLUDE_DIRS``
+#     This should be passed to target_include_directories() if
+#     the target is not used for linking.
+#
+# ``Coin_LIBRARIES``
+#     The Coin library.
+#     This can be passed to target_link_libraries() instead of
+#     the ``Coin::Coin`` target
+#
+# If ``Coin_FOUND`` is TRUE, the following imported target
+# will be available:
+#
+# ``Coin::Coin``
+#     The Coin library
+#
+#=============================================================================
+# Copyright 2019 Christophe Giboudeaux <christo...@krop.fr>
+#
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+# 3. The name of the author may not be used to endorse or promote products
+#    derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#=============================================================================
+find_package(PkgConfig QUIET)
+pkg_check_modules(PC_Coin Coin)
+
+find_path(Coin_INCLUDE_DIRS
+  NAMES Inventor/So.h
+  HINTS ${PC_Coin_INCLUDEDIR}
+)
+
+find_library(Coin_LIBRARIES
+  NAMES Coin
+  HINTS ${PC_Coin_LIBDIR}
+)
+
+set(Coin_VERSION "${PC_Coin_VERSION}")
+
+include(FindPackageHandleStandardArgs)
+
+find_package_handle_standard_args(Coin
+    FOUND_VAR Coin_FOUND
+    REQUIRED_VARS Coin_LIBRARIES Coin_INCLUDE_DIRS
+    VERSION_VAR Coin_VERSION
+)
+if(Coin_FOUND AND NOT TARGET Coin::Coin)
+  add_library(Coin::Coin UNKNOWN IMPORTED)
+  set_target_properties(Coin::Coin PROPERTIES
+  IMPORTED_LOCATION "${Coin_LIBRARIES}"
+  INTERFACE_INCLUDE_DIRECTORIES "${Coin_INCLUDE_DIRS}")
+endif()
+
+mark_as_advanced(Coin_LIBRARIES Coin_INCLUDE_DIRS Coin_VERSION)
-- 
2.21.0

++++++ 0002-Fix-the-qmake-executable-name.patch ++++++
>From ff8ea140b0799643ad3097b89e8ed6e7b27cbc04 Mon Sep 17 00:00:00 2001
From: Christophe Giboudeaux <christo...@krop.fr>
Date: Mon, 13 May 2019 12:32:01 +0200
Subject: [PATCH] Fix the qmake executable name

---
 qtinfo.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/qtinfo.py b/qtinfo.py
index 49b03b4..1500c7e 100644
--- a/qtinfo.py
+++ b/qtinfo.py
@@ -7,7 +7,7 @@ class QtInfo(object):
         if qmake_command:
             self._qmake_command = qmake_command
         else:
-            self._qmake_command = [find_executable("qmake"),]
+            self._qmake_command = [find_executable("qmake-qt5"),]
         self._dict = {}
         # bind all variables early at __init__ time.
         for thing in self.__class__.__dict__:
@@ -79,4 +79,4 @@ class QtInfo(object):
     translations_dir = property(getTranslationsPath)
     headers_dir = property(getHeadersPath)
     docs_dir = property(getDocsPath)
-    qml_dir = property(getQmlPath)
\ No newline at end of file
+    qml_dir = property(getQmlPath)
-- 
2.21.0


Reply via email to