From 5cf4455ae7c157ff511f1831a7573e9ef78fb7a4 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Wed, 10 Jun 2020 12:23:38 +0200 Subject: dev-python/blosc: Unbundle c-blosc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Górny --- dev-python/blosc/blosc-1.9.1-r1.ebuild | 49 +++++++++++++++++++++++ dev-python/blosc/blosc-1.9.1.ebuild | 45 --------------------- dev-python/blosc/files/blosc-1.9.1-unbundle.patch | 23 +++++++++++ 3 files changed, 72 insertions(+), 45 deletions(-) create mode 100644 dev-python/blosc/blosc-1.9.1-r1.ebuild delete mode 100644 dev-python/blosc/blosc-1.9.1.ebuild create mode 100644 dev-python/blosc/files/blosc-1.9.1-unbundle.patch diff --git a/dev-python/blosc/blosc-1.9.1-r1.ebuild b/dev-python/blosc/blosc-1.9.1-r1.ebuild new file mode 100644 index 000000000000..11fa0fc160a9 --- /dev/null +++ b/dev-python/blosc/blosc-1.9.1-r1.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DISTUTILS_USE_SETUPTOOLS=no +PYTHON_COMPAT=( python3_{6..9} ) + +inherit distutils-r1 + +DESCRIPTION="High performance compressor optimized for binary data" +HOMEPAGE="http://python-blosc.blosc.org" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +SLOT="0" +LICENSE="MIT" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +IUSE="test" +RESTRICT="!test? ( test )" + +RDEPEND=">=dev-libs/c-blosc-1.19.0:=" +DEPEND="${RDEPEND}" +BDEPEND=" + dev-python/scikit-build[${PYTHON_USEDEP}] + test? ( + dev-python/nose[${PYTHON_USEDEP}] + dev-python/numpy[${PYTHON_USEDEP}] + ) +" + +PATCHES=( + "${FILESDIR}"/${P}-unbundle.patch +) + +python_prepare_all() { + export BLOSC_DIR="${EPREFIX}/usr" + distutils-r1_python_prepare_all + DOCS=( ANNOUNCE.rst README.rst RELEASE_NOTES.rst ) +} + +python_test() { + cd "${BUILD_DIR}"/lib || die + PYTHONPATH=. nosetests -v || die +} + +python_install() { + distutils-r1_python_install + python_optimize +} diff --git a/dev-python/blosc/blosc-1.9.1.ebuild b/dev-python/blosc/blosc-1.9.1.ebuild deleted file mode 100644 index 2cda56af6d43..000000000000 --- a/dev-python/blosc/blosc-1.9.1.ebuild +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -DISTUTILS_USE_SETUPTOOLS=no -PYTHON_COMPAT=( python3_{6..9} ) - -inherit distutils-r1 - -DESCRIPTION="High performance compressor optimized for binary data" -HOMEPAGE="http://python-blosc.blosc.org" -SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" - -SLOT="0" -LICENSE="MIT" -KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" -IUSE="test" -RESTRICT="!test? ( test )" - -RDEPEND="dev-libs/c-blosc:=" -DEPEND="${RDEPEND}" -BDEPEND=" - dev-python/scikit-build[${PYTHON_USEDEP}] - test? ( - dev-python/nose[${PYTHON_USEDEP}] - dev-python/numpy[${PYTHON_USEDEP}] - ) -" - -python_prepare_all() { - export BLOSC_DIR="${EPREFIX}/usr" - distutils-r1_python_prepare_all - DOCS=( ANNOUNCE.rst README.rst RELEASE_NOTES.rst ) -} - -python_test() { - cd "${BUILD_DIR}"/lib || die - PYTHONPATH=. nosetests -v || die -} - -python_install() { - distutils-r1_python_install - python_optimize -} diff --git a/dev-python/blosc/files/blosc-1.9.1-unbundle.patch b/dev-python/blosc/files/blosc-1.9.1-unbundle.patch new file mode 100644 index 000000000000..55af5f0c621a --- /dev/null +++ b/dev-python/blosc/files/blosc-1.9.1-unbundle.patch @@ -0,0 +1,23 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2711877..a4c949c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -4,16 +4,9 @@ find_package(PythonExtensions REQUIRED) + + # 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 OFF 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(CMAKE_POSITION_INDEPENDENT_CODE ON) +-add_subdirectory(c-blosc) ++find_package(blosc) + + add_library(blosc_extension MODULE blosc/blosc_extension.c) +-target_link_libraries(blosc_extension blosc_static) ++target_link_libraries(blosc_extension blosc) + python_extension_module(blosc_extension) + install(TARGETS blosc_extension LIBRARY DESTINATION blosc) -- cgit v1.2.3-65-gdbad