forked from pool/python-blosc
Accepting request 1066434 from home:bnavigator:branches:devel:languages:python:numeric
- Update to version 1.11.1 * Many small code improvements, improved consistency and typo fixes. Thanks to Dimitri Papadopoulos Orfanos. * Support for Python 3.11. Support for Python 3.7 has been dropped. Thanks to Dimitri Papadopoulos Orfanos. * Several other fixes, mainly related with the building process, which should be more solid now in different situations. - Release 1.10.6 * Add a missed cmake folder to distributed files. See #253. Thanks to Ben Greiner. - Release 1.10.5 * Re-enable the possibility to use an already installed C-Blosc library. See #244. Thanks to Ben Greiner. - Release 1.10.4 * Update blosc.nthreads when blosc.set_nthreads() is called. Fixes #246 - Drop use-system-blosc.patch - PEP517 build OBS-URL: https://build.opensuse.org/request/show/1066434 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-blosc?expand=0&rev=21
This commit is contained in:
parent
a5c001abba
commit
757bd68b0f
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:eeba922f52becd697dc5cfcee8d01a03ba9597a54ce91fdacd9998492acbed9b
|
|
||||||
size 858096
|
|
BIN
blosc-1.11.1.tar.gz
(Stored with Git LFS)
Normal file
BIN
blosc-1.11.1.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -1,3 +1,25 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Feb 17 22:03:24 UTC 2023 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- Update to version 1.11.1
|
||||||
|
* Many small code improvements, improved consistency and typo
|
||||||
|
fixes. Thanks to Dimitri Papadopoulos Orfanos.
|
||||||
|
* Support for Python 3.11. Support for Python 3.7 has been
|
||||||
|
dropped. Thanks to Dimitri Papadopoulos Orfanos.
|
||||||
|
* Several other fixes, mainly related with the building process,
|
||||||
|
which should be more solid now in different situations.
|
||||||
|
- Release 1.10.6
|
||||||
|
* Add a missed cmake folder to distributed files. See #253.
|
||||||
|
Thanks to Ben Greiner.
|
||||||
|
- Release 1.10.5
|
||||||
|
* Re-enable the possibility to use an already installed C-Blosc
|
||||||
|
library. See #244. Thanks to Ben Greiner.
|
||||||
|
- Release 1.10.4
|
||||||
|
* Update blosc.nthreads when blosc.set_nthreads() is called.
|
||||||
|
Fixes #246
|
||||||
|
- Drop use-system-blosc.patch
|
||||||
|
- PEP517 build
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Feb 13 13:40:00 UTC 2021 - Ben Greiner <code@bnavigator.de>
|
Sat Feb 13 13:40:00 UTC 2021 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-blosc
|
# spec file for package python-blosc
|
||||||
#
|
#
|
||||||
# Copyright (c) 2021 SUSE LLC
|
# Copyright (c) 2023 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -16,28 +16,23 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%{?!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
|
Name: python-blosc
|
||||||
Version: 1.10.2
|
Version: 1.11.1
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Blosc data compressor for Python
|
Summary: Blosc data compressor for Python
|
||||||
License: MIT
|
License: MIT
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: https://github.com/Blosc/python-blosc
|
URL: https://github.com/Blosc/python-blosc
|
||||||
Source: https://files.pythonhosted.org/packages/source/b/blosc/blosc-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/b/blosc/blosc-%{version}.tar.gz
|
||||||
# PATCH-FEATURE-UPSTREAM use-system-blosc.patch -- gh#Blosc/python-blosc#244
|
BuildRequires: %{python_module devel >= 3.8}
|
||||||
Patch0: https://github.com/Blosc/python-blosc/pull/244.patch#/use-system-blosc.patch
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module devel >= 3.7}
|
|
||||||
BuildRequires: %{python_module scikit-build >= 0.11.1}
|
BuildRequires: %{python_module scikit-build >= 0.11.1}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: blosc-devel >= 1.9.0
|
BuildRequires: %{python_module wheel}
|
||||||
|
BuildRequires: blosc-devel >= 1.21
|
||||||
BuildRequires: c++_compiler
|
BuildRequires: c++_compiler
|
||||||
BuildRequires: cmake >= 3.14.0
|
BuildRequires: cmake >= 3.14.0
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: ninja
|
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
# SECTION test requirements
|
# SECTION test requirements
|
||||||
BuildRequires: %{python_module numpy >= 1.16}
|
BuildRequires: %{python_module numpy >= 1.16}
|
||||||
@ -52,25 +47,28 @@ Python.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p1 -n blosc-%{version}
|
%autosetup -p1 -n blosc-%{version}
|
||||||
|
rm -r blosc/c-blosc
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export CFLAGS="%{optflags}"
|
export CFLAGS="%{optflags}"
|
||||||
export USE_SYSTEM_BLOSC=1
|
export USE_SYSTEM_BLOSC=1
|
||||||
%python_build
|
%pyproject_wheel
|
||||||
|
|
||||||
%install
|
%install
|
||||||
export USE_SYSTEM_BLOSC=1
|
%pyproject_install
|
||||||
# gh#Blosc/python-blosc#222
|
|
||||||
%python_expand %{$python_install} --install-purelib %{$python_sitearch}
|
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%pyunittest_arch discover -s blosc/ -v
|
%{python_expand #
|
||||||
|
export PYTHONPATH=%{buildroot}%{$python_sitearch}
|
||||||
|
export PYTHONDONTWRITEBYTECODE=1
|
||||||
|
$python -m blosc.test
|
||||||
|
}
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
|
%license LICENSE.txt
|
||||||
%doc ANNOUNCE.rst README.rst RELEASE_NOTES.rst
|
%doc ANNOUNCE.rst README.rst RELEASE_NOTES.rst
|
||||||
%license LICENSES/*.txt
|
%{python_sitearch}/blosc-%{version}.dist-info
|
||||||
%{python_sitearch}/blosc-%{version}*-info
|
|
||||||
%{python_sitearch}/blosc/
|
%{python_sitearch}/blosc/
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
@ -1,146 +0,0 @@
|
|||||||
From ae63a9c222f95c898ca3fc0664254f655c5162eb Mon Sep 17 00:00:00 2001
|
|
||||||
From: Ben Greiner <code@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'],
|
|
Loading…
x
Reference in New Issue
Block a user