]> git.pld-linux.org Git - packages/python-pytest-localserver.git/blob - python-pytest-localserver.spec
- new
[packages/python-pytest-localserver.git] / python-pytest-localserver.spec
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:        py.test plugin to test server connections locally
8 Summary(pl.UTF-8):      Wtyczka py.test do lokalnego testowania połączeń z serwerem
9 Name:           python-pytest-localserver
10 Version:        0.5.0
11 Release:        1
12 License:        MIT
13 Group:          Libraries/Python
14 #Source0Download: https://pypi.org/simple/pytest-localserver/
15 Source0:        https://files.pythonhosted.org/packages/source/p/pytest-localserver/pytest-localserver-%{version}.tar.gz
16 # Source0-md5:  431d31cef0ac481f49b3755a3db1996b
17 URL:            https://pypi.org/project/pytest-localserver/
18 %if %{with python2}
19 BuildRequires:  python-modules >= 1:2.6
20 BuildRequires:  python-setuptools
21 %if %{with tests}
22 BuildRequires:  python-pytest >= 2.0.0
23 BuildRequires:  python-requests
24 BuildRequires:  python-werkzeug >= 0.10
25 %endif
26 %endif
27 %if %{with python3}
28 BuildRequires:  python3-modules >= 1:3.3
29 BuildRequires:  python3-setuptools
30 %if %{with tests}
31 BuildRequires:  python3-pytest >= 2.0.0
32 BuildRequires:  python3-requests
33 BuildRequires:  python3-werkzeug >= 0.10
34 %endif
35 %endif
36 BuildRequires:  rpm-pythonprov
37 BuildRequires:  rpmbuild(macros) >= 1.714
38 Requires:       python-modules >= 1:2.6
39 BuildArch:      noarch
40 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42 %description
43 pytest-localserver is a plugin for the pytest testing framework which
44 enables you to test server connections locally.
45
46 %description -l pl.UTF-8
47 pytest-localserver to wtyczka szkieletu testowego pytest, pozwalająca
48 na lokalne testowanie połączeń z serwerem.
49
50 %package -n python3-pytest-localserver
51 Summary:        py.test plugin to test server connections locally
52 Summary(pl.UTF-8):      Wtyczka py.test do lokalnego testowania połączeń z serwerem
53 Group:          Libraries/Python
54 Requires:       python3-modules >= 1:3.3
55
56 %description -n python3-pytest-localserver
57 pytest-localserver is a plugin for the pytest testing framework which
58 enables you to test server connections locally.
59
60 %description -n python3-pytest-localserver -l pl.UTF-8
61 pytest-localserver to wtyczka szkieletu testowego pytest, pozwalająca
62 na lokalne testowanie połączeń z serwerem.
63
64 %prep
65 %setup -q -n pytest-localserver-%{version}
66
67 %build
68 %if %{with python2}
69 %py_build
70
71 %if %{with tests}
72 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
73 %{__python} -m pytest tests
74 %endif
75 %endif
76
77 %if %{with python3}
78 %py3_build
79
80 %if %{with tests}
81 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
82 %{__python3} -m pytest tests
83 %endif
84 %endif
85
86 %install
87 rm -rf $RPM_BUILD_ROOT
88
89 %if %{with python2}
90 %py_install
91
92 %py_postclean
93 %endif
94
95 %if %{with python3}
96 %py3_install
97 %endif
98
99 %clean
100 rm -rf $RPM_BUILD_ROOT
101
102 %if %{with python2}
103 %files
104 %defattr(644,root,root,755)
105 %doc LICENSE README
106 %{py_sitescriptdir}/pytest_localserver
107 %{py_sitescriptdir}/pytest_localserver-%{version}-py*.egg-info
108 %endif
109
110 %if %{with python3}
111 %files -n python3-pytest-localserver
112 %defattr(644,root,root,755)
113 %doc LICENSE README
114 %{py3_sitescriptdir}/pytest_localserver
115 %{py3_sitescriptdir}/pytest_localserver-%{version}-py*.egg-info
116 %endif
This page took 0.125587 seconds and 3 git commands to generate.