]>
Commit | Line | Data |
---|---|---|
fc4a5ee6 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python2 # CPython 2.x module | |
4 | %bcond_without python3 # CPython 3.x module | |
5 | ||
6 | Summary: Python PE parsing module | |
7 | Summary(pl.UTF-8): Moduł Pythona do analizy PE | |
8 | Name: python-pefile | |
9 | Version: 2019.4.18 | |
10 | Release: 1 | |
11 | License: MIT | |
12 | Group: Libraries/Python | |
13 | #Source0Download: https://pypi.org/simple/pefile/ | |
14 | Source0: https://files.pythonhosted.org/packages/source/p/pefile/pefile-%{version}.tar.gz | |
15 | # Source0-md5: e328272bc82ddc3170316250e37027ad | |
16 | URL: https://pypi.org/project/pefile/ | |
17 | %if %{with python2} | |
18 | BuildRequires: python-modules >= 1:2.5 | |
19 | BuildRequires: python-setuptools | |
20 | %endif | |
21 | %if %{with python3} | |
22 | BuildRequires: python3-modules >= 1:3.2 | |
23 | BuildRequires: python3-setuptools | |
24 | %endif | |
25 | BuildRequires: rpm-pythonprov | |
26 | BuildRequires: rpmbuild(macros) >= 1.714 | |
27 | Requires: python-modules >= 1:2.5 | |
28 | BuildArch: noarch | |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
30 | ||
31 | %description | |
32 | pefile is a multi-platform Python module to parse and work with | |
33 | Portable Executable (aka PE) files. Most of the information contained | |
34 | in the PE headers is accessible as well as all sections' details and | |
35 | their data. | |
36 | ||
37 | %description -l pl.UTF-8 | |
38 | pefile to wieloplatformowy moduł Pythona do analizy i pracy z plikami | |
39 | Portable Executable (PE). Umożliwia dostęp do większości informacji | |
40 | zawartych w nagłówkach PE, a także szczegółów oraz danych wszystkich | |
41 | sekcji. | |
42 | ||
43 | %package -n python3-pefile | |
44 | Summary: Python PE parsing module | |
45 | Summary(pl.UTF-8): Moduł Pythona do analizy PE | |
46 | Group: Libraries/Python | |
47 | Requires: python3-modules >= 1:3.2 | |
48 | ||
49 | %description -n python3-pefile | |
50 | pefile is a multi-platform Python module to parse and work with | |
51 | Portable Executable (aka PE) files. Most of the information contained | |
52 | in the PE headers is accessible as well as all sections' details and | |
53 | their data. | |
54 | ||
55 | %description -n python3-pefile -l pl.UTF-8 | |
56 | pefile to wieloplatformowy moduł Pythona do analizy i pracy z plikami | |
57 | Portable Executable (PE). Umożliwia dostęp do większości informacji | |
58 | zawartych w nagłówkach PE, a także szczegółów oraz danych wszystkich | |
59 | sekcji. | |
60 | ||
61 | %prep | |
62 | %setup -q -n pefile-%{version} | |
63 | ||
64 | %build | |
65 | %if %{with python2} | |
66 | %py_build | |
67 | %endif | |
68 | ||
69 | %if %{with python3} | |
70 | %py3_build | |
71 | %endif | |
72 | ||
73 | %install | |
74 | rm -rf $RPM_BUILD_ROOT | |
75 | ||
76 | %if %{with python2} | |
77 | %py_install | |
78 | ||
79 | %py_postclean | |
80 | %endif | |
81 | ||
82 | %if %{with python3} | |
83 | %py3_install | |
84 | %endif | |
85 | ||
86 | %clean | |
87 | rm -rf $RPM_BUILD_ROOT | |
88 | ||
89 | %if %{with python2} | |
90 | %files | |
91 | %defattr(644,root,root,755) | |
92 | %doc LICENSE README | |
93 | %{py_sitescriptdir}/ordlookup | |
94 | %{py_sitescriptdir}/pefile.py[co] | |
95 | %{py_sitescriptdir}/peutils.py[co] | |
96 | %{py_sitescriptdir}/pefile-%{version}-py*.egg-info | |
97 | %endif | |
98 | ||
99 | %if %{with python3} | |
100 | %files -n python3-pefile | |
101 | %defattr(644,root,root,755) | |
102 | %doc LICENSE README | |
103 | %{py3_sitescriptdir}/ordlookup | |
104 | %{py3_sitescriptdir}/pefile.py | |
105 | %{py3_sitescriptdir}/peutils.py | |
106 | %{py3_sitescriptdir}/__pycache__/pefile.cpython-*.py[co] | |
107 | %{py3_sitescriptdir}/__pycache__/peutils.cpython-*.py[co] | |
108 | %{py3_sitescriptdir}/pefile-%{version}-py*.egg-info | |
109 | %endif |