6105a62
#global commit 16191801a53eddae8ca9380a28988c3b5b263c5e
7852500
%{?gitcommit:%global gitcommitshort %(c=%{gitcommit}; echo ${c:0:7})}
a7b5748
15f734c
# Use the same directory of the main package for subpackage licence and docs
15f734c
%global _docdir_fmt %{name}
15f734c
7852500
Summary:        HDF5 support in Python
7852500
Name:           python-tables
9324fa8
Version:        3.9.1
ce4d367
Release:        %autorelease
6105a62
#Source0:        https://github.com/PyTables/PyTables/archive/%{commit}/PyTables-%{commit}.tar.gz
4815066
Source0:        https://github.com/PyTables/PyTables/archive/v%{version}/python-tables-%{version}.tar.gz
a7b5748
487add0
# sometimes it doesn't get updated
487add0
%global manual_version 3.3.0
487add0
3433149
%bcond tests 1
3433149
487add0
Source1:        https://github.com/PyTables/PyTables/releases/download/v%{manual_version}/pytablesmanual-%{manual_version}.pdf
b640635
Patch1:         0001-Skip-tests-that-fail-on-s390x.patch
487add0
c658110
License:        BSD
7d5d5eb
URL:            https://www.pytables.org
Thibault North 0c9716b
6ca2b40
BuildRequires:  hdf5-devel >= 1.8
6ca2b40
BuildRequires:  bzip2-devel
6ca2b40
BuildRequires:  lzo-devel
b5a067d
BuildRequires:  blosc-devel
b5a067d
BuildRequires:  blosc2-devel
7852500
BuildRequires:  python%{python3_pkgversion}-devel
556283a
BuildRequires:  python%{python3_pkgversion}-setuptools
b5a067d
BuildRequires:  python%{python3_pkgversion}-blosc2
Orion Poplawski 871c090
BuildRequires:  python%{python3_pkgversion}-Cython >= 0.13
Orion Poplawski 871c090
BuildRequires:  python%{python3_pkgversion}-numpy
Orion Poplawski 871c090
BuildRequires:  python%{python3_pkgversion}-numexpr >= 2.4
7852500
BuildRequires:  python%{python3_pkgversion}-six
Thibault North 0c9716b
ee27ac0
ExcludeArch:    %{ix86}
ee27ac0
be6e2ea
%global _description %{expand:
c658110
PyTables is a package for managing hierarchical datasets and designed
be6e2ea
to efficiently and easily cope with extremely large amounts of data.}
be6e2ea
be6e2ea
%description %_description
c658110
7852500
%package -n python%{python3_pkgversion}-tables
7852500
Summary:        %{summary}
c658110
Orion Poplawski 871c090
Requires:       python%{python3_pkgversion}-numpy
7852500
Requires:       python%{python3_pkgversion}-six
Orion Poplawski 871c090
Requires:       python%{python3_pkgversion}-numexpr >= 2.4
7852500
%{?python_provide:%python_provide python%{python3_pkgversion}-tables}
718804a
be6e2ea
%description -n python%{python3_pkgversion}-tables %_description
c658110
c658110
%package        doc
c658110
Summary:        Documentation for PyTables
c658110
BuildArch:      noarch
Thibault North 0c9716b
Thibault North 0c9716b
%description doc
08740b8
The %{name}-doc package contains the documentation for %{name}.
Thibault North 0c9716b
c658110
%prep
32853b1
%setup -n PyTables-%{version} -q
32853b1
b640635
# https://github.com/PyTables/PyTables/issues/735
b640635
%ifarch s390x
b5a067d
%patch 1 -p1
b640635
%endif
b640635
7852500
cp -a %{SOURCE1} pytablesmanual.pdf
7852500
08740b8
# Make sure we are not using anything from the bundled blosc by mistake
08740b8
find c-blosc -mindepth 1 -maxdepth 1 -name hdf5 -prune -o -exec rm -r {} +
08740b8
b5a067d
# circumvent the broken attempt to detect library location
b5a067d
sed -r -i \
9324fa8
  '/def get_blosc2_directories\(\):/a \ \ \ \ return Path("%{_includedir}"),Path("%{_libdir}"),None' \
b5a067d
  setup.py
b5a067d
Thibault North 0c9716b
%build
Orion Poplawski 871c090
%py3_build
c658110
Thibault North 0c9716b
%install
Thibault North 0c9716b
chmod -x examples/check_examples.sh
06a3fb7
sed -i 's|bin/env |bin/|' utils/*
Thibault North 0c9716b
Orion Poplawski 871c090
%py3_install
c658110
Orion Poplawski 871c090
%check
3433149
%if %{with tests}
de25f33
%ifarch %{ix86} s390x
de25f33
skip=true
de25f33
%else
de25f33
skip=false
de25f33
%endif
de25f33
0279418
cd /
de25f33
PYTHONPATH=%{buildroot}%{python3_sitearch} %{python3} -m tables.tests.test_all -v || $skip
3433149
%endif
Orion Poplawski 871c090
7852500
%files -n python%{python3_pkgversion}-tables
15f734c
%license LICENSE.txt LICENSES
3fbfdb6
%{_bindir}/ptdump
3fbfdb6
%{_bindir}/ptrepack
3fbfdb6
%{_bindir}/pt2to3
3fbfdb6
%{_bindir}/pttree
b1f5219
%{python3_sitearch}/tables/
b1f5219
%{python3_sitearch}/tables-%{version}*.egg-info/
c658110
Thibault North 0c9716b
%files doc
15f734c
%license LICENSE.txt LICENSES
a7b5748
%doc pytablesmanual.pdf
15f734c
%doc [A-KM-Za-z]*.txt
Thibault North 0c9716b
%doc examples/
Thibault North 0c9716b
Thibault North 0c9716b
%changelog
ce4d367
%autochangelog