]> git.pld-linux.org Git - packages/python-olefile.git/blob - python-olefile.spec
- updated to 0.46
[packages/python-olefile.git] / python-olefile.spec
1 #
2 # Conditional build:
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
7
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
10 Name:           python-olefile
11 Version:        0.46
12 Release:        1
13 License:        BSD
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
21 %if %{with python2}
22 BuildRequires:  python-modules >= 1:2.7
23 BuildRequires:  python-setuptools
24 %endif
25 %if %{with python3}
26 BuildRequires:  python3-modules >= 1:3.4
27 BuildRequires:  python3-setuptools
28 %endif
29 BuildRequires:  sed >= 4.0
30 %if %{with doc}
31 BuildRequires:  python3-sphinx_rtd_theme
32 BuildRequires:  sphinx-pdg-3
33 %endif
34 Requires:       python-modules >= 1:2.7
35 BuildArch:      noarch
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %description
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.
45
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.
53
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
59
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.
67
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.
75
76 %package apidocs
77 Summary:        API documentation for Python olefile module
78 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona olefile
79 Group:          Documentation
80
81 %description apidocs
82 API documentation for Pythona olefile module.
83
84 %description apidocs -l pl.UTF-8
85 Dokumentacja API modułu Pythona olefile.
86
87 %prep
88 %setup -q -n olefile-%{version}
89
90 %build
91 %if %{with python2}
92 %py_build
93
94 %if %{with tests}
95 PYTHONPATH=$(pwd)/build-2/lib \
96 %{__python} tests/test_olefile.py
97 %endif
98 %endif
99
100 %if %{with python3}
101 %py3_build
102
103 %if %{with tests}
104 PYTHONPATH=$(pwd)/build-3/lib \
105 %{__python3} tests/test_olefile.py
106 %endif
107 %endif
108
109 %if %{with doc}
110 %{__make} -C doc html \
111         SPHINXBUILD=sphinx-build-3
112 %endif
113
114 %install
115 rm -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
128 rm -rf $RPM_BUILD_ROOT
129
130 %if %{with python2}
131 %files
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
136 %endif
137
138 %if %{with python3}
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
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.072279 seconds and 3 git commands to generate.