2020-04-24 23:36:52 +00:00
{ lib
2023-07-15 17:15:38 +00:00
, stdenv
2020-04-24 23:36:52 +00:00
, buildPythonPackage
, fetchPypi
2020-10-16 20:44:37 +00:00
, isPy27
2023-01-20 10:41:00 +00:00
, setuptools
2021-06-04 09:07:49 +00:00
, setuptools-scm
2020-04-24 23:36:52 +00:00
, cython
2022-09-30 11:47:45 +00:00
, entrypoints
2020-04-24 23:36:52 +00:00
, numpy
, msgpack
2023-01-20 10:41:00 +00:00
, py-cpuinfo
2020-08-20 17:08:02 +00:00
, pytestCheckHook
2020-04-24 23:36:52 +00:00
, python
} :
buildPythonPackage rec {
pname = " n u m c o d e c s " ;
2023-01-20 10:41:00 +00:00
version = " 0 . 1 1 . 0 " ;
format = " p y p r o j e c t " ;
2020-10-16 20:44:37 +00:00
disabled = isPy27 ;
2020-04-24 23:36:52 +00:00
src = fetchPypi {
inherit pname version ;
2023-03-15 16:39:30 +00:00
hash = " s h a 2 5 6 - b A W L M h 3 o S h c p K Z s O r k 1 l K y 5 I 6 h y n + d 8 N p l y x N H D m N e s = " ;
2020-04-24 23:36:52 +00:00
} ;
nativeBuildInputs = [
2023-01-20 10:41:00 +00:00
setuptools
2021-06-04 09:07:49 +00:00
setuptools-scm
2020-04-24 23:36:52 +00:00
cython
2023-01-20 10:41:00 +00:00
py-cpuinfo
2020-04-24 23:36:52 +00:00
] ;
propagatedBuildInputs = [
2022-09-30 11:47:45 +00:00
entrypoints
2020-04-24 23:36:52 +00:00
numpy
msgpack
] ;
2023-07-15 17:15:38 +00:00
preBuild = if ( stdenv . hostPlatform . isx86 && ! stdenv . hostPlatform . avx2Support ) then ''
export DISABLE_NUMCODECS_AVX2 =
'' e l s e n u l l ;
2023-02-02 18:25:31 +00:00
nativeCheckInputs = [
2020-08-20 17:08:02 +00:00
pytestCheckHook
2020-04-24 23:36:52 +00:00
] ;
2020-08-20 17:08:02 +00:00
pytestFlagsArray = [
" $ o u t / ${ python . sitePackages } / n u m c o d e c s "
] ;
disabledTests = [
" t e s t _ b a c k w a r d s _ c o m p a t i b i l i t y "
" t e s t _ e n c o d e _ d e c o d e "
" t e s t _ l e g a c y _ c o d e c _ b r o k e n "
" t e s t _ b y t e s "
2023-03-15 16:39:30 +00:00
# ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (3,) + inhomogeneous part.
# with numpy 1.24
" t e s t _ n o n _ n u m p y _ i n p u t s "
2020-08-20 17:08:02 +00:00
] ;
2020-04-24 23:36:52 +00:00
meta = with lib ; {
2021-09-18 10:52:07 +00:00
homepage = " h t t p s : / / g i t h u b . c o m / z a r r - d e v e l o p e r s / n u m c o d e c s " ;
2020-04-24 23:36:52 +00:00
license = licenses . mit ;
description = " B u f f e r c o m p r e s s i o n a n d t r a n s f o r m a t i o n c o d e c s f o r u s e i n d a t a s t o r a g e a n d c o m m u n i c a t i o n a p p l i c a t i o n s " ;
maintainers = [ maintainers . costrouc ] ;
} ;
}