]> git.pld-linux.org Git - packages/python-test-server.git/blob - python-test-server.spec
702aaacb295a15246d419df6e23c056caa88b134
[packages/python-test-server.git] / python-test-server.spec
1 #
2 # Conditional build:
3 %bcond_with     tests   # unit tests (missing .util in test/server.py?)
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 Summary:        Server to test HTTP clients
8 Summary(pl.UTF-8):      Serwer do testówania klientów HTTP
9 Name:           python-test-server
10 Version:        0.0.31
11 Release:        5
12 License:        MIT
13 Group:          Libraries/Python
14 #Source0Download: https://pypi.org/simple/test-server/
15 Source0:        https://files.pythonhosted.org/packages/source/t/test-server/test-server-%{version}.tar.gz
16 # Source0-md5:  61afb28c2d3455f618f5bfa27bc54153
17 URL:            https://pypi.org/project/test-server/
18 %if %{with python2}
19 BuildRequires:  python-modules >= 1:2.7
20 BuildRequires:  python-setuptools
21 %if %{with tests}
22 BuildRequires:  python-bottle >= 0.12.13
23 BuildRequires:  python-pytest
24 BuildRequires:  python-six
25 BuildRequires:  python-webtest
26 %endif
27 %endif
28 %if %{with python3}
29 BuildRequires:  python3-modules >= 1:3.3
30 BuildRequires:  python3-setuptools
31 %if %{with tests}
32 BuildRequires:  python3-bottle >= 0.12.13
33 BuildRequires:  python3-pytest
34 BuildRequires:  python3-six
35 BuildRequires:  python3-webtest
36 %endif
37 %endif
38 BuildRequires:  rpm-pythonprov
39 BuildRequires:  rpmbuild(macros) >= 1.714
40 Requires:       python-modules >= 1:2.7
41 BuildArch:      noarch
42 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44 %description
45 HTTP Server to test HTTP clients.
46
47 %description -l pl.UTF-8
48 Serwer HTTP do testowania klientów HTTP.
49
50 %package -n python3-test-server
51 Summary:        Server to test HTTP clients
52 Summary(pl.UTF-8):      Serwer do testówania klientów HTTP
53 Group:          Libraries/Python
54 Requires:       python3-modules >= 1:3.3
55
56 %description -n python3-test-server
57 HTTP Server to test HTTP clients.
58
59 %description -n python3-test-server -l pl.UTF-8
60 Serwer HTTP do testowania klientów HTTP.
61
62 %prep
63 %setup -q -n test-server-%{version}
64
65 %build
66 %if %{with python2}
67 %py_build
68
69 %if %{with tests}
70 %{__python} -m pytest
71 %endif
72 %endif
73
74 %if %{with python3}
75 %py3_build
76
77 %if %{with tests}
78 %{__python3} -m pytest
79 %endif
80 %endif
81
82 %install
83 rm -rf $RPM_BUILD_ROOT
84
85 %if %{with python2}
86 %py_install
87
88 %py_postclean
89 %endif
90
91 %if %{with python3}
92 %py3_install
93 %endif
94
95 %clean
96 rm -rf $RPM_BUILD_ROOT
97
98 %if %{with python2}
99 %files
100 %defattr(644,root,root,755)
101 %doc CHANGELOG.md README.rst 
102 %{py_sitescriptdir}/test_server
103 %{py_sitescriptdir}/test_server-%{version}-py*.egg-info
104 %endif
105
106 %if %{with python3}
107 %files -n python3-test-server
108 %defattr(644,root,root,755)
109 %doc CHANGELOG.md README.rst 
110 %{py3_sitescriptdir}/test_server
111 %{py3_sitescriptdir}/test_server-%{version}-py*.egg-info
112 %endif
This page took 0.07995 seconds and 2 git commands to generate.