]>
Commit | Line | Data |
---|---|---|
b3f0697a JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # unit tests | |
4 | %bcond_without python2 # CPython 2.x module | |
5 | %bcond_without python3 # CPython 3.x module | |
6 | ||
7 | Summary: Specifications for callback functions passed in to an API | |
8 | Summary(pl.UTF-8): Specyfikacje funkcji wywołań zwrotnych przekazywane do API | |
9 | Name: python-backcall | |
10 | Version: 0.1.0 | |
3fe24de2 | 11 | Release: 5 |
b3f0697a JB |
12 | License: BSD |
13 | Group: Libraries/Python | |
14 | #Source0Download: https://pypi.org/simple/backcall/ | |
15 | Source0: https://files.pythonhosted.org/packages/source/b/backcall/backcall-%{version}.tar.gz | |
16 | # Source0-md5: 87ce0c7839808e6a3427d57df6a792e7 | |
17 | URL: https://pypi.org/project/backcall/ | |
18 | %if %{with python2} | |
19 | BuildRequires: python-modules >= 1:2.7 | |
20 | %if %{with tests} | |
21 | BuildRequires: python-pytest | |
22 | %endif | |
23 | %endif | |
24 | %if %{with python3} | |
25 | BuildRequires: python3-modules >= 1:3.3 | |
26 | %if %{with tests} | |
27 | BuildRequires: python3-pytest | |
28 | %endif | |
29 | %endif | |
30 | BuildRequires: rpm-pythonprov | |
31 | BuildRequires: rpmbuild(macros) >= 1.714 | |
32 | Requires: python-modules >= 1:2.7 | |
33 | BuildArch: noarch | |
34 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
35 | ||
36 | %description | |
37 | If your code lets other people supply callback functions, it's | |
38 | important to specify the function signature you expect, and check that | |
39 | functions support that. Adding extra parameters later would break | |
40 | other peoples code unless you're careful. | |
41 | ||
42 | backcall provides a way of specifying the callback signature using a | |
43 | prototype function. | |
44 | ||
45 | %description -l pl.UTF-8 | |
46 | Jeśli kod wymaga od innych przekazywania funkcji wywołań zwrotnych | |
47 | (callbacków), ważne jest określenie oczekiwanej sygnatury funkcji i | |
48 | sprawdzenie, że funkcje je obsługują. Dodanie później dodatkowych | |
49 | parametrów może zepsuć istniejący kod innych osób. | |
50 | ||
51 | backcall zapewnia sposób określania sygnatury wywołań zwrotnych przy | |
52 | użyciu funkcji prototypowej. | |
53 | ||
54 | %package -n python3-backcall | |
55 | Summary: Specifications for callback functions passed in to an API | |
56 | Summary(pl.UTF-8): Specyfikacje funkcji wywołań zwrotnych przekazywane do API | |
57 | Group: Libraries/Python | |
58 | Requires: python3-modules >= 1:3.3 | |
59 | ||
60 | %description -n python3-backcall | |
61 | If your code lets other people supply callback functions, it's | |
62 | important to specify the function signature you expect, and check that | |
63 | functions support that. Adding extra parameters later would break | |
64 | other peoples code unless you're careful. | |
65 | ||
66 | backcall provides a way of specifying the callback signature using a | |
67 | prototype function. | |
68 | ||
69 | %description -n python3-backcall -l pl.UTF-8 | |
70 | Jeśli kod wymaga od innych przekazywania funkcji wywołań zwrotnych | |
71 | (callbacków), ważne jest określenie oczekiwanej sygnatury funkcji i | |
72 | sprawdzenie, że funkcje je obsługują. Dodanie później dodatkowych | |
73 | parametrów może zepsuć istniejący kod innych osób. | |
74 | ||
75 | backcall zapewnia sposób określania sygnatury wywołań zwrotnych przy | |
76 | użyciu funkcji prototypowej. | |
77 | ||
78 | %prep | |
79 | %setup -q -n backcall-%{version} | |
80 | ||
81 | %build | |
82 | %if %{with python2} | |
83 | %py_build | |
84 | ||
85 | %if %{with tests} | |
86 | %{__python} -m pytest tests | |
87 | %endif | |
88 | %endif | |
89 | ||
90 | %if %{with python3} | |
91 | %py3_build | |
92 | ||
93 | %if %{with tests} | |
94 | %{__python3} -m pytest tests | |
95 | %endif | |
96 | %endif | |
97 | ||
98 | %install | |
99 | rm -rf $RPM_BUILD_ROOT | |
100 | ||
101 | %if %{with python2} | |
102 | %py_install | |
103 | ||
104 | %py_postclean | |
105 | %endif | |
106 | ||
107 | %if %{with python3} | |
108 | %py3_install | |
109 | %endif | |
110 | ||
111 | %clean | |
112 | rm -rf $RPM_BUILD_ROOT | |
113 | ||
114 | %if %{with python2} | |
115 | %files | |
116 | %defattr(644,root,root,755) | |
117 | %doc README.rst | |
118 | %{py_sitescriptdir}/backcall | |
119 | %{py_sitescriptdir}/backcall-%{version}-py*.egg-info | |
120 | %endif | |
121 | ||
122 | %if %{with python3} | |
123 | %files -n python3-backcall | |
124 | %defattr(644,root,root,755) | |
125 | %doc README.rst | |
126 | %{py3_sitescriptdir}/backcall | |
127 | %{py3_sitescriptdir}/backcall-%{version}-py*.egg-info | |
128 | %endif |