[packages/python-requests-mock] new package

jajcus jajcus at pld-linux.org
Wed Feb 1 10:57:10 CET 2017


commit 969fefd6da0add210770cb50a0211080d941fa34
Author: Jacek Konieczny <j.konieczny at eggsoft.pl>
Date:   Wed Feb 1 10:56:46 2017 +0100

    new package

 python-requests-mock.spec | 96 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 96 insertions(+)
---
diff --git a/python-requests-mock.spec b/python-requests-mock.spec
new file mode 100644
index 0000000..d3e7e15
--- /dev/null
+++ b/python-requests-mock.spec
@@ -0,0 +1,96 @@
+#
+# This is template for pure python modules (noarch)
+# use template-specs/python-ext.spec for binary python packages
+#
+#
+# Conditional build:
+%bcond_with	tests	# do not perform "make test"
+%bcond_without	python2 # CPython 2.x module
+%bcond_without	python3 # CPython 3.x module
+
+# NOTES:
+# - 'module' should match the Python import path (first component?)
+# - 'egg_name' should equal to Python egg name
+# - 'pypi_name' must match the Python Package Index name
+%define		module		requests_mock
+%define		egg_name	%{module}
+%define		pypi_name	requests-mock
+Summary:	Mock out responses from the requests package
+Name:		python-%{pypi_name}
+Version:	1.3.0
+Release:	1
+License:	Apache
+Group:		Libraries/Python
+Source0:	https://pypi.python.org/packages/8d/cb/1267d7294d97e9a3ef24bf1370791da4d2dc6abc0f67626f38f4bf25dfa3/%{pypi_name}-%{version}.tar.gz
+# Source0-md5:	d2efbaf16d19153b7d271628071b4d4b
+URL:		https://requests-mock.readthedocs.io
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.714
+%if %{with python2}
+BuildRequires:	python-modules
+BuildRequires:	python-setuptools
+%endif
+%if %{with python3}
+BuildRequires:	python3-modules
+BuildRequires:	python3-setuptools
+%endif
+Requires:	python-requests
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+requests-mock provides a building block to stub out the HTTP requests
+portions of your testing code.
+
+%package -n python3-%{module}
+Summary:	Mock out responses from the requests package
+Group:		Libraries/Python
+Requires:	python3-modules
+
+%description -n python3-%{module}
+requests-mock provides a building block to stub out the HTTP requests
+portions of your testing code.
+
+%prep
+%setup -q -n %{pypi_name}-%{version}
+
+%build
+%if %{with python2}
+%py_build %{?with_tests:test}
+%endif
+
+%if %{with python3}
+%py3_build %{?with_tests:test}
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%py_install
+
+%py_postclean
+%endif
+
+%if %{with python3}
+%py3_install
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%files
+%defattr(644,root,root,755)
+%doc AUTHORS ChangeLog README.rst *.txt
+%{py_sitescriptdir}/%{module}
+%{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
+%endif
+
+%if %{with python3}
+%files -n python3-%{module}
+%defattr(644,root,root,755)
+%doc AUTHORS ChangeLog README.rst *.txt
+%{py3_sitescriptdir}/%{module}
+%{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-requests-mock.git/commitdiff/969fefd6da0add210770cb50a0211080d941fa34



More information about the pld-cvs-commit mailing list