From: Jakub Bogusz Date: Sun, 20 Oct 2019 18:04:28 +0000 (+0200) Subject: - updated to 0.46 X-Git-Tag: auto/th/python-olefile-0.46-1 X-Git-Url: http://git.pld-linux.org/?p=packages%2Fpython-olefile.git;a=commitdiff_plain;h=e517333 - updated to 0.46 --- diff --git a/python-olefile.spec b/python-olefile.spec index 96a8b49..c2a7069 100644 --- a/python-olefile.spec +++ b/python-olefile.spec @@ -1,32 +1,37 @@ # # Conditional build: %bcond_without doc # Sphinx documentation +%bcond_without tests # unit tests %bcond_without python2 # CPython 2.x module %bcond_without python3 # CPython 3.x module Summary: Python 2 module to parse, read and write Microsoft OLE2 files Summary(pl.UTF-8): Moduł Pythona 2 do analizy, odczytu i zapisu plików Microsoft OLE2 Name: python-olefile -Version: 0.44 -Release: 2 +Version: 0.46 +Release: 1 License: BSD Group: Libraries/Python +#Source0Download: https://pypi.org/simple/olefile/ Source0: https://files.pythonhosted.org/packages/source/o/olefile/olefile-%{version}.zip -# Source0-md5: fc625554e4e7f0c2ddcd00baa3c74ff5 -URL: https://pypi.python.org/pypi/olefile +# Source0-md5: af351575e53aa00c36ae1c71ee9b0043 +URL: https://pypi.org/project/olefile BuildRequires: rpm-pythonprov BuildRequires: rpmbuild(macros) >= 1.714 %if %{with python2} -BuildRequires: python-modules >= 1:2.6 +BuildRequires: python-modules >= 1:2.7 BuildRequires: python-setuptools %endif %if %{with python3} -BuildRequires: python3-modules >= 1:3.2 +BuildRequires: python3-modules >= 1:3.4 BuildRequires: python3-setuptools %endif BuildRequires: sed >= 4.0 -%{?with_doc:BuildRequires: sphinx-pdg} -Requires: python-modules >= 1:2.6 +%if %{with doc} +BuildRequires: python3-sphinx_rtd_theme +BuildRequires: sphinx-pdg-3 +%endif +Requires: python-modules >= 1:2.7 BuildArch: noarch BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) @@ -50,7 +55,7 @@ plików Microscopy, pliki kwarantanny antywirusa McAfee itp. Summary: Python 3 module to parse, read and write Microsoft OLE2 files Summary(pl.UTF-8): Moduł Pythona 3 do analizy, odczytu i zapisu plików Microsoft OLE2 Group: Libraries/Python -Requires: python3-modules >= 1:3.2 +Requires: python3-modules >= 1:3.4 %description -n python3-olefile Python 3 package to parse, read and write Microsoft OLE2 files (also @@ -82,22 +87,28 @@ Dokumentacja API modułu Pythona olefile. %prep %setup -q -n olefile-%{version} -# fix #!/usr/bin/env python -> #!/usr/bin/python: -#%{__sed} -i -e '1s,^#!.*python,#!%{__python},' %{name}.py - -%{__sed} -i -e 's/distutils\.core/setuptools/' setup.py - %build %if %{with python2} %py_build + +%if %{with tests} +PYTHONPATH=$(pwd)/build-2/lib \ +%{__python} tests/test_olefile.py +%endif %endif %if %{with python3} %py3_build + +%if %{with tests} +PYTHONPATH=$(pwd)/build-3/lib \ +%{__python3} tests/test_olefile.py +%endif %endif %if %{with doc} -%{__make} -C doc html +%{__make} -C doc html \ + SPHINXBUILD=sphinx-build-3 %endif %install @@ -119,8 +130,7 @@ rm -rf $RPM_BUILD_ROOT %if %{with python2} %files %defattr(644,root,root,755) -%doc README.md olefile/{CONTRIBUTORS.txt,LICENSE.txt} -%{py_sitescriptdir}/OleFileIO_PL.py[co] +%doc CONTRIBUTORS.txt LICENSE.txt README.md %{py_sitescriptdir}/olefile %{py_sitescriptdir}/olefile-%{version}-py*.egg-info %endif @@ -128,9 +138,7 @@ rm -rf $RPM_BUILD_ROOT %if %{with python3} %files -n python3-olefile %defattr(644,root,root,755) -%doc README.md olefile/{CONTRIBUTORS.txt,LICENSE.txt} -%{py3_sitescriptdir}/OleFileIO_PL.py -%{py3_sitescriptdir}/__pycache__/OleFileIO_PL.cpython-*.py[co] +%doc CONTRIBUTORS.txt LICENSE.txt README.md %{py3_sitescriptdir}/olefile %{py3_sitescriptdir}/olefile-%{version}-py*.egg-info %endif