[packages/python-httpretty] - initial

arekm arekm at pld-linux.org
Fri Mar 6 13:42:39 CET 2015


commit 90cb20925a54fcf0223a1733e0d7b6b0235eb22b
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Fri Mar 6 13:42:26 2015 +0100

    - initial

 python-httpretty.spec | 97 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 97 insertions(+)
---
diff --git a/python-httpretty.spec b/python-httpretty.spec
new file mode 100644
index 0000000..ff183b5
--- /dev/null
+++ b/python-httpretty.spec
@@ -0,0 +1,97 @@
+#
+# Conditional build:
+%bcond_with	tests	# do not perform "make test"
+%bcond_without	python2 # CPython 2.x module
+%bcond_with	python3 # CPython 3.x module
+
+%define 	module	httpretty
+Summary:	HTTP client mock for Python
+Name:		python-%{module}
+Version:	0.8.7
+Release:	1
+License:	MIT
+Group:		Libraries/Python
+Source0:	https://pypi.python.org/packages/source/h/httpretty/httpretty-%{version}.tar.gz
+# Source0-md5:	753b82f3bf632fbfc595816a0f6691f0
+URL:		https://pypi.python.org/pypi/httpretty
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.219
+%if %{with python2}
+BuildRequires:	python-distribute
+BuildRequires:	python-sure
+%endif
+%if %{with python3}
+BuildRequires:	python3-distribute
+BuildRequires:	python3-modules
+BuildRequires:	python3-sure
+%endif
+Requires:	python-modules
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+HTTP client mock for Python.
+
+%package -n python3-%{module}
+Summary:	HTTP client mock for Python
+Group:		Libraries/Python
+Requires:	python3-modules
+
+%description -n python3-%{module}
+HTTP client mock for Python.
+
+%prep
+%setup -q -n %{module}-%{version}
+
+%build
+%if %{with python2}
+%{__python} setup.py build --build-base build-2 %{?with_tests:test}
+%endif
+
+%if %{with python3}
+CFLAGS="%{rpmcppflags} %{rpmcflags}" \
+%{__python3} setup.py build --build-base build-3 %{?with_tests:test}
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%{__python} setup.py \
+	build --build-base build-2 \
+	install --skip-build \
+	--optimize=2 \
+	--root=$RPM_BUILD_ROOT
+
+%py_postclean
+%endif
+
+%if %{with python3}
+%{__python3} setup.py \
+	build --build-base build-3 \
+	install --skip-build \
+	--optimize=2 \
+	--root=$RPM_BUILD_ROOT
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%files
+%defattr(644,root,root,755)
+%doc README*
+%dir %{py_sitescriptdir}/%{module}
+%{py_sitescriptdir}/%{module}/*.py[co]
+%if "%{py_ver}" > "2.4"
+%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
+%endif
+%endif
+
+%if %{with python3}
+%files -n python3-%{module}
+%defattr(644,root,root,755)
+%doc README*
+%{py3_sitescriptdir}/%{module}
+%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-httpretty.git/commitdiff/90cb20925a54fcf0223a1733e0d7b6b0235eb22b



More information about the pld-cvs-commit mailing list