From 9ba793254ecb80bd947678ccf07ff59ef2833063 Mon Sep 17 00:00:00 2001 From: Chandan Kumar Date: Sep 23 2015 10:23:36 +0000 Subject: Initial import rhbz#1252784 --- diff --git a/.gitignore b/.gitignore index e69de29..ebd07e8 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/wsgi_intercept-0.10.3.tar.gz diff --git a/python-wsgi_intercept.spec b/python-wsgi_intercept.spec new file mode 100644 index 0000000..d05643a --- /dev/null +++ b/python-wsgi_intercept.spec @@ -0,0 +1,137 @@ +%global pypi_name wsgi_intercept + +%if 0%{?fedora} +%global with_python3 1 +%endif + +Name: python-%{pypi_name} +Version: 0.10.3 +Release: 2%{?dist} +Summary: wsgi_intercept installs a WSGI application in place of a real URI for testing + +License: MIT +URL: https://github.com/cdent/wsgi-intercept +Source0: https://pypi.python.org/packages/source/w/%{pypi_name}/%{pypi_name}-%{version}.tar.gz +BuildArch: noarch + +%description +It installs a WSGI application in place of a real URI for testing. +Testing a WSGI application normally involves starting a server at +a local host and port, then pointing your test code to that address. +Instead,this library lets you intercept calls to any specific host/port +combination and redirect them into a `WSGI application`_ importable by +your test program. + +%package -n python2-%{pypi_name} +Summary: wsgi_intercept installs a WSGI application in place of a real URI for testing +%{?python_provide:%python_provide python2-%{pypi_name}} + +BuildRequires: python2-devel +BuildRequires: python-setuptools + +# test dependencies +BuildRequires: pytest +BuildRequires: python-httplib2 +BuildRequires: python-requests + +Requires: python-setuptools + +%description -n python2-%{pypi_name} +It installs a WSGI application in place of a real URI for testing. +Testing a WSGI application normally involves starting a server at +a local host and port, then pointing your test code to that address. +Instead,this library lets you intercept calls to any specific host/port +combination and redirect them into a `WSGI application`_ importable by +your test program. + +%package -n python-%{pypi_name}-doc +Summary: Documentation for the wsgi-intercept module +BuildRequires: python-sphinx +BuildRequires: python-sphinx_rtd_theme + +%description -n python-%{pypi_name}-doc +Documentation for the wsgi-intercept module + +%if 0%{with_python3} +%package -n python3-%{pypi_name} +Summary: wsgi_intercept installs a WSGI application in place of a real URI for testing +%{?python_provide:%python_provide python3-%{pypi_name}} + +BuildRequires: python3-devel +BuildRequires: python3-setuptools +# test dependencies +BuildRequires: python3-pytest +BuildRequires: python3-httplib2 +BuildRequires: python3-requests + +Requires: python3-setuptools + +%description -n python3-%{pypi_name} +It installs a WSGI application in place of a real URI for testing. +Testing a WSGI application normally involves starting a server at +a local host and port, then pointing your test code to that address. +Instead,this library lets you intercept calls to any specific host/port +combination and redirect them into a `WSGI application`_ importable by +your test program. +%endif + +%prep +%setup -q -n %{pypi_name}-%{version} +# Remove bundled egg-info +rm -rf %{pypi_name}.egg-info + +%build +%py2_build +# generate html docs +export PYTHONPATH="$( pwd ):$PYTHONPATH" +sphinx-build docs html +# remove the sphinx-build leftovers +rm -rf html/.{doctrees,buildinfo} + +# fix file encoding +sed -i 's/\r$//' html/_static/jquery.js + + +%if 0%{with_python3} +%py3_build +%endif + +%install +%py2_install + +%if 0%{with_python3} +%py3_install +%endif + +%check +%{__python2} setup.py test + +%if 0%{with_python3} +%{__python3} setup.py test +%endif + +%files -n python2-%{pypi_name} +%doc README +%license LICENSE +%{python2_sitelib}/%{pypi_name}* +%exclude %{python2_sitelib}/test + +%if 0%{with_python3} +%files -n python3-%{pypi_name} +%doc README +%license LICENSE +%{python3_sitelib}/%{pypi_name}* +%exclude %{python3_sitelib}/test +%endif + +%files -n python-%{pypi_name}-doc +%license LICENSE +%doc html + +%changelog +* Mon Sep 21 2015 Chandan Kumar - 0.10.3-2 +- Fixed import error +- Removed test folder + +* Wed Sep 16 2015 Chandan Kumar - 0.10.3-1 +- Initial package. diff --git a/sources b/sources index e69de29..1fddc56 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +bdcf2fb770a94aa773ce44e674fd39eb wsgi_intercept-0.10.3.tar.gz