]> git.pld-linux.org Git - packages/python-olefile.git/blob - python-olefile.spec
96a8b494f692b141651ba395918cdc97343e19d2
[packages/python-olefile.git] / python-olefile.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Sphinx documentation
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
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
9 Name:           python-olefile
10 Version:        0.44
11 Release:        2
12 License:        BSD
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
19 %if %{with python2}
20 BuildRequires:  python-modules >= 1:2.6
21 BuildRequires:  python-setuptools
22 %endif
23 %if %{with python3}
24 BuildRequires:  python3-modules >= 1:3.2
25 BuildRequires:  python3-setuptools
26 %endif
27 BuildRequires:  sed >= 4.0
28 %{?with_doc:BuildRequires:      sphinx-pdg}
29 Requires:       python-modules >= 1:2.6
30 BuildArch:      noarch
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
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.
40
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.
48
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
54
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.
62
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.
70
71 %package apidocs
72 Summary:        API documentation for Python olefile module
73 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona olefile
74 Group:          Documentation
75
76 %description apidocs
77 API documentation for Pythona olefile module.
78
79 %description apidocs -l pl.UTF-8
80 Dokumentacja API modułu Pythona olefile.
81
82 %prep
83 %setup -q -n olefile-%{version}
84
85 # fix #!/usr/bin/env python -> #!/usr/bin/python:
86 #%{__sed} -i -e '1s,^#!.*python,#!%{__python},' %{name}.py
87
88 %{__sed} -i -e 's/distutils\.core/setuptools/' setup.py
89
90 %build
91 %if %{with python2}
92 %py_build
93 %endif
94
95 %if %{with python3}
96 %py3_build
97 %endif
98
99 %if %{with doc}
100 %{__make} -C doc html
101 %endif
102
103 %install
104 rm -rf $RPM_BUILD_ROOT
105
106 %if %{with python2}
107 %py_install
108
109 %py_postclean
110 %endif
111
112 %if %{with python3}
113 %py3_install
114 %endif
115
116 %clean
117 rm -rf $RPM_BUILD_ROOT
118
119 %if %{with python2}
120 %files
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
126 %endif
127
128 %if %{with python3}
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
136 %endif
137
138 %if %{with doc}
139 %files apidocs
140 %defattr(644,root,root,755)
141 %doc doc/_build/html/{_images,_static,*.html,*.js}
142 %endif
This page took 0.030488 seconds and 2 git commands to generate.