]>
Commit | Line | Data |
---|---|---|
56ccd908 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python2 # CPython 2.x module | |
4 | %bcond_without python3 # CPython 3.x module | |
5 | ||
6 | Summary: PEG-based parser interpreter with memoization | |
7 | Summary(pl.UTF-8): Interpreter parserów opartych na PEG z zapamiętywaniem | |
8 | Name: python-speg | |
9 | Version: 0.3 | |
0a5a5434 | 10 | Release: 5 |
56ccd908 JB |
11 | License: MIT |
12 | Group: Libraries/Python | |
13 | #Source0Download: https://pypi.org/simple/speg/ | |
14 | Source0: https://files.pythonhosted.org/packages/source/s/speg/speg-%{version}.zip | |
15 | # Source0-md5: 06c714460913b0cfd73cbbc33fa93eb9 | |
16 | URL: https://pypi.org/project/speg/ | |
17 | %if %{with python2} | |
18 | BuildRequires: python-modules >= 2 | |
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 | BuildRequires: unzip | |
28 | Requires: python-modules >= 2 | |
29 | BuildArch: noarch | |
30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
31 | ||
32 | %description | |
33 | PEG-based parser interpreter with memoization. | |
34 | ||
35 | %description -l pl.UTF-8 | |
36 | Interpreter parserów opartych na PEG z zapamiętywaniem. | |
37 | ||
38 | %package -n python3-speg | |
39 | Summary: PEG-based parser interpreter with memoization | |
40 | Summary(pl.UTF-8): Interpreter parserów opartych na PEG z zapamiętywaniem | |
41 | Group: Libraries/Python | |
42 | Requires: python3-modules >= 1:3.2 | |
43 | ||
44 | %description -n python3-speg | |
45 | PEG-based parser interpreter with memoization. | |
46 | ||
47 | %description -n python3-speg -l pl.UTF-8 | |
48 | Interpreter parserów opartych na PEG z zapamiętywaniem. | |
49 | ||
50 | %prep | |
51 | %setup -q -n speg-%{version} | |
52 | ||
53 | %build | |
54 | %if %{with python2} | |
55 | %py_build | |
56 | %endif | |
57 | ||
58 | %if %{with python3} | |
59 | %py3_build | |
60 | %endif | |
61 | ||
62 | %install | |
63 | rm -rf $RPM_BUILD_ROOT | |
64 | ||
65 | %if %{with python2} | |
66 | %py_install | |
67 | ||
68 | %py_postclean | |
69 | %endif | |
70 | ||
71 | %if %{with python3} | |
72 | %py3_install | |
73 | %endif | |
74 | ||
75 | %clean | |
76 | rm -rf $RPM_BUILD_ROOT | |
77 | ||
78 | %if %{with python2} | |
79 | %files | |
80 | %defattr(644,root,root,755) | |
81 | %{py_sitescriptdir}/speg | |
82 | %{py_sitescriptdir}/speg-%{version}-py*.egg-info | |
83 | %endif | |
84 | ||
85 | %if %{with python3} | |
86 | %files -n python3-speg | |
87 | %defattr(644,root,root,755) | |
88 | %{py3_sitescriptdir}/speg | |
89 | %{py3_sitescriptdir}/speg-%{version}-py*.egg-info | |
90 | %endif |