]> git.pld-linux.org Git - packages/python-olefile.git/blame - python-olefile.spec
- updated to 0.46
[packages/python-olefile.git] / python-olefile.spec
CommitLineData
241a90b3
JB
1#
2# Conditional build:
3%bcond_without doc # Sphinx documentation
e517333d 4%bcond_without tests # unit tests
241a90b3
JB
5%bcond_without python2 # CPython 2.x module
6%bcond_without python3 # CPython 3.x module
7
8Summary: Python 2 module to parse, read and write Microsoft OLE2 files
9Summary(pl.UTF-8): Moduł Pythona 2 do analizy, odczytu i zapisu plików Microsoft OLE2
10Name: python-olefile
e517333d
JB
11Version: 0.46
12Release: 1
241a90b3
JB
13License: BSD
14Group: Libraries/Python
e517333d 15#Source0Download: https://pypi.org/simple/olefile/
241a90b3 16Source0: https://files.pythonhosted.org/packages/source/o/olefile/olefile-%{version}.zip
e517333d
JB
17# Source0-md5: af351575e53aa00c36ae1c71ee9b0043
18URL: https://pypi.org/project/olefile
241a90b3
JB
19BuildRequires: rpm-pythonprov
20BuildRequires: rpmbuild(macros) >= 1.714
21%if %{with python2}
e517333d 22BuildRequires: python-modules >= 1:2.7
241a90b3
JB
23BuildRequires: python-setuptools
24%endif
25%if %{with python3}
e517333d 26BuildRequires: python3-modules >= 1:3.4
241a90b3
JB
27BuildRequires: python3-setuptools
28%endif
29BuildRequires: sed >= 4.0
e517333d
JB
30%if %{with doc}
31BuildRequires: python3-sphinx_rtd_theme
32BuildRequires: sphinx-pdg-3
33%endif
34Requires: python-modules >= 1:2.7
241a90b3
JB
35BuildArch: noarch
36BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38%description
39Python 2 package to parse, read and write Microsoft OLE2 files (also
40called Structured Storage, Compound File Binary Format or Compound
41Document File Format), such as Microsoft Office 97-2003 documents,
42vbaProject.bin in MS Office 2007+ files, Image Composer and FlashPix
43files, Outlook messages, StickyNotes, several Microscopy file formats,
44McAfee antivirus quarantine files, etc.
45
46%description -l pl.UTF-8
47Pakiet Pythona 2 do analizy, odczytu i zapisu plików Microsoft OLE2
48(znanych też jako Structured Storage, Compound File Binary Format albo
49Compound Document File Format), takich jak dokumenty Microsoft Office
5097-2003, vbaProject.bin w plikach MS Office 2007+, pliki Image
51Composera i FlashPix, wiadomości Outlooka, StickyNotes, różne formaty
52plików Microscopy, pliki kwarantanny antywirusa McAfee itp.
53
54%package -n python3-olefile
55Summary: Python 3 module to parse, read and write Microsoft OLE2 files
56Summary(pl.UTF-8): Moduł Pythona 3 do analizy, odczytu i zapisu plików Microsoft OLE2
57Group: Libraries/Python
e517333d 58Requires: python3-modules >= 1:3.4
241a90b3
JB
59
60%description -n python3-olefile
61Python 3 package to parse, read and write Microsoft OLE2 files (also
62called Structured Storage, Compound File Binary Format or Compound
63Document File Format), such as Microsoft Office 97-2003 documents,
64vbaProject.bin in MS Office 2007+ files, Image Composer and FlashPix
65files, Outlook messages, StickyNotes, several Microscopy file formats,
66McAfee antivirus quarantine files, etc.
67
68%description -n python3-olefile -l pl.UTF-8
69Pakiet Pythona 3 do analizy, odczytu i zapisu plików Microsoft OLE2
70(znanych też jako Structured Storage, Compound File Binary Format albo
71Compound Document File Format), takich jak dokumenty Microsoft Office
7297-2003, vbaProject.bin w plikach MS Office 2007+, pliki Image
73Composera i FlashPix, wiadomości Outlooka, StickyNotes, różne formaty
74plików Microscopy, pliki kwarantanny antywirusa McAfee itp.
75
76%package apidocs
77Summary: API documentation for Python olefile module
78Summary(pl.UTF-8): Dokumentacja API modułu Pythona olefile
79Group: Documentation
80
81%description apidocs
82API documentation for Pythona olefile module.
83
84%description apidocs -l pl.UTF-8
85Dokumentacja API modułu Pythona olefile.
86
87%prep
88%setup -q -n olefile-%{version}
89
241a90b3
JB
90%build
91%if %{with python2}
92%py_build
e517333d
JB
93
94%if %{with tests}
95PYTHONPATH=$(pwd)/build-2/lib \
96%{__python} tests/test_olefile.py
97%endif
241a90b3
JB
98%endif
99
100%if %{with python3}
101%py3_build
e517333d
JB
102
103%if %{with tests}
104PYTHONPATH=$(pwd)/build-3/lib \
105%{__python3} tests/test_olefile.py
106%endif
241a90b3
JB
107%endif
108
109%if %{with doc}
e517333d
JB
110%{__make} -C doc html \
111 SPHINXBUILD=sphinx-build-3
241a90b3
JB
112%endif
113
114%install
115rm -rf $RPM_BUILD_ROOT
116
117%if %{with python2}
118%py_install
119
120%py_postclean
121%endif
122
123%if %{with python3}
124%py3_install
125%endif
126
127%clean
128rm -rf $RPM_BUILD_ROOT
129
130%if %{with python2}
131%files
132%defattr(644,root,root,755)
e517333d 133%doc CONTRIBUTORS.txt LICENSE.txt README.md
241a90b3
JB
134%{py_sitescriptdir}/olefile
135%{py_sitescriptdir}/olefile-%{version}-py*.egg-info
136%endif
137
138%if %{with python3}
139%files -n python3-olefile
140%defattr(644,root,root,755)
e517333d 141%doc CONTRIBUTORS.txt LICENSE.txt README.md
241a90b3
JB
142%{py3_sitescriptdir}/olefile
143%{py3_sitescriptdir}/olefile-%{version}-py*.egg-info
144%endif
145
146%if %{with doc}
147%files apidocs
148%defattr(644,root,root,755)
149%doc doc/_build/html/{_images,_static,*.html,*.js}
150%endif
This page took 0.127241 seconds and 4 git commands to generate.