Hello community, here is the log from the commit of package openwsman for openSUSE:Factory checked in at 2017-09-13 22:32:56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/openwsman (Old) and /work/SRC/openSUSE:Factory/.openwsman.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "openwsman" Wed Sep 13 22:32:56 2017 rev:62 rq:522878 version:2.6.3 Changes: -------- --- /work/SRC/openSUSE:Factory/openwsman/openwsman.changes 2017-05-03 15:56:43.800123427 +0200 +++ /work/SRC/openSUSE:Factory/.openwsman.new/openwsman.changes 2017-09-13 22:32:58.209351668 +0200 @@ -1,0 +2,6 @@ +Sat Sep 9 11:38:42 UTC 2017 - kgronl...@suse.com + +- Package for python 3 +- Add openwsman-2.6.2-python3.patch + +------------------------------------------------------------------- New: ---- openwsman-2.6.2-python3.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ openwsman.spec ++++++ --- /var/tmp/diff_new_pack.Ex9J6k/_old 2017-09-13 22:32:59.725138280 +0200 +++ /var/tmp/diff_new_pack.Ex9J6k/_new 2017-09-13 22:32:59.729137717 +0200 @@ -1,7 +1,7 @@ # # spec file for package openwsman # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 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 @@ -27,11 +27,23 @@ BuildRequires: gcc-c++ BuildRequires: libxml2-devel BuildRequires: pam-devel +%if 0%{?suse_version} > 1320 +BuildRequires: python2 +BuildRequires: python2-devel +%else +BuildRequires: python +BuildRequires: python-devel +%endif +%if 0%{?suse_version} +%if 0%{?suse_version} != 1010 +BuildRequires: python3 +BuildRequires: python3-devel +%endif +%endif BuildRequires: sblim-sfcc-devel BuildRequires: swig >= 2.0.5 BuildRequires: perl -BuildRequires: python-devel %if 0%{?suse_version} > 1320 BuildRequires: strip-nondeterminism %endif @@ -141,6 +153,7 @@ %else Source2: %{name}.pam %endif +Patch2: openwsman-2.6.2-python3.patch Source3: %{name}.SuSEfirewall2 BuildRoot: %{_tmppath}/%{name}-%{version}-build Source4: %{name}.service @@ -219,18 +232,37 @@ WS-Management resource handler in Ruby -%package python +%package -n python2-openwsman +Provides: openwsman-python = %{version} +Provides: openwsman-python2 = %{version} Summary: Python bindings for openwsman client API Group: Development/Libraries/Python +%if 0%{?suse_version} > 1320 +Requires: python2 +%else %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} %{!?py_requires: %define py_requires Requires: python} %{py_requires} +%endif -%description python +%description -n python2-openwsman This package provides Python bindings to access the openwsman client API. +%if 0%{?suse_version} +%if 0%{?suse_version} != 1010 +%package -n python3-openwsman +Provides: openwsman-python3 = %{version} +Summary: Python bindings for openwsman client API +Group: Development/Libraries/Python +Requires: python3 + +%description -n python3-openwsman +This package provides Python bindings to access the openwsman client +API. +%endif +%endif %package ruby Requires: ruby @@ -324,9 +356,24 @@ %prep %setup -q + +%if 0%{?suse_version} +%if 0%{?suse_version} != 1010 +# support python3 +pushd bindings +cp -r python python3 +popd +%endif +%endif + %if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel} %patch1 -p1 %endif +%if 0%{?suse_version} +%if 0%{?suse_version} != 1010 +%patch2 -p1 -b .python3 +%endif +%endif %build rm -rf build @@ -466,10 +513,30 @@ %exclude %{_includedir}/openwsman/cpp/*.h %exclude %{_libdir}/libwsman_clientpp.so -%files python +%files -n python2-openwsman %defattr(-,root,root) +%if 0%{?suse_version} > 1320 +%{python2_sitearch}/*.so +%{python2_sitearch}/*.py +%else %{python_sitearch}/*.so -%{python_sitearch}/*.py* +%{python_sitearch}/*.py +%if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} +%{python_sitearch}/*.pyc +%{python_sitearch}/*.pyo +%endif +%endif +%doc AUTHORS COPYING ChangeLog README.md + +%if 0%{?suse_version} +%if 0%{?suse_version} != 1010 +%files -n python3-openwsman +%defattr(-,root,root) +%{python3_sitearch}/*.so +%{python3_sitearch}/*.py +%doc AUTHORS COPYING ChangeLog README.md +%endif +%endif %files ruby %defattr(-,root,root) ++++++ openwsman-2.6.2-python3.patch ++++++ diff -up openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/bindings/CMakeLists.txt.orig openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/bindings/CMakeLists.txt --- openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/bindings/CMakeLists.txt.orig 2016-07-27 16:03:55.000000000 +0200 +++ openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/bindings/CMakeLists.txt 2017-01-16 14:08:53.201529586 +0100 @@ -10,6 +10,7 @@ include_directories(${CMAKE_BINARY_DIR}) IF( BUILD_PYTHON ) add_subdirectory(python) +add_subdirectory(python3) ENDIF( BUILD_PYTHON ) IF( BUILD_RUBY ) diff -up openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/bindings/python3/CMakeLists.txt.orig openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/bindings/python3/CMakeLists.txt --- openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/bindings/python3/CMakeLists.txt.orig 2017-01-16 14:08:09.000000000 +0100 +++ openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/bindings/python3/CMakeLists.txt 2017-01-16 14:10:48.945480021 +0100 @@ -12,11 +12,28 @@ enable_testing() add_subdirectory(tests) -EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))" OUTPUT_VARIABLE PYTHON_LIB_DIR) -STRING(REPLACE "\n" "" PYTHON_LIB_DIR "${PYTHON_LIB_DIR}") +MESSAGE(STATUS "Python3 build:") +unset(Python_ADDITIONAL_VERSIONS) +set(Python_ADDITIONAL_VERSIONS 3.5) +FIND_PACKAGE(PythonLibs) +IF (PYTHON_LIBRARY) + FIND_PACKAGE(PythonInterp REQUIRED) + #MESSAGE(STATUS "Found PythonLibs...") + FIND_PACKAGE(PythonLinkLibs) + #IF (PYTHON_LINK_LIBS) + # MESSAGE(STATUS "Building Python...") + #ENDIF (PYTHON_LINK_LIBS) +ENDIF (PYTHON_LIBRARY) + +set(PYTHON3_EXECUTABLE "${PYTHON_EXECUTABLE}") +set(PYTHON3_INCLUDE_DIRS "${PYTHON_INCLUDE_DIRS}") +set({PYTHON3_INCLUDE_PATH "${PYTHON_INCLUDE_PATH}") -MESSAGE(STATUS "Python executable: ${PYTHON_EXECUTABLE}") -MESSAGE(STATUS "Python lib dir: ${PYTHON_LIB_DIR}") +EXECUTE_PROCESS(COMMAND ${PYTHON3_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))" OUTPUT_VARIABLE PYTHON3_LIB_DIR) +STRING(REPLACE "\n" "" PYTHON3_LIB_DIR "${PYTHON3_LIB_DIR}") + +MESSAGE(STATUS "Python executable: ${PYTHON3_EXECUTABLE}") +MESSAGE(STATUS "Python lib dir: ${PYTHON3_LIB_DIR}") SET( SWIG_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/openwsman_wrap.c" ) @@ -36,14 +53,14 @@ SET(pywsman_SRCS ${SWIG_OUTPUT} ${CMAKE_ ADD_LIBRARY( pywsman SHARED ${pywsman_SRCS} ) SET_TARGET_PROPERTIES( pywsman PROPERTIES PREFIX "_" ) -INCLUDE_DIRECTORIES( ${PYTHON_INCLUDE_DIRS} ) +INCLUDE_DIRECTORIES( ${PYTHON3_INCLUDE_DIRS} ) # RHEL5 needs this: -INCLUDE_DIRECTORIES( ${PYTHON_INCLUDE_PATH} ) +INCLUDE_DIRECTORIES( ${PYTHON3_INCLUDE_PATH} ) INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} ) INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/bindings ${CMAKE_SOURCE_DIR}/include ) TARGET_LINK_LIBRARIES( pywsman wsman ) TARGET_LINK_LIBRARIES( pywsman wsman_client ) -INSTALL(TARGETS pywsman LIBRARY DESTINATION ${PYTHON_LIB_DIR}) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/pywsman.py DESTINATION ${PYTHON_LIB_DIR} ) +INSTALL(TARGETS pywsman LIBRARY DESTINATION ${PYTHON3_LIB_DIR}) +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/pywsman.py DESTINATION ${PYTHON3_LIB_DIR} ) diff -up openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/bindings/python/CMakeLists.txt.orig openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/bindings/python/CMakeLists.txt --- openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/bindings/python/CMakeLists.txt.orig 2016-07-27 16:03:55.000000000 +0200 +++ openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/bindings/python/CMakeLists.txt 2017-01-16 14:12:51.954427345 +0100 @@ -12,11 +12,52 @@ enable_testing() add_subdirectory(tests) -EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))" OUTPUT_VARIABLE PYTHON_LIB_DIR) -STRING(REPLACE "\n" "" PYTHON_LIB_DIR "${PYTHON_LIB_DIR}") +MESSAGE(STATUS "Python2 build:") +set(Python_ADDITIONAL_VERSIONS 2.7) +FIND_PACKAGE(PythonLibs) +IF (PYTHON_LIBRARY) + FIND_PACKAGE(PythonInterp REQUIRED) + #MESSAGE(STATUS "Found PythonLibs...") + FIND_PACKAGE(PythonLinkLibs) + #IF (PYTHON_LINK_LIBS) + # MESSAGE(STATUS "Building Python...") + #ENDIF (PYTHON_LINK_LIBS) +ENDIF (PYTHON_LIBRARY) + +set(PYTHON2_EXECUTABLE "${PYTHON_EXECUTABLE}") +set(PYTHON2_INCLUDE_DIRS "${PYTHON_INCLUDE_DIRS}") +set(PYTHON2_INCLUDE_PATH "${PYTHON_INCLUDE_PATH}") + +# clear FIND_PACKAGE(PythonLibs) side effects +unset(PYTHONLIBS_FOUND) +unset(PYTHON_LIBRARIES) +unset(PYTHON_INCLUDE_PATH) +unset(PYTHON_INCLUDE_DIRS) +unset(PYTHON_DEBUG_LIBRARIES) +unset(PYTHONLIBS_VERSION_STRING) +unset(PYTHON_DEBUG_LIBRARY CACHE) +unset(PYTHON_LIBRARY) +unset(PYTHON_LIBRARY_DEBUG) +unset(PYTHON_LIBRARY_RELEASE) +unset(PYTHON_LIBRARY CACHE) +unset(PYTHON_LIBRARY_DEBUG CACHE) +unset(PYTHON_LIBRARY_RELEASE CACHE) +unset(PYTHON_INCLUDE_DIR CACHE) +unset(PYTHON_INCLUDE_DIR2 CACHE) + +# clear FIND_PACKAGE(PythonInterp) side effects +unset(PYTHONINTERP_FOUND) +unset(PYTHON_EXECUTABLE CACHE) +unset(PYTHON_VERSION_STRING) +unset(PYTHON_VERSION_MAJOR) +unset(PYTHON_VERSION_MINOR) +unset(PYTHON_VERSION_PATCH) -MESSAGE(STATUS "Python executable: ${PYTHON_EXECUTABLE}") -MESSAGE(STATUS "Python lib dir: ${PYTHON_LIB_DIR}") +EXECUTE_PROCESS(COMMAND ${PYTHON2_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)" OUTPUT_VARIABLE PYTHON2_LIB_DIR) +STRING(REPLACE "\n" "" PYTHON2_LIB_DIR "${PYTHON2_LIB_DIR}") + +MESSAGE(STATUS "Python executable: ${PYTHON2_EXECUTABLE}") +MESSAGE(STATUS "Python lib dir: ${PYTHON2_LIB_DIR}") SET( SWIG_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/openwsman_wrap.c" ) @@ -36,14 +77,14 @@ SET(pywsman_SRCS ${SWIG_OUTPUT} ${CMAKE_ ADD_LIBRARY( pywsman SHARED ${pywsman_SRCS} ) SET_TARGET_PROPERTIES( pywsman PROPERTIES PREFIX "_" ) -INCLUDE_DIRECTORIES( ${PYTHON_INCLUDE_DIRS} ) +INCLUDE_DIRECTORIES( ${PYTHON2_INCLUDE_DIRS} ) # RHEL5 needs this: -INCLUDE_DIRECTORIES( ${PYTHON_INCLUDE_PATH} ) +INCLUDE_DIRECTORIES( ${PYTHON2_INCLUDE_PATH} ) INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} ) INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/bindings ${CMAKE_SOURCE_DIR}/include ) TARGET_LINK_LIBRARIES( pywsman wsman ) TARGET_LINK_LIBRARIES( pywsman wsman_client ) -INSTALL(TARGETS pywsman LIBRARY DESTINATION ${PYTHON_LIB_DIR}) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/pywsman.py DESTINATION ${PYTHON_LIB_DIR} ) +INSTALL(TARGETS pywsman LIBRARY DESTINATION ${PYTHON2_LIB_DIR}) +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/pywsman.py DESTINATION ${PYTHON2_LIB_DIR} ) diff -up openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/CMakeLists.txt.orig openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/CMakeLists.txt --- openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/CMakeLists.txt.orig 2016-07-27 16:03:55.000000000 +0200 +++ openwsman-4391e5c68d99c6239e1672d1c8a5a16d7d8c4c2b/CMakeLists.txt 2017-01-16 14:13:37.300407926 +0100 @@ -175,30 +175,6 @@ MESSAGE(STATUS "Building Ruby bindings" ENDIF(NOT RUBY_INCLUDE_PATH ) ENDIF( BUILD_RUBY ) -IF( BUILD_PYTHON ) - MESSAGE(STATUS "Building Python bindings" ) - FIND_PACKAGE(PythonLibs 2.6 REQUIRED) - IF (PYTHON_LIBRARY) - FIND_PACKAGE(PythonInterp 2.6 REQUIRED) - MESSAGE(STATUS "Found PythonLibs...") - FIND_PACKAGE(PythonLinkLibs) - IF (PYTHON_LINK_LIBS) - MESSAGE(STATUS "Building Python...") - ENDIF (PYTHON_LINK_LIBS) - ENDIF (PYTHON_LIBRARY) - IF(NOT PYTHON_INCLUDE_DIRS ) - # fallback for older versions of cmake - SET(PYTHON_INCLUDE_DIRS PYTHON_INCLUDE_PATH) - ENDIF(NOT PYTHON_INCLUDE_DIRS ) - IF(NOT PYTHON_INCLUDE_DIRS ) - IF(BUILD_PYTHON_EXPLICIT) - NO_HEADERS_WARNING_EXPL(BUILD_PYTHON Python) - ELSE(BUILD_PYTHON_EXPLICIT) - NO_HEADERS_WARNING(BUILD_PYTHON Python) - ENDIF(BUILD_PYTHON_EXPLICIT) - ENDIF(NOT PYTHON_INCLUDE_DIRS ) -ENDIF( BUILD_PYTHON ) - IF( BUILD_PERL ) INCLUDE(FindPerl) IF(PERL_EXECUTABLE)