a6f6807
# The extracted tar has the commit in it
c3c7dc4
%global commit 00041deb731dffdfbbf457b9c05ae680d21a7234
63901c9
%global shortcommit %(c=%{commit}; echo ${c:0:7})
63901c9
8a4d93a
%bcond_without tests
8a4d93a
8a4d93a
%global srcname pymatreader
8a4d93a
8a4d93a
%global desc %{expand: \
8a4d93a
A Python module to read Matlab files. This module works with both the old (<
8a4d93a
7.3) and the new (>= 7.3) HDF5 based format. The output should be the same for
8a4d93a
both kinds of files.
8a4d93a
8a4d93a
Documentation can be found here: http://pymatreader.readthedocs.io/en/latest/}
8a4d93a
8a4d93a
Name:           python-%{srcname}
c3c7dc4
Version:        0.0.24
6a3a481
Release:        5%{?dist}
8a4d93a
Summary:        Convenient reader for Matlab mat files
8a4d93a
8a4d93a
License:        BSD
8a4d93a
URL:            https://pypi.python.org/pypi/%{srcname}
63901c9
Source0:        https://gitlab.com/obob/%{srcname}/-/archive/%{commit}/%{srcname}-%{shortcommit}.tar.gz
d5a43eb
# Remove pytest, fix some tests
d5a43eb
Patch0:         0001-feat-replace-nose-with-pytest.patch
d5a43eb
Patch1:         0002-feat-do-not-use-deprecated-np.complex.patch
d5a43eb
Patch2:         0003-fix-handle-cases-where-either-actual-or-expected-are.patch
8a4d93a
8a4d93a
BuildArch:      noarch
8a4d93a
8a4d93a
%{?python_enable_dependency_generator}
8a4d93a
8a4d93a
%description
8a4d93a
%{desc}
8a4d93a
8a4d93a
%package -n python3-%{srcname}
8a4d93a
Summary:        %{summary}
d5a43eb
BuildRequires:  git-core
d5a43eb
BuildRequires:  make
8a4d93a
BuildRequires:  python3-devel
cff1b7d
BuildRequires:  %{py3_dist future}
cff1b7d
BuildRequires:  %{py3_dist h5py}
cff1b7d
BuildRequires:  %{py3_dist numpy}
d5a43eb
BuildRequires:  %{py3_dist pytest}
cff1b7d
BuildRequires:  %{py3_dist scipy}
8a4d93a
BuildRequires:  %{py3_dist sphinx}
8a4d93a
BuildRequires:  %{py3_dist sphinx_rtd_theme}
cff1b7d
BuildRequires:  %{py3_dist setuptools}
8a4d93a
BuildRequires:  %{py3_dist twine}
8a4d93a
BuildRequires:  %{py3_dist wheel}
cff1b7d
BuildRequires:  %{py3_dist xmltodict}
8a4d93a
8a4d93a
%description -n python3-%{srcname}
8a4d93a
%{desc}
8a4d93a
8a4d93a
%package doc
8a4d93a
Summary:        %{summary}
8a4d93a
8a4d93a
%description doc
8a4d93a
Documentation for %{name}.
8a4d93a
8a4d93a
%prep
d5a43eb
%autosetup -n %{srcname}-%{commit} -S git
8a4d93a
rm -rf %{srcname}.egg-info
8a4d93a
8a4d93a
%build
8a4d93a
%py3_build
8a4d93a
8a4d93a
pushd doc
8a4d93a
    make SPHINXBUILD=sphinx-build-3 html
8a4d93a
    rm -rf build/html/.doctrees
8a4d93a
    rm -rf build/html/.buildinfo
8a4d93a
    # conver to utf8
8a4d93a
    pushd build/html
8a4d93a
        iconv --from=ISO-8859-1 --to=UTF-8 objects.inv > objects.inv.new && \
8a4d93a
        touch -r objects.inv objects.inv.new && \
8a4d93a
        mv objects.inv.new objects.inv
8a4d93a
    popd
8a4d93a
popd
8a4d93a
8a4d93a
%install
8a4d93a
%py3_install
8a4d93a
8a4d93a
%check
8a4d93a
%if %{with tests}
d5a43eb
# Reported upstream: https://gitlab.com/obob/pymatreader/-/issues/9
d5a43eb
%{pytest} -k "not test_files_with_unsupported_classesv7"
8a4d93a
%endif
8a4d93a
8a4d93a
%files -n python3-%{srcname}
8a4d93a
%license LICENSE
8a4d93a
%doc README.md
fbf55ac
%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info
8a4d93a
%{python3_sitelib}/%{srcname}
8a4d93a
8a4d93a
%files doc
8a4d93a
%license LICENSE
8a4d93a
%doc doc/build/html
8a4d93a
8a4d93a
%changelog
6a3a481
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.24-5
6a3a481
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
6a3a481
d5a43eb
* Tue Jul 06 2021 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.0.24-4
d5a43eb
- Fix build
d5a43eb
0b28f59
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.0.24-3
0b28f59
- Rebuilt for Python 3.10
0b28f59
725f482
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.24-2
725f482
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
725f482
c3c7dc4
* Sat Nov 28 2020 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.0.24-1
c3c7dc4
- Update to latest release
c3c7dc4
f8cc274
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.23-3
f8cc274
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
f8cc274
cff1b7d
* Thu Jun 25 2020 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.0.23-2
cff1b7d
- Explicitly BR setuptools
cff1b7d
63901c9
* Sun Jun 21 2020 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.0.23-1
63901c9
- Update to 0.0.23
63901c9
2814d03
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 0.0.21-2
2814d03
- Rebuilt for Python 3.9
2814d03
a6f6807
* Sat Feb 01 2020 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.0.21-1
a6f6807
- Update to latest release
a6f6807
e094057
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.19-5
e094057
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
e094057
0312dd0
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.0.19-4
0312dd0
- Rebuilt for Python 3.8.0rc1 (#1748018)
0312dd0
b3afdd3
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.0.19-3
b3afdd3
- Rebuilt for Python 3.8
b3afdd3
7d0da43
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.19-2
7d0da43
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
7d0da43
f31648a
* Mon Apr 08 2019 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.0.19-1
f31648a
- Update to latest upstream release 0.0.19
f31648a
a6512d7
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.17-2
a6512d7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
a6512d7
8a4d93a
* Tue Nov 20 2018 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 0.0.17-1
8a4d93a
- Initial build