]> git.pld-linux.org Git - packages/python-backcall.git/blame - python-backcall.spec
rebuild with tests and docs
[packages/python-backcall.git] / python-backcall.spec
CommitLineData
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
7Summary: Specifications for callback functions passed in to an API
8Summary(pl.UTF-8): Specyfikacje funkcji wywołań zwrotnych przekazywane do API
9Name: python-backcall
10Version: 0.1.0
3fe24de2 11Release: 5
b3f0697a
JB
12License: BSD
13Group: Libraries/Python
14#Source0Download: https://pypi.org/simple/backcall/
15Source0: https://files.pythonhosted.org/packages/source/b/backcall/backcall-%{version}.tar.gz
16# Source0-md5: 87ce0c7839808e6a3427d57df6a792e7
17URL: https://pypi.org/project/backcall/
18%if %{with python2}
19BuildRequires: python-modules >= 1:2.7
20%if %{with tests}
21BuildRequires: python-pytest
22%endif
23%endif
24%if %{with python3}
25BuildRequires: python3-modules >= 1:3.3
26%if %{with tests}
27BuildRequires: python3-pytest
28%endif
29%endif
30BuildRequires: rpm-pythonprov
31BuildRequires: rpmbuild(macros) >= 1.714
32Requires: python-modules >= 1:2.7
33BuildArch: noarch
34BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36%description
37If your code lets other people supply callback functions, it's
38important to specify the function signature you expect, and check that
39functions support that. Adding extra parameters later would break
40other peoples code unless you're careful.
41
42backcall provides a way of specifying the callback signature using a
43prototype function.
44
45%description -l pl.UTF-8
46Jeśli kod wymaga od innych przekazywania funkcji wywołań zwrotnych
47(callbacków), ważne jest określenie oczekiwanej sygnatury funkcji i
48sprawdzenie, że funkcje je obsługują. Dodanie później dodatkowych
49parametrów może zepsuć istniejący kod innych osób.
50
51backcall zapewnia sposób określania sygnatury wywołań zwrotnych przy
52użyciu funkcji prototypowej.
53
54%package -n python3-backcall
55Summary: Specifications for callback functions passed in to an API
56Summary(pl.UTF-8): Specyfikacje funkcji wywołań zwrotnych przekazywane do API
57Group: Libraries/Python
58Requires: python3-modules >= 1:3.3
59
60%description -n python3-backcall
61If your code lets other people supply callback functions, it's
62important to specify the function signature you expect, and check that
63functions support that. Adding extra parameters later would break
64other peoples code unless you're careful.
65
66backcall provides a way of specifying the callback signature using a
67prototype function.
68
69%description -n python3-backcall -l pl.UTF-8
70Jeśli kod wymaga od innych przekazywania funkcji wywołań zwrotnych
71(callbacków), ważne jest określenie oczekiwanej sygnatury funkcji i
72sprawdzenie, że funkcje je obsługują. Dodanie później dodatkowych
73parametrów może zepsuć istniejący kod innych osób.
74
75backcall zapewnia sposób określania sygnatury wywołań zwrotnych przy
76uż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
99rm -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
112rm -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
This page took 0.120814 seconds and 4 git commands to generate.