[python-CacheControl] Initial package.

Bohuslav Kabrda bkabrda at fedoraproject.org
Thu Jul 3 12:16:12 UTC 2014


commit 774a1f80d3f0b46e59916512ecd7ee1b2d932985
Author: Slavek Kabrda <bkabrda at redhat.com>
Date:   Thu Jul 3 14:16:12 2014 +0200

    Initial package.

 .gitignore               |    2 +
 python-CacheControl.spec |  121 ++++++++++++++++++++++++++++++++++++++++++++++
 sources                  |    2 +
 3 files changed, 125 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..d2c1f52 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1,2 @@
+/CacheControl-0.10.1-tests.tar.gz
+/CacheControl-0.10.1.tar.gz
diff --git a/python-CacheControl.spec b/python-CacheControl.spec
new file mode 100644
index 0000000..1e29519
--- /dev/null
+++ b/python-CacheControl.spec
@@ -0,0 +1,121 @@
+# Created by pyp2rpm-1.1.0b
+%global pypi_name CacheControl
+%global pypi_name_lower cachecontrol
+%global with_python3 1
+
+Name:           python-%{pypi_name}
+Version:        0.10.1
+Release:        1%{?dist}
+Summary:        httplib2 caching for requests
+
+License:        MIT
+URL:            https://github.com/ionrock/cachecontrol
+Source0:        https://pypi.python.org/packages/source/C/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
+# to get tests:
+# git clone https://github.com/ionrock/cachecontrol.git && cd cachecontrol
+# git checkout v0.10.1 && tar -czvf CacheControl-0.10.1-tests.tar.gz tests/ conftest.py
+Source1:        %{pypi_name}-%{version}-tests.tar.gz
+BuildArch:      noarch
+
+BuildRequires:  python-devel
+BuildRequires:  pytest
+BuildRequires:  python-lockfile
+BuildRequires:  python-mock
+BuildRequires:  python-redis
+BuildRequires:  python-requests
+BuildRequires:  python-webtest
+
+Requires:       python-requests
+
+%description
+CacheControl is a port of the caching algorithms in httplib2_ for use with
+requests_ session object. It was written because httplib2's better support
+for caching is often mitigated by its lack of threadsafety. The same is
+true of requests in terms of caching.
+
+%if 0%{?with_python3}
+%package -n     python3-%{pypi_name}
+Summary:        httplib2 caching for requests
+
+BuildRequires:  python3-devel
+BuildRequires:  python3-pytest
+BuildRequires:  python3-lockfile
+BuildRequires:  python3-mock
+BuildRequires:  python3-redis
+BuildRequires:  python3-requests
+BuildRequires:  python3-webtest
+
+Requires:       python3-requests
+
+%description -n python3-%{pypi_name}
+CacheControl is a port of the caching algorithms in httplib2_ for use with
+requests_ session object. It was written because httplib2's better support
+for caching is often mitigated by its lack of threadsafety. The same is
+true of requests in terms of caching.
+This is the Python 3 build of CacheControl.
+%endif # with_python3
+
+
+%prep
+%setup -q -n %{pypi_name}-%{version}
+# Remove bundled egg-info
+rm -rf %{pypi_name}.egg-info
+
+
+%if 0%{?with_python3}
+rm -rf %{py3dir}
+cp -a . %{py3dir}
+%endif # with_python3
+
+
+%build
+%{__python2} setup.py build
+
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py build
+popd
+%endif # with_python3
+
+
+%install
+# Must do the subpackages' install first because the scripts in /usr/bin are
+# overwritten with every setup.py install (and we want the python2 version
+# to be the default for now).
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py install --skip-build --root %{buildroot}
+popd
+%endif # with_python3
+
+%{__python2} setup.py install --skip-build --root %{buildroot}
+
+
+%check
+tar -xzf %{SOURCE1}
+py.test tests
+
+%if 0%{?with_python3}
+pushd %{py3dir}
+tar -xzf %{SOURCE1}
+py.test-%{python3_version}
+popd
+%endif # with_python3
+
+
+%files
+%doc README.rst
+%{python2_sitelib}/%{pypi_name_lower}
+%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
+
+%if 0%{?with_python3}
+%files -n python3-%{pypi_name}
+%doc README.rst
+%{python3_sitelib}/%{pypi_name_lower}
+%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
+%endif # with_python3
+
+
+%changelog
+* Wed Jun 04 2014 Bohuslav Kabrda <bkabrda at redhat.com> - 0.10.1-1
+- Initial package.
diff --git a/sources b/sources
index e69de29..c362c41 100644
--- a/sources
+++ b/sources
@@ -0,0 +1,2 @@
+060f4f67f5f26f976913557da40e4220  CacheControl-0.10.1-tests.tar.gz
+4f9ae7d3545db948676e532ce2cd3537  CacheControl-0.10.1.tar.gz


More information about the scm-commits mailing list