|
|
@ -1,7 +1,4 @@
|
|
|
|
%global srcname olefile
|
|
|
|
%global srcname olefile
|
|
|
|
%global commit bc9d196b02e9be2d179c5b75c696a8e041232254
|
|
|
|
|
|
|
|
%global shortcommit %(c=%{commit}; echo ${c:0:7})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%global _description \
|
|
|
|
%global _description \
|
|
|
|
olefile is a Python package to parse, read and write Microsoft OLE2 files\
|
|
|
|
olefile is a Python package to parse, read and write Microsoft OLE2 files\
|
|
|
|
(also called Structured Storage, Compound File Binary Format or Compound\
|
|
|
|
(also called Structured Storage, Compound File Binary Format or Compound\
|
|
|
@ -12,20 +9,14 @@ antivirus quarantine files, etc.
|
|
|
|
|
|
|
|
|
|
|
|
Name: python-%{srcname}
|
|
|
|
Name: python-%{srcname}
|
|
|
|
Version: 0.44
|
|
|
|
Version: 0.44
|
|
|
|
Release: 0.4%{?commit:.git%shortcommit}%{?dist}
|
|
|
|
Release: 1%{?dist}
|
|
|
|
Summary: Python package to parse, read and write Microsoft OLE2 files
|
|
|
|
Summary: Python package to parse, read and write Microsoft OLE2 files
|
|
|
|
|
|
|
|
|
|
|
|
License: BSD
|
|
|
|
License: BSD
|
|
|
|
URL: https://github.com/decalage2/olefile/
|
|
|
|
URL: https://pypi.python.org/pypi/olefile/
|
|
|
|
%if %{defined commit}
|
|
|
|
Source0: https://files.pythonhosted.org/packages/source/o/%{srcname}/%{srcname}-%{version}.zip
|
|
|
|
Source0: %{url}/archive/%{commit}/%{srcname}-%{shortcommit}.tar.gz
|
|
|
|
|
|
|
|
%else
|
|
|
|
|
|
|
|
Source0: %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
# Don't install docs (they are installed through %%doc)
|
|
|
|
# Don't install docs (they are installed through %%doc)
|
|
|
|
Patch0: olefile_skip-doc.patch
|
|
|
|
Patch0: olefile_skip-doc.patch
|
|
|
|
# Remove reference to olefile2 (a pre python2.6 compatibility version)
|
|
|
|
|
|
|
|
Patch1: olefile_no-olefile2.patch
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
|
@ -36,6 +27,7 @@ BuildArch: noarch
|
|
|
|
%package -n python2-%{srcname}
|
|
|
|
%package -n python2-%{srcname}
|
|
|
|
Summary: %{summary}
|
|
|
|
Summary: %{summary}
|
|
|
|
BuildRequires: python2-devel
|
|
|
|
BuildRequires: python2-devel
|
|
|
|
|
|
|
|
BuildRequires: python2-sphinx
|
|
|
|
%{?python_provide:%python_provide python2-%{srcname}}
|
|
|
|
%{?python_provide:%python_provide python2-%{srcname}}
|
|
|
|
|
|
|
|
|
|
|
|
%description -n python2-%{srcname} %{_description}
|
|
|
|
%description -n python2-%{srcname} %{_description}
|
|
|
@ -46,6 +38,7 @@ Python2 version.
|
|
|
|
%package -n python3-%{srcname}
|
|
|
|
%package -n python3-%{srcname}
|
|
|
|
Summary: %{summary}
|
|
|
|
Summary: %{summary}
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
|
|
|
|
BuildRequires: python3-sphinx
|
|
|
|
%{?python_provide:%python_provide python3-%{srcname}}
|
|
|
|
%{?python_provide:%python_provide python3-%{srcname}}
|
|
|
|
|
|
|
|
|
|
|
|
%description -n python3-%{srcname} %{_description}
|
|
|
|
%description -n python3-%{srcname} %{_description}
|
|
|
@ -54,26 +47,15 @@ Python3 version.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%prep
|
|
|
|
%if %{defined commit}
|
|
|
|
|
|
|
|
%autosetup -p1 -n %{srcname}-%{commit}
|
|
|
|
|
|
|
|
%else
|
|
|
|
|
|
|
|
%autosetup -p1 -n %{srcname}-%{version}
|
|
|
|
%autosetup -p1 -n %{srcname}-%{version}
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# olefile2 is a pre python2.6 compatibility version
|
|
|
|
|
|
|
|
rm -f olefile/olefile2.*
|
|
|
|
|
|
|
|
# Remove shebang from non-executable scripts
|
|
|
|
|
|
|
|
sed -i -e '1{\@^#!/usr/local/bin/python@d}' OleFileIO_PL.py
|
|
|
|
|
|
|
|
sed -i -e '1{\@^#!/usr/local/bin/python@d}' olefile/__init__.py
|
|
|
|
|
|
|
|
sed -i -e '1{\@^#!/usr/bin/env python@d}' olefile/olefile.py
|
|
|
|
|
|
|
|
# Fix incorrect line endings
|
|
|
|
|
|
|
|
sed -i -e "s/\r//" olefile/doc/*.md
|
|
|
|
|
|
|
|
sed -i -e "s/\r//" OleFileIO_PL.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
%build
|
|
|
|
%py2_build
|
|
|
|
%py2_build
|
|
|
|
|
|
|
|
make -C doc html BUILDDIR=_build_py2 SPHINXBUILD=sphinx-build-%python2_version
|
|
|
|
|
|
|
|
|
|
|
|
%py3_build
|
|
|
|
%py3_build
|
|
|
|
|
|
|
|
make -C doc html BUILDDIR=_build_py3 SPHINXBUILD=sphinx-build-%python3_version
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
%install
|
|
|
@ -82,20 +64,22 @@ sed -i -e "s/\r//" OleFileIO_PL.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
%check
|
|
|
|
PYTHONPATH=%{buildroot}%{python2_sitelib} %{__python2} tests/test_olefile.py
|
|
|
|
# Tests got left out in the 0.44 source archive
|
|
|
|
PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} tests/test_olefile.py
|
|
|
|
# https://github.com/decalage2/olefile/issues/56
|
|
|
|
|
|
|
|
# PYTHONPATH=%%{buildroot}%%{python2_sitelib} %%{__python2} tests/test_olefile.py
|
|
|
|
|
|
|
|
# PYTHONPATH=%%{buildroot}%%{python3_sitelib} %%{__python3} tests/test_olefile.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files -n python2-%{srcname}
|
|
|
|
%files -n python2-%{srcname}
|
|
|
|
%doc README.md olefile/doc/*
|
|
|
|
%doc README.md doc/_build_py2/html
|
|
|
|
%license olefile/doc/License.*
|
|
|
|
%license doc/License.rst
|
|
|
|
%{python2_sitelib}/OleFileIO_PL.py*
|
|
|
|
%{python2_sitelib}/OleFileIO_PL.py*
|
|
|
|
%{python2_sitelib}/olefile-*.egg-info
|
|
|
|
%{python2_sitelib}/olefile-*.egg-info
|
|
|
|
%{python2_sitelib}/olefile/
|
|
|
|
%{python2_sitelib}/olefile/
|
|
|
|
|
|
|
|
|
|
|
|
%files -n python3-%{srcname}
|
|
|
|
%files -n python3-%{srcname}
|
|
|
|
%doc README.md olefile/doc/*
|
|
|
|
%doc README.md doc/_build_py3/html
|
|
|
|
%license olefile/doc/License.*
|
|
|
|
%license doc/License.rst
|
|
|
|
%{python3_sitelib}/OleFileIO_PL.py*
|
|
|
|
%{python3_sitelib}/OleFileIO_PL.py*
|
|
|
|
%{python3_sitelib}/__pycache__/OleFileIO_PL.*
|
|
|
|
%{python3_sitelib}/__pycache__/OleFileIO_PL.*
|
|
|
|
%{python3_sitelib}/olefile-*.egg-info
|
|
|
|
%{python3_sitelib}/olefile-*.egg-info
|
|
|
@ -103,6 +87,9 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} tests/test_olefile.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
%changelog
|
|
|
|
|
|
|
|
* Thu Jan 12 2017 Sandro Mani <manisandro@gmail.com> - 0.44-1
|
|
|
|
|
|
|
|
- Update to 0.44
|
|
|
|
|
|
|
|
|
|
|
|
* Mon Jan 02 2017 Sandro Mani <manisandro@gmail.com> - 0.44-0.4.gitbc9d196
|
|
|
|
* Mon Jan 02 2017 Sandro Mani <manisandro@gmail.com> - 0.44-0.4.gitbc9d196
|
|
|
|
- Fix incorrect line endings
|
|
|
|
- Fix incorrect line endings
|
|
|
|
- Remove shebang from non-executable scripts
|
|
|
|
- Remove shebang from non-executable scripts
|
|
|
|