3 %bcond_without doc # Sphinx documentation
4 %bcond_without tests # unit tests
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
8 Summary: Python 2 module to parse, read and write Microsoft OLE2 files
9 Summary(pl.UTF-8): Moduł Pythona 2 do analizy, odczytu i zapisu plików Microsoft OLE2
14 Group: Libraries/Python
15 #Source0Download: https://pypi.org/simple/olefile/
16 Source0: https://files.pythonhosted.org/packages/source/o/olefile/olefile-%{version}.zip
17 # Source0-md5: af351575e53aa00c36ae1c71ee9b0043
18 URL: https://pypi.org/project/olefile
19 BuildRequires: rpm-pythonprov
20 BuildRequires: rpmbuild(macros) >= 1.714
22 BuildRequires: python-modules >= 1:2.7
23 BuildRequires: python-setuptools
26 BuildRequires: python3-modules >= 1:3.4
27 BuildRequires: python3-setuptools
29 BuildRequires: sed >= 4.0
31 BuildRequires: python3-sphinx_rtd_theme
32 BuildRequires: sphinx-pdg-3
34 Requires: python-modules >= 1:2.7
36 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39 Python 2 package to parse, read and write Microsoft OLE2 files (also
40 called Structured Storage, Compound File Binary Format or Compound
41 Document File Format), such as Microsoft Office 97-2003 documents,
42 vbaProject.bin in MS Office 2007+ files, Image Composer and FlashPix
43 files, Outlook messages, StickyNotes, several Microscopy file formats,
44 McAfee antivirus quarantine files, etc.
46 %description -l pl.UTF-8
47 Pakiet Pythona 2 do analizy, odczytu i zapisu plików Microsoft OLE2
48 (znanych też jako Structured Storage, Compound File Binary Format albo
49 Compound Document File Format), takich jak dokumenty Microsoft Office
50 97-2003, vbaProject.bin w plikach MS Office 2007+, pliki Image
51 Composera i FlashPix, wiadomości Outlooka, StickyNotes, różne formaty
52 plików Microscopy, pliki kwarantanny antywirusa McAfee itp.
54 %package -n python3-olefile
55 Summary: Python 3 module to parse, read and write Microsoft OLE2 files
56 Summary(pl.UTF-8): Moduł Pythona 3 do analizy, odczytu i zapisu plików Microsoft OLE2
57 Group: Libraries/Python
58 Requires: python3-modules >= 1:3.4
60 %description -n python3-olefile
61 Python 3 package to parse, read and write Microsoft OLE2 files (also
62 called Structured Storage, Compound File Binary Format or Compound
63 Document File Format), such as Microsoft Office 97-2003 documents,
64 vbaProject.bin in MS Office 2007+ files, Image Composer and FlashPix
65 files, Outlook messages, StickyNotes, several Microscopy file formats,
66 McAfee antivirus quarantine files, etc.
68 %description -n python3-olefile -l pl.UTF-8
69 Pakiet Pythona 3 do analizy, odczytu i zapisu plików Microsoft OLE2
70 (znanych też jako Structured Storage, Compound File Binary Format albo
71 Compound Document File Format), takich jak dokumenty Microsoft Office
72 97-2003, vbaProject.bin w plikach MS Office 2007+, pliki Image
73 Composera i FlashPix, wiadomości Outlooka, StickyNotes, różne formaty
74 plików Microscopy, pliki kwarantanny antywirusa McAfee itp.
77 Summary: API documentation for Python olefile module
78 Summary(pl.UTF-8): Dokumentacja API modułu Pythona olefile
82 API documentation for Pythona olefile module.
84 %description apidocs -l pl.UTF-8
85 Dokumentacja API modułu Pythona olefile.
88 %setup -q -n olefile-%{version}
95 PYTHONPATH=$(pwd)/build-2/lib \
96 %{__python} tests/test_olefile.py
104 PYTHONPATH=$(pwd)/build-3/lib \
105 %{__python3} tests/test_olefile.py
110 %{__make} -C doc html \
111 SPHINXBUILD=sphinx-build-3
115 rm -rf $RPM_BUILD_ROOT
128 rm -rf $RPM_BUILD_ROOT
132 %defattr(644,root,root,755)
133 %doc CONTRIBUTORS.txt LICENSE.txt README.md
134 %{py_sitescriptdir}/olefile
135 %{py_sitescriptdir}/olefile-%{version}-py*.egg-info
139 %files -n python3-olefile
140 %defattr(644,root,root,755)
141 %doc CONTRIBUTORS.txt LICENSE.txt README.md
142 %{py3_sitescriptdir}/olefile
143 %{py3_sitescriptdir}/olefile-%{version}-py*.egg-info
148 %defattr(644,root,root,755)
149 %doc doc/_build/html/{_images,_static,*.html,*.js}