]> git.pld-linux.org Git - packages/python-httpretty.git/blame - python-httpretty.spec
- release 3 (by relup.sh)
[packages/python-httpretty.git] / python-httpretty.spec
CommitLineData
90cb2092
AM
1#
2# Conditional build:
3%bcond_with tests # do not perform "make test"
4%bcond_without python2 # CPython 2.x module
fb7dbc4d
ER
5# Python3 note:
6# Due to big API incompatibility between python 3.3, 3.4 and 3.5, the
7# author of HTTPretty is **not** supporting python3 officially. You
8# will notice that the travis build for python 3 might be broken, and
9# while pull requests fixing py3 support are most welcome, it is still
10# not official at least *for now*.
3ed73992 11%bcond_without python3 # CPython 3.x module
90cb2092
AM
12
13%define module httpretty
14Summary: HTTP client mock for Python
15Name: python-%{module}
fb7dbc4d 16Version: 0.8.14
e1f48b17 17Release: 3
90cb2092
AM
18License: MIT
19Group: Libraries/Python
20Source0: https://pypi.python.org/packages/source/h/httpretty/httpretty-%{version}.tar.gz
fb7dbc4d 21# Source0-md5: 2a6bbf270fafc77647b0479d95d0544c
bb7daafe 22Patch0: test-deps.patch
fb7dbc4d 23URL: http://httpretty.readthedocs.io/
90cb2092 24BuildRequires: rpm-pythonprov
d4739aca 25BuildRequires: rpmbuild(macros) >= 1.710
90cb2092
AM
26%if %{with python2}
27BuildRequires: python-distribute
bb7daafe 28BuildRequires: python-sure >= 1.2.24
4ad898a1
ER
29%if %{with tests}
30BuildRequires: python-httplib2
31BuildRequires: python-nose
32BuildRequires: python-requests
33BuildRequires: python-tornado
34%endif
90cb2092
AM
35%endif
36%if %{with python3}
37BuildRequires: python3-distribute
38BuildRequires: python3-modules
bb7daafe 39BuildRequires: python3-sure >= 1.2.24
4ad898a1
ER
40%if %{with tests}
41BuildRequires: python3-httplib2
42BuildRequires: python3-nose
43BuildRequires: python3-requests
44BuildRequires: python3-tornado
3ed73992
ER
45# AUTO: -- ImportError: No module named 'urllib3'
46BuildRequires: python3-urllib3
4ad898a1 47%endif
90cb2092
AM
48%endif
49Requires: python-modules
50BuildArch: noarch
51BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52
53%description
54HTTP client mock for Python.
55
56%package -n python3-%{module}
57Summary: HTTP client mock for Python
58Group: Libraries/Python
59Requires: python3-modules
60
61%description -n python3-%{module}
62HTTP client mock for Python.
63
64%prep
65%setup -q -n %{module}-%{version}
bb7daafe 66%patch0 -p1
90cb2092
AM
67
68%build
69%if %{with python2}
840eb0b1 70%py_build %{?with_tests:test}
90cb2092
AM
71%endif
72
73%if %{with python3}
840eb0b1 74%py3_build %{?with_tests:test}
90cb2092
AM
75%endif
76
77%install
78rm -rf $RPM_BUILD_ROOT
90cb2092 79%if %{with python2}
840eb0b1 80%py_install
90cb2092
AM
81%py_postclean
82%endif
83
84%if %{with python3}
840eb0b1 85%py3_install
90cb2092
AM
86%endif
87
88%clean
89rm -rf $RPM_BUILD_ROOT
90
91%if %{with python2}
92%files
93%defattr(644,root,root,755)
94%doc README*
95%dir %{py_sitescriptdir}/%{module}
96%{py_sitescriptdir}/%{module}/*.py[co]
90cb2092
AM
97%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
98%endif
90cb2092
AM
99
100%if %{with python3}
101%files -n python3-%{module}
102%defattr(644,root,root,755)
103%doc README*
104%{py3_sitescriptdir}/%{module}
105%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
106%endif
This page took 0.083263 seconds and 4 git commands to generate.