python3-scikit-image: update to 0.19.0.

This commit is contained in:
Andrew J. Hesford 2021-12-04 09:21:39 -05:00
parent b7eb4ec78a
commit 034bf8ba0e
2 changed files with 67 additions and 6 deletions

View file

@ -0,0 +1,60 @@
Disable optional Pythran support that is hard-required during build.
--- a/setup.py
+++ b/setup.py
@@ -6,7 +6,7 @@
import shutil
import builtins
import textwrap
-from numpy.distutils.command.build_ext import build_ext as npy_build_ext
+from numpy.distutils.command.build_ext import build_ext
import setuptools
from setuptools.command.build_py import build_py
@@ -17,7 +17,13 @@
# can remove this except case once we require setuptools>=59.0
from distutils.errors import CompileError, LinkError
-from pythran.dist import PythranBuildExt as pythran_build_ext
+try:
+ from pythran.dist import PythranBuildExt as pythran_build_ext
+except ImportError:
+ pass
+else:
+ # Replace numpy extension builder with pythran version
+ build_ext = pythran_build_ext[build_ext]
DISTNAME = 'scikit-image'
DESCRIPTION = 'Image processing in Python'
@@ -60,7 +66,7 @@
# Support for openmp
-class ConditionalOpenMP(pythran_build_ext[npy_build_ext]):
+class ConditionalOpenMP(build_ext):
def can_compile_link(self, compile_flags, link_flags):
--- a/skimage/feature/setup.py
+++ b/skimage/feature/setup.py
@@ -2,7 +2,7 @@
import os
from skimage._build import cython
-import pythran, logging
+import logging
base_path = os.path.abspath(os.path.dirname(__file__))
@@ -43,6 +43,11 @@
config.add_extension('_sift', sources=['_sift.c'],
include_dirs=[get_numpy_include_dirs(), '../_shared'])
+ try:
+ import pythran
+ except ImportError:
+ return config
+
# pythran submodules
pythran.config.logger.setLevel(logging.INFO)
ext = pythran.dist.PythranExtension(

View file

@ -1,21 +1,22 @@
# Template file for 'python3-scikit-image'
pkgname=python3-scikit-image
version=0.18.3
revision=2
version=0.19.0
revision=1
_pkgname="${pkgname#python3-}"
wrksrc="${_pkgname}-${version}"
build_style=python3-module
build_helper="numpy"
hostmakedepends="python3-setuptools python3-Cython"
hostmakedepends="python3-Cython python3-wheel python3-numpy
python3-packaging python3-setuptools"
makedepends="python3-devel"
depends="python3-scipy python3-matplotlib python3-networkx
python3-imageio python3-tifffile python3-pywt"
depends="python3-scipy python3-numpy python3-imageio python3-matplotlib
python3-networkx python3-tifffile python3-pywt python3-packaging"
short_desc="Image processing in Python"
maintainer="Andrew J. Hesford <ajh@sideband.org>"
license="BSD-3-Clause, MIT"
homepage="https://scikit-image.org/"
distfiles="https://github.com/${_pkgname}/${_pkgname}/archive/v${version}.tar.gz"
checksum=a8d1c7473fc9399447a4cd5718c90338fffd543622d9e6f3d9feca43f1a9cb15
checksum=5a0d6ad80ed3a389c19a8603391bbc1dd8e81239c2ef5ca6c274886db3087ec5
# Tests require data files and unpackaged dependencies
make_check=no