9c074b3
%global srcname olefile
9c074b3
%global _description \
9c074b3
olefile is a Python package to parse, read and write Microsoft OLE2 files\
9c074b3
(also called Structured Storage, Compound File Binary Format or Compound\
9c074b3
Document File Format), such as Microsoft Office 97-2003 documents,\
9c074b3
vbaProject.bin in MS Office 2007+ files, Image Composer and FlashPix files,\
9c074b3
Outlook messages, StickyNotes, several Microscopy file formats, McAfee\
9c074b3
antivirus quarantine files, etc.
9c074b3
9c074b3
Name:           python-%{srcname}
6880059
Version:        0.46
6880059
Release:        1%{?dist}
9c074b3
Summary:        Python package to parse, read and write Microsoft OLE2 files
9c074b3
9c074b3
License:        BSD
5f79ede
URL:            https://pypi.python.org/pypi/olefile/
5f79ede
Source0:        https://files.pythonhosted.org/packages/source/o/%{srcname}/%{srcname}-%{version}.zip
9c074b3
9c074b3
BuildArch:      noarch
9c074b3
9c074b3
9c074b3
%description %{_description}
9c074b3
9c074b3
9c074b3
%package -n python2-%{srcname}
9c074b3
Summary:        %{summary}
9c074b3
BuildRequires:  python2-devel
b04a126
# There is python-sphinx in RHEL 7, but it's too old
b04a126
%if 0%{?fedora}
5f79ede
BuildRequires:  python2-sphinx
b04a126
%endif
9c074b3
%{?python_provide:%python_provide python2-%{srcname}}
9c074b3
9c074b3
%description -n python2-%{srcname} %{_description}
9c074b3
9c074b3
Python2 version.
9c074b3
9c074b3
b04a126
%package -n python%{python3_pkgversion}-%{srcname}
9c074b3
Summary:        %{summary}
b04a126
BuildRequires:  python%{python3_pkgversion}-devel
b04a126
# There is no python34-sphinx package in EPEL 7
b04a126
%if 0%{?fedora}
b04a126
BuildRequires:  python%{python3_pkgversion}-sphinx
b04a126
%endif
b04a126
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
9c074b3
b04a126
%description -n python%{python3_pkgversion}-%{srcname} %{_description}
9c074b3
9c074b3
Python3 version.
9c074b3
9c074b3
9c074b3
%prep
9c074b3
%autosetup -p1 -n %{srcname}-%{version}
9c074b3
9c074b3
9c074b3
%build
9c074b3
%py2_build
b04a126
%if 0%{?fedora}
5f79ede
make -C doc html BUILDDIR=_build_py2 SPHINXBUILD=sphinx-build-%python2_version
b04a126
%endif
5f79ede
9c074b3
%py3_build
b04a126
%if 0%{?fedora}
5f79ede
make -C doc html BUILDDIR=_build_py3 SPHINXBUILD=sphinx-build-%python3_version
b04a126
%endif
9c074b3
9c074b3
9c074b3
%install
9c074b3
%py2_install
9c074b3
%py3_install
9c074b3
9c074b3
9c074b3
%check
5f79ede
# Tests got left out in the 0.44 source archive
5f79ede
# https://github.com/decalage2/olefile/issues/56
5f79ede
# PYTHONPATH=%%{buildroot}%%{python2_sitelib} %%{__python2} tests/test_olefile.py
5f79ede
# PYTHONPATH=%%{buildroot}%%{python3_sitelib} %%{__python3} tests/test_olefile.py
9c074b3
9c074b3
9c074b3
%files -n python2-%{srcname}
b04a126
%doc README.md
b04a126
%if 0%{?fedora}
b04a126
%doc doc/_build_py2/html
b04a126
%endif
5f79ede
%license doc/License.rst
9c074b3
%{python2_sitelib}/olefile-*.egg-info
9c074b3
%{python2_sitelib}/olefile/
9c074b3
b04a126
%files -n python%{python3_pkgversion}-%{srcname}
b04a126
%doc README.md
b04a126
%if 0%{?fedora}
b04a126
%doc doc/_build_py3/html
b04a126
%endif
5f79ede
%license doc/License.rst
9c074b3
%{python3_sitelib}/olefile-*.egg-info
9c074b3
%{python3_sitelib}/olefile/
9c074b3
9c074b3
9c074b3
%changelog
6880059
* Tue Sep 11 2018 Sandro Mani <manisandro@gmail.com> - 0.46-1
6880059
- Update to 0.46
6880059
5fbc550
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.45.1-3
5fbc550
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
5fbc550
1165b14
* Sat Jun 16 2018 Miro HronĨok <mhroncok@redhat.com> - 0.45.1-2
1165b14
- Rebuilt for Python 3.7
1165b14
5dfd8e7
* Mon Feb 12 2018 Sandro Mani <manisandro@gmail.com> - 0.45.1-1
5dfd8e7
- Update to 0.45.1
5dfd8e7
b476d58
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.44-5
b476d58
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
b476d58
b04a126
* Wed Oct 04 2017 Robert Scheck <robert@fedoraproject.org> - 0.44-4
b04a126
- Added spec file conditionals to build for EPEL 7 (#1498616)
b04a126
85393b4
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.44-3
85393b4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
85393b4
44f1457
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.44-2
44f1457
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
44f1457
5f79ede
* Thu Jan 12 2017 Sandro Mani <manisandro@gmail.com> - 0.44-1
5f79ede
- Update to 0.44
5f79ede
9c074b3
* Mon Jan 02 2017 Sandro Mani <manisandro@gmail.com> - 0.44-0.4.gitbc9d196
9c074b3
- Fix incorrect line endings
9c074b3
- Remove shebang from non-executable scripts
9c074b3
9c074b3
* Mon Jan 02 2017 Sandro Mani <manisandro@gmail.com> - 0.44-0.3.gitbc9d196
9c074b3
- Further reduce duplicate text
9c074b3
- Add python_provides
9c074b3
9c074b3
* Mon Jan 02 2017 Sandro Mani <manisandro@gmail.com> - 0.44-0.2.gitbc9d196
9c074b3
- Use %%py_build and %%py_install macros
9c074b3
- Use %%summary, %%url to reduce duplicate text
9c074b3
- Add %%check
9c074b3
- Move BR to subpackages
9c074b3
9c074b3
* Mon Jan 02 2017 Sandro Mani <manisandro@gmail.com> - 0.44-0.1.gitbc9d196
9c074b3
- Initial package