3 %bcond_without doc # Sphinx documentation
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
7 Summary: Python 2 module to parse, read and write Microsoft OLE2 files
8 Summary(pl.UTF-8): Moduł Pythona 2 do analizy, odczytu i zapisu plików Microsoft OLE2
13 Group: Libraries/Python
14 Source0: https://files.pythonhosted.org/packages/source/o/olefile/olefile-%{version}.zip
15 # Source0-md5: fc625554e4e7f0c2ddcd00baa3c74ff5
16 URL: https://pypi.python.org/pypi/olefile
17 BuildRequires: rpm-pythonprov
18 BuildRequires: rpmbuild(macros) >= 1.714
20 BuildRequires: python-modules >= 1:2.6
21 BuildRequires: python-setuptools
24 BuildRequires: python3-modules >= 1:3.2
25 BuildRequires: python3-setuptools
27 BuildRequires: sed >= 4.0
28 %{?with_doc:BuildRequires: sphinx-pdg}
29 Requires: python-modules >= 1:2.6
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 Python 2 package to parse, read and write Microsoft OLE2 files (also
35 called Structured Storage, Compound File Binary Format or Compound
36 Document File Format), such as Microsoft Office 97-2003 documents,
37 vbaProject.bin in MS Office 2007+ files, Image Composer and FlashPix
38 files, Outlook messages, StickyNotes, several Microscopy file formats,
39 McAfee antivirus quarantine files, etc.
41 %description -l pl.UTF-8
42 Pakiet Pythona 2 do analizy, odczytu i zapisu plików Microsoft OLE2
43 (znanych też jako Structured Storage, Compound File Binary Format albo
44 Compound Document File Format), takich jak dokumenty Microsoft Office
45 97-2003, vbaProject.bin w plikach MS Office 2007+, pliki Image
46 Composera i FlashPix, wiadomości Outlooka, StickyNotes, różne formaty
47 plików Microscopy, pliki kwarantanny antywirusa McAfee itp.
49 %package -n python3-olefile
50 Summary: Python 3 module to parse, read and write Microsoft OLE2 files
51 Summary(pl.UTF-8): Moduł Pythona 3 do analizy, odczytu i zapisu plików Microsoft OLE2
52 Group: Libraries/Python
53 Requires: python3-modules >= 1:3.2
55 %description -n python3-olefile
56 Python 3 package to parse, read and write Microsoft OLE2 files (also
57 called Structured Storage, Compound File Binary Format or Compound
58 Document File Format), such as Microsoft Office 97-2003 documents,
59 vbaProject.bin in MS Office 2007+ files, Image Composer and FlashPix
60 files, Outlook messages, StickyNotes, several Microscopy file formats,
61 McAfee antivirus quarantine files, etc.
63 %description -n python3-olefile -l pl.UTF-8
64 Pakiet Pythona 3 do analizy, odczytu i zapisu plików Microsoft OLE2
65 (znanych też jako Structured Storage, Compound File Binary Format albo
66 Compound Document File Format), takich jak dokumenty Microsoft Office
67 97-2003, vbaProject.bin w plikach MS Office 2007+, pliki Image
68 Composera i FlashPix, wiadomości Outlooka, StickyNotes, różne formaty
69 plików Microscopy, pliki kwarantanny antywirusa McAfee itp.
72 Summary: API documentation for Python olefile module
73 Summary(pl.UTF-8): Dokumentacja API modułu Pythona olefile
77 API documentation for Pythona olefile module.
79 %description apidocs -l pl.UTF-8
80 Dokumentacja API modułu Pythona olefile.
83 %setup -q -n olefile-%{version}
85 # fix #!/usr/bin/env python -> #!/usr/bin/python:
86 #%{__sed} -i -e '1s,^#!.*python,#!%{__python},' %{name}.py
88 %{__sed} -i -e 's/distutils\.core/setuptools/' setup.py
100 %{__make} -C doc html
104 rm -rf $RPM_BUILD_ROOT
117 rm -rf $RPM_BUILD_ROOT
121 %defattr(644,root,root,755)
122 %doc README.md olefile/{CONTRIBUTORS.txt,LICENSE.txt}
123 %{py_sitescriptdir}/OleFileIO_PL.py[co]
124 %{py_sitescriptdir}/olefile
125 %{py_sitescriptdir}/olefile-%{version}-py*.egg-info
129 %files -n python3-olefile
130 %defattr(644,root,root,755)
131 %doc README.md olefile/{CONTRIBUTORS.txt,LICENSE.txt}
132 %{py3_sitescriptdir}/OleFileIO_PL.py
133 %{py3_sitescriptdir}/__pycache__/OleFileIO_PL.cpython-*.py[co]
134 %{py3_sitescriptdir}/olefile
135 %{py3_sitescriptdir}/olefile-%{version}-py*.egg-info
140 %defattr(644,root,root,755)
141 %doc doc/_build/html/{_images,_static,*.html,*.js}