Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-blosc for openSUSE:Factory checked in at 2021-02-16 22:33:58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-blosc (Old) and /work/SRC/openSUSE:Factory/.python-blosc.new.28504 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-blosc" Tue Feb 16 22:33:58 2021 rev:19 rq:872001 version:1.10.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-blosc/python-blosc.changes 2020-12-23 14:19:48.689641228 +0100 +++ /work/SRC/openSUSE:Factory/.python-blosc.new.28504/python-blosc.changes 2021-02-16 22:34:04.653463199 +0100 @@ -1,0 +2,13 @@ +Sat Feb 13 13:40:00 UTC 2021 - Ben Greiner <c...@bnavigator.de> + +- Update to version 1.10.2 + * (Upstream bumped the version to release their wheels) + * Officially drop support for Python < 3.7. Although we did not + any explicit action that is incompatible with older Python + versions, we only provide wheels for Python >= 3.7 (til 3.9). +- Skip python36 build on TW, because upstream dropped support and + numpy follows NEP 29 +- Use the system provided Blosc library + * use-system-blosc.patch gh#Blosc/python-blosc#244 + +------------------------------------------------------------------- Old: ---- blosc-1.9.2.tar.gz New: ---- blosc-1.10.2.tar.gz use-system-blosc.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-blosc.spec ++++++ --- /var/tmp/diff_new_pack.etQLIn/_old 2021-02-16 22:34:05.217463972 +0100 +++ /var/tmp/diff_new_pack.etQLIn/_new 2021-02-16 22:34:05.221463977 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-blosc # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,28 +18,31 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 +# Upstream dropped official support for Python < 3.7 and python36-numpy is being phased out of TW +%define skip_python36 1 Name: python-blosc -Version: 1.9.2 +Version: 1.10.2 Release: 0 Summary: Blosc data compressor for Python License: MIT Group: Development/Languages/Python URL: https://github.com/Blosc/python-blosc Source: https://files.pythonhosted.org/packages/source/b/blosc/blosc-%{version}.tar.gz -BuildRequires: %{python_module devel} -BuildRequires: %{python_module scikit-build} +# PATCH-FEATURE-UPSTREAM use-system-blosc.patch -- gh#Blosc/python-blosc#244 +Patch0: https://github.com/Blosc/python-blosc/pull/244.patch#/use-system-blosc.patch +BuildRequires: %{python_module devel >= 3.7} +BuildRequires: %{python_module scikit-build >= 0.11.1} BuildRequires: %{python_module setuptools} BuildRequires: blosc-devel >= 1.9.0 BuildRequires: c++_compiler -BuildRequires: cmake +BuildRequires: cmake >= 3.14.0 BuildRequires: fdupes BuildRequires: ninja BuildRequires: python-rpm-macros # SECTION test requirements -BuildRequires: %{python_module numpy} +BuildRequires: %{python_module numpy >= 1.16} BuildRequires: %{python_module psutil} # /SECTION -Requires: blosc-devel Recommends: python-numpy %python_subpackages @@ -48,31 +51,26 @@ Python. %prep -%setup -q -n blosc-%{version} +%autosetup -p1 -n blosc-%{version} %build export CFLAGS="%{optflags}" -export BLOSC_DIR=%{_prefix} -export DISABLE_BLOSC_AVX2=1 -%python_exec setup.py build_clib -%python_exec setup.py build_ext --inplace +export USE_SYSTEM_BLOSC=1 %python_build %install -export BLOSC_DIR=%{_prefix} -# This is being installed in purelib instead of platlib -# See: https://github.com/Blosc/python-blosc/issues/222 -%python_exec setup.py install -O1 --skip-build --force --root %{buildroot} --install-purelib=%{$python_sitearch} +export USE_SYSTEM_BLOSC=1 +# gh#Blosc/python-blosc#222 +%python_expand %{$python_install} --install-purelib %{$python_sitearch} %python_expand %fdupes %{buildroot}%{$python_sitearch} %check -export PYTHONDONTWRITEBYTECODE=1 -%python_exec -m unittest discover -s blosc/ -v +%pyunittest_arch discover -s blosc/ -v %files %{python_files} %doc ANNOUNCE.rst README.rst RELEASE_NOTES.rst %license LICENSES/*.txt -%{python_sitearch}/blosc-%{version}-py*.egg-info +%{python_sitearch}/blosc-%{version}*-info %{python_sitearch}/blosc/ %changelog ++++++ blosc-1.9.2.tar.gz -> blosc-1.10.2.tar.gz ++++++ ++++ 195143 lines of diff (skipped) ++++++ use-system-blosc.patch ++++++ >From ae63a9c222f95c898ca3fc0664254f655c5162eb Mon Sep 17 00:00:00 2001 From: Ben Greiner <c...@bnavigator.de> Date: Sat, 13 Feb 2021 18:58:31 +0100 Subject: [PATCH] Reenable possibility to use an already installed C-Blosc library --- README.rst | 14 ++++++-------- blosc/CMakeLists.txt | 33 +++++++++++++++++++-------------- cmake/FindBlosc.cmake | 12 ++++++++++++ setup.py | 23 +++++++++++++---------- 4 files changed, 50 insertions(+), 32 deletions(-) create mode 100644 cmake/FindBlosc.cmake diff --git a/README.rst b/README.rst index 3329a21..c0385e1 100644 --- a/README.rst +++ b/README.rst @@ -79,7 +79,7 @@ Installing via setuptools .. code-block:: console $ python -m pip install -r requirements-dev.txt - $ python setup.py build_ext --inplace + $ python setup.py build --inplace Any codec can be enabled (`=1`) or disabled (`=0`) on this build-path with the appropriate OS environment variables `INCLUDE_LZ4`, `INCLUDE_SNAPPY`, `INCLUDE_ZLIB`, and @@ -115,17 +115,15 @@ Using an environment variable: .. code-block:: console - $ BLOSC_DIR=/usr/local (or "set BLOSC_DIR=\blosc" on Win) - $ export BLOSC_DIR (not needed on Win) - $ python setup.py build_clib - $ python setup.py build_ext --inplace + $ export USE_SYSTEM_BLOSC=1 # or "set USE_SYSTEM_BLOSC=1" on Windows + $ export Blosc_ROOT=/usr/local/customprefix # If you installed Blosc into a custom location + $ python setup.py build --inplace -Using a flag: +Using flags: .. code-block:: console - $ python setup.py build_clib - $ python setup.py build_ext --inplace --blosc=/usr/local + $ python setup.py build --inplace -DUSE_SYSTEM_BLOSC:BOOL=YES -DBlosc_ROOT:PATH=/usr/local/customprefix Testing diff --git a/blosc/CMakeLists.txt b/blosc/CMakeLists.txt index 7f06f28..f9a5214 100644 --- a/blosc/CMakeLists.txt +++ b/blosc/CMakeLists.txt @@ -1,19 +1,24 @@ -# Todo: c-blosc provides a CMake package configuration file that we can build -# against if blosc is available on the system, etc. -# find_package(blosc) -# if(NOT blosc_FOUND) -set(BUILD_STATIC ON CACHE BOOL "Build a static version of the blosc library.") -set(BUILD_SHARED ON CACHE BOOL "Build a shared library version of the blosc library.") -set(BUILD_TESTS OFF CACHE BOOL "Build test programs form the blosc compression library") -set(BUILD_BENCHMARKS OFF CACHE BOOL "Build benchmark programs form the blosc compression library") -set(BLOSC_IS_SUBPROJECT OFF CACHE BOOL "Blosc is subproject") -set(CMAKE_POSITION_INDEPENDENT_CODE ON) -add_subdirectory(c-blosc) -include_directories("${CMAKE_CURRENT_SOURCE_DIR}/c-blosc/blosc") +add_library(blosc_extension MODULE blosc_extension.c) + +if(USE_SYSTEM_BLOSC) + set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake") + find_package(Blosc REQUIRED) + target_include_directories(blosc_extension PRIVATE ${Blosc_INCLUDE_DIRS}) + target_link_libraries(blosc_extension ${Blosc_LIBRARIES}) +else() + set(BUILD_STATIC ON CACHE BOOL "Build a static version of the blosc library.") + set(BUILD_SHARED ON CACHE BOOL "Build a shared library version of the blosc library.") + set(BUILD_TESTS OFF CACHE BOOL "Build test programs form the blosc compression library") + set(BUILD_BENCHMARKS OFF CACHE BOOL "Build benchmark programs form the blosc compression library") + set(BLOSC_IS_SUBPROJECT OFF CACHE BOOL "Blosc is subproject") + set(CMAKE_POSITION_INDEPENDENT_CODE ON) + add_subdirectory(c-blosc) + include_directories("${CMAKE_CURRENT_SOURCE_DIR}/c-blosc/blosc") + target_link_libraries(blosc_extension blosc_static) +endif() + -add_library(blosc_extension MODULE blosc_extension.c) -target_link_libraries(blosc_extension blosc_static) python_extension_module(blosc_extension) add_custom_command( diff --git a/cmake/FindBlosc.cmake b/cmake/FindBlosc.cmake new file mode 100644 index 0000000..02a039f --- /dev/null +++ b/cmake/FindBlosc.cmake @@ -0,0 +1,12 @@ +find_path(Blosc_INCLUDE_DIR blosc.h) + +find_library(Blosc_LIBRARY NAMES blosc) + +if (Blosc_INCLUDE_DIR AND Blosc_LIBRARY) + set(Blosc_FOUND TRUE) + set(Blosc_INCLUDE_DIRS ${Blosc_INCLUDE_DIR}) + set(Blosc_LIBRARIES ${Blosc_LIBRARY}) + message(STATUS "Found Blosc library: ${Blosc_LIBRARIES}") +else () + message(STATUS "No Blosc library found. Using internal sources.") +endif () \ No newline at end of file diff --git a/setup.py b/setup.py index 2fd6619..37b5827 100644 --- a/setup.py +++ b/setup.py @@ -85,16 +85,19 @@ def cmake_bool(cond): url = 'http://github.com/blosc/python-blosc', license = 'https://opensource.org/licenses/BSD-3-Clause', platforms = ['any'], - cmake_args = [ - '-DBLOSC_DIR:PATH=%s' % os.environ.get('BLOSC_DIR', ''), - '-DDEACTIVATE_SSE2:BOOL=%s' % cmake_bool(('DISABLE_BLOSC_SSE2' in os.environ) or (cpu_info is None) or ('sse2' not in cpu_info['flags'])), - '-DDEACTIVATE_AVX2:BOOL=%s' % cmake_bool(('DISABLE_BLOSC_AVX2' in os.environ) or (cpu_info is None) or ('avx2' not in cpu_info['flags'])), - '-DDEACTIVATE_LZ4:BOOL=%s' % cmake_bool(not int(os.environ.get('INCLUDE_LZ4', '1'))), - # Snappy is disabled by default - '-DDEACTIVATE_SNAPPY:BOOL=%s' % cmake_bool(not int(os.environ.get('INCLUDE_SNAPPY', '0'))), - '-DDEACTIVATE_ZLIB:BOOL=%s' % cmake_bool(not int(os.environ.get('INCLUDE_ZLIB', '1'))), - '-DDEACTIVATE_ZSTD:BOOL=%s' % cmake_bool(not int(os.environ.get('INCLUDE_ZSTD', '1'))), - ], + cmake_args = ( + ['-DUSE_SYSTEM_BLOSC:BOOL=ON'] if int(os.environ.get('USE_SYSTEM_BLOSC', '0')) + else + ['-DUSE_SYSTEM_BLOSC:BOOL=OFF', + '-DDEACTIVATE_SSE2:BOOL=%s' % cmake_bool(('DISABLE_BLOSC_SSE2' in os.environ) or (cpu_info is None) or ('sse2' not in cpu_info['flags'])), + '-DDEACTIVATE_AVX2:BOOL=%s' % cmake_bool(('DISABLE_BLOSC_AVX2' in os.environ) or (cpu_info is None) or ('avx2' not in cpu_info['flags'])), + '-DDEACTIVATE_LZ4:BOOL=%s' % cmake_bool(not int(os.environ.get('INCLUDE_LZ4', '1'))), + # Snappy is disabled by default + '-DDEACTIVATE_SNAPPY:BOOL=%s' % cmake_bool(not int(os.environ.get('INCLUDE_SNAPPY', '0'))), + '-DDEACTIVATE_ZLIB:BOOL=%s' % cmake_bool(not int(os.environ.get('INCLUDE_ZLIB', '1'))), + '-DDEACTIVATE_ZSTD:BOOL=%s' % cmake_bool(not int(os.environ.get('INCLUDE_ZSTD', '1'))), + ] + ), setup_requires=['scikit-build'], tests_require=['numpy', 'psutil'], packages = ['blosc'],