]>
Commit | Line | Data |
---|---|---|
579a192d JP |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python2 # CPython 2.x module | |
4 | %bcond_without python3 # CPython 3.x module | |
5 | ||
6 | Summary: An intrinsic PEG Parser-Interpreter for Python | |
7 | Name: python-pyPEG2 | |
8 | Version: 2.15.2 | |
d4220ac4 | 9 | Release: 4 |
579a192d JP |
10 | License: GPLv2+ |
11 | Group: Libraries/Python | |
12 | Source0: http://fdik.org/pyPEG2/pyPEG2-%{version}.tar.gz | |
13 | # Source0-md5: 2ff44bc843c61ccd3951ef66a9e4a2b0 | |
14 | URL: http://fdik.org/pyPEG2 | |
15 | %if %{with python2} | |
16 | BuildRequires: python-modules >= 1:2.7 | |
17 | BuildRequires: python-setuptools | |
18 | %endif | |
19 | %if %{with python3} | |
20 | BuildRequires: python3-modules >= 1:3.3 | |
21 | BuildRequires: python3-setuptools | |
22 | %endif | |
23 | BuildRequires: rpm-pythonprov | |
24 | BuildRequires: rpmbuild(macros) >= 1.714 | |
25 | Requires: python-modules >= 1:2.7 | |
26 | BuildArch: noarch | |
27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
28 | ||
29 | %description | |
30 | An intrinsic PEG Parser-Interpreter for Python. | |
31 | ||
32 | %package -n python3-pyPEG2 | |
33 | Summary: Python 3 bindings for an intrinsic PEG Parser-Interpreter for Python | |
34 | Group: Libraries/Python | |
35 | Requires: python3-modules >= 1:3.3 | |
36 | ||
37 | %description -n python3-pyPEG2 | |
38 | An intrinsic PEG Parser-Interpreter for Python. | |
39 | ||
40 | %prep | |
41 | %setup -q -n pyPEG2-%{version} | |
42 | ||
43 | %build | |
44 | %if %{with python2} | |
45 | %py_build | |
46 | %endif | |
47 | ||
48 | %if %{with python3} | |
49 | %py3_build | |
50 | %endif | |
51 | ||
52 | %install | |
53 | rm -rf $RPM_BUILD_ROOT | |
54 | ||
55 | %if %{with python2} | |
56 | %py_install | |
57 | ||
58 | %py_postclean | |
59 | %endif | |
60 | ||
61 | %if %{with python3} | |
62 | %py3_install | |
63 | %endif | |
64 | ||
65 | %clean | |
66 | rm -rf $RPM_BUILD_ROOT | |
67 | ||
68 | %if %{with python2} | |
69 | %files | |
70 | %defattr(644,root,root,755) | |
71 | %doc CHANGES.txt README.txt TODO.txt | |
72 | %{py_sitescriptdir}/pypeg2 | |
73 | %{py_sitescriptdir}/pyPEG2-%{version}-py*.egg-info | |
74 | %endif | |
75 | ||
76 | %if %{with python3} | |
77 | %files -n python3-pyPEG2 | |
78 | %defattr(644,root,root,755) | |
79 | %doc CHANGES.txt README.txt TODO.txt | |
80 | %{py3_sitescriptdir}/pypeg2 | |
81 | %{py3_sitescriptdir}/pyPEG2-%{version}-py*.egg-info | |
82 | %endif |