Change-Id: I64ff8bda25ddb9517b8154d8fb02a24cdc3ede4e
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/2803
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Priyesh Padmavilasom <ppadmavilasom@vmware.com>
| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,71 @@ |
| 0 |
+%{!?python2_sitelib: %global python2_sitelib %(python2 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
|
|
| 1 |
+%{!?python3_sitelib: %global python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
|
|
| 2 |
+ |
|
| 3 |
+Summary: A port of the caching algorithms in httplib2 for use with requests session object. |
|
| 4 |
+Name: python-CacheControl |
|
| 5 |
+Version: 0.12.3 |
|
| 6 |
+Release: 1%{?dist}
|
|
| 7 |
+License: Apache Software License |
|
| 8 |
+Group: Development/Languages/Python |
|
| 9 |
+Vendor: VMware, Inc. |
|
| 10 |
+Distribution: Photon |
|
| 11 |
+Url: https://github.com/ionrock/cachecontrol/archive/v%{version}.tar.gz
|
|
| 12 |
+Source0: cachecontrol-%{version}.tar.gz
|
|
| 13 |
+%define sha1 cachecontrol=c0f8287d821a51e570487ca0d67aafac4fe73b0e |
|
| 14 |
+ |
|
| 15 |
+BuildRequires: python2-devel |
|
| 16 |
+BuildRequires: python-setuptools |
|
| 17 |
+Requires: python-requests |
|
| 18 |
+Requires: python-msgpack |
|
| 19 |
+BuildArch: noarch |
|
| 20 |
+ |
|
| 21 |
+%description |
|
| 22 |
+CacheControl is a port of the caching algorithms in httplib2 for use with requests session object. |
|
| 23 |
+ |
|
| 24 |
+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. |
|
| 25 |
+ |
|
| 26 |
+%package -n python3-CacheControl |
|
| 27 |
+Summary: Python3 CacheControl |
|
| 28 |
+BuildRequires: python3-devel |
|
| 29 |
+Requires: python3-requests |
|
| 30 |
+Requires: python3-msgpack |
|
| 31 |
+ |
|
| 32 |
+%description -n python3-CacheControl |
|
| 33 |
+ |
|
| 34 |
+%prep |
|
| 35 |
+%setup -q -n cachecontrol-%{version}
|
|
| 36 |
+rm -rf ../p3dir |
|
| 37 |
+cp -a . ../p3dir |
|
| 38 |
+ |
|
| 39 |
+%build |
|
| 40 |
+python2 setup.py build |
|
| 41 |
+pushd ../p3dir |
|
| 42 |
+python3 setup.py build |
|
| 43 |
+popd |
|
| 44 |
+ |
|
| 45 |
+%install |
|
| 46 |
+pushd ../p3dir |
|
| 47 |
+python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
|
| 48 |
+mv %{buildroot}/%{_bindir}/doesitcache %{buildroot}/%{_bindir}/doesitcache3
|
|
| 49 |
+popd |
|
| 50 |
+python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
|
| 51 |
+ |
|
| 52 |
+%check |
|
| 53 |
+python2 setup.py test |
|
| 54 |
+pushd ../p3dir |
|
| 55 |
+python3 setup.py test |
|
| 56 |
+popd |
|
| 57 |
+ |
|
| 58 |
+%files |
|
| 59 |
+%defattr(-,root,root) |
|
| 60 |
+%{python2_sitelib}/*
|
|
| 61 |
+%{_bindir}/doesitcache
|
|
| 62 |
+ |
|
| 63 |
+%files -n python3-CacheControl |
|
| 64 |
+%defattr(-,root,root) |
|
| 65 |
+%{python3_sitelib}/*
|
|
| 66 |
+%{_bindir}/doesitcache3
|
|
| 67 |
+ |
|
| 68 |
+%changelog |
|
| 69 |
+* Thu May 25 2017 Xiaolin Li <xiaolinl@vmware.com> 0.12.3-1 |
|
| 70 |
+- Initial version |
| 0 | 71 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,63 @@ |
| 0 |
+%{!?python2_sitelib: %global python2_sitelib %(python2 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
|
|
| 1 |
+%{!?python3_sitelib: %global python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
|
|
| 2 |
+ |
|
| 3 |
+Summary: MessagePack (de)serializer. |
|
| 4 |
+Name: python-msgpack |
|
| 5 |
+Version: 0.4.8 |
|
| 6 |
+Release: 1%{?dist}
|
|
| 7 |
+License: Apache Software License |
|
| 8 |
+Group: Development/Languages/Python |
|
| 9 |
+Vendor: VMware, Inc. |
|
| 10 |
+Distribution: Photon |
|
| 11 |
+Url: http://msgpack.org/ |
|
| 12 |
+Source0: https://pypi.io/packages/source/m/msgpack-python/msgpack-python-%{version}.tar.gz
|
|
| 13 |
+%define sha1 msgpack-python=59d4af5f0598bd31469cad7df316d70e6b492b1d |
|
| 14 |
+ |
|
| 15 |
+BuildRequires: python2-devel |
|
| 16 |
+BuildRequires: python-setuptools |
|
| 17 |
+Requires: python2 |
|
| 18 |
+ |
|
| 19 |
+%description |
|
| 20 |
+MessagePack is a fast, compact binary serialization format, suitable for similar data to JSON. This package provides CPython bindings for reading and writing MessagePack data. |
|
| 21 |
+ |
|
| 22 |
+%package -n python3-msgpack |
|
| 23 |
+Summary: Python3 msgpack |
|
| 24 |
+BuildRequires: python3-devel |
|
| 25 |
+Requires: python3 |
|
| 26 |
+ |
|
| 27 |
+%description -n python3-msgpack |
|
| 28 |
+ |
|
| 29 |
+%prep |
|
| 30 |
+%setup -q -n msgpack-python-%{version}
|
|
| 31 |
+rm -rf ../p3dir |
|
| 32 |
+cp -a . ../p3dir |
|
| 33 |
+ |
|
| 34 |
+%build |
|
| 35 |
+python2 setup.py build |
|
| 36 |
+pushd ../p3dir |
|
| 37 |
+python3 setup.py build |
|
| 38 |
+popd |
|
| 39 |
+ |
|
| 40 |
+%install |
|
| 41 |
+pushd ../p3dir |
|
| 42 |
+python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
|
| 43 |
+popd |
|
| 44 |
+python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
|
| 45 |
+ |
|
| 46 |
+%check |
|
| 47 |
+python2 setup.py test |
|
| 48 |
+pushd ../p3dir |
|
| 49 |
+python3 setup.py test |
|
| 50 |
+popd |
|
| 51 |
+ |
|
| 52 |
+%files |
|
| 53 |
+%defattr(-,root,root) |
|
| 54 |
+%{python2_sitelib}/*
|
|
| 55 |
+ |
|
| 56 |
+%files -n python3-msgpack |
|
| 57 |
+%defattr(-,root,root) |
|
| 58 |
+%{python3_sitelib}/*
|
|
| 59 |
+ |
|
| 60 |
+%changelog |
|
| 61 |
+* Thu May 25 2017 Xiaolin Li <xiaolinl@vmware.com> 0.4.8-1 |
|
| 62 |
+- Initial version |