|
Nejc Saje |
5d3771c |
# Created by pyp2rpm-1.0.1
|
|
Nejc Saje |
5d3771c |
%global pypi_name pymemcache
|
|
Nejc Saje |
5d3771c |
|
|
Nejc Saje |
5d3771c |
%if 0%{?fedora}
|
|
Nejc Saje |
5d3771c |
%global with_python3 1
|
|
Nejc Saje |
5d3771c |
%endif
|
|
Nejc Saje |
5d3771c |
|
|
Nejc Saje |
5d3771c |
%if 0%{?rhel} && 0%{?rhel} <= 6
|
|
Nejc Saje |
5d3771c |
%{!?__python2: %global __python2 /usr/bin/python}
|
|
Nejc Saje |
5d3771c |
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
|
|
Nejc Saje |
5d3771c |
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
|
|
Nejc Saje |
5d3771c |
%endif
|
|
Nejc Saje |
5d3771c |
|
|
Nejc Saje |
5d3771c |
Name: python-%{pypi_name}
|
|
Nejc Saje |
5d3771c |
Version: 1.2.5
|
|
Nejc Saje |
3484695 |
Release: 2%{?dist}
|
|
Nejc Saje |
5d3771c |
Summary: A comprehensive, fast, pure Python memcached client
|
|
Nejc Saje |
5d3771c |
|
|
Nejc Saje |
5d3771c |
License: ASL 2.0
|
|
Nejc Saje |
5d3771c |
URL: https://github.com/Pinterest/pymemcache
|
|
Nejc Saje |
5d3771c |
Source0: https://pypi.python.org/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
|
|
Nejc Saje |
5d3771c |
BuildArch: noarch
|
|
Nejc Saje |
5d3771c |
|
|
Nejc Saje |
5d3771c |
BuildRequires: python2-devel
|
|
Nejc Saje |
5d3771c |
BuildRequires: python-nose >= 1.0
|
|
Nejc Saje |
5d3771c |
BuildRequires: python-setuptools
|
|
Nejc Saje |
3484695 |
BuildRequires: python-six
|
|
Nejc Saje |
5d3771c |
Requires: python-six
|
|
Nejc Saje |
5d3771c |
|
|
Nejc Saje |
5d3771c |
%description
|
|
Nejc Saje |
5d3771c |
pymemcache supports the following features:
|
|
Nejc Saje |
5d3771c |
|
|
Nejc Saje |
5d3771c |
* Complete implementation of the memcached text protocol.
|
|
Nejc Saje |
5d3771c |
* Configurable timeouts for socket connect and send/recv calls.
|
|
Nejc Saje |
5d3771c |
* Access to the "noreply" flag, which can significantly increase the speed of
|
|
Nejc Saje |
5d3771c |
writes.
|
|
Nejc Saje |
5d3771c |
* Flexible, simple approach to serialization and deserialization.
|
|
Nejc Saje |
5d3771c |
* The (optional) ability to treat network and memcached errors as cache misses.
|
|
Nejc Saje |
5d3771c |
|
|
Nejc Saje |
5d3771c |
%if 0%{?with_python3}
|
|
Nejc Saje |
5d3771c |
%package -n python3-%{pypi_name}
|
|
Nejc Saje |
5d3771c |
Summary: A comprehensive, fast, pure Python memcached client
|
|
Nejc Saje |
5d3771c |
BuildRequires: python3-devel
|
|
Nejc Saje |
5d3771c |
BuildRequires: python3-nose >= 1.0
|
|
Nejc Saje |
5d3771c |
BuildRequires: python3-setuptools
|
|
Nejc Saje |
3484695 |
BuildRequires: python3-six
|
|
Nejc Saje |
5d3771c |
Requires: python3-six
|
|
Nejc Saje |
5d3771c |
|
|
Nejc Saje |
5d3771c |
%description -n python3-%{pypi_name}
|
|
Nejc Saje |
5d3771c |
pymemcache supports the following features:
|
|
Nejc Saje |
5d3771c |
|
|
Nejc Saje |
5d3771c |
* Complete implementation of the memcached text protocol.
|
|
Nejc Saje |
5d3771c |
* Configurable timeouts for socket connect and send/recv calls.
|
|
Nejc Saje |
5d3771c |
* Access to the "noreply" flag, which can significantly increase the speed of
|
|
Nejc Saje |
5d3771c |
writes.
|
|
Nejc Saje |
5d3771c |
* Flexible, simple approach to serialization and deserialization.
|
|
Nejc Saje |
5d3771c |
* The (optional) ability to treat network and memcached errors as cache misses.
|
|
Nejc Saje |
5d3771c |
%endif
|
|
Nejc Saje |
5d3771c |
|
|
Nejc Saje |
5d3771c |
%prep
|
|
Nejc Saje |
5d3771c |
%setup -q -n %{pypi_name}-%{version}
|
|
Nejc Saje |
5d3771c |
# Remove bundled egg-info
|
|
Nejc Saje |
5d3771c |
rm -rf %{pypi_name}.egg-info
|
|
Nejc Saje |
5d3771c |
|
|
Nejc Saje |
5d3771c |
%if 0%{?with_python3}
|
|
Nejc Saje |
5d3771c |
rm -rf %{py3dir}
|
|
Nejc Saje |
5d3771c |
cp -a . %{py3dir}
|
|
Nejc Saje |
5d3771c |
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
|
|
Nejc Saje |
5d3771c |
%endif # with_python3
|
|
Nejc Saje |
5d3771c |
|
|
Nejc Saje |
5d3771c |
%build
|
|
Nejc Saje |
5d3771c |
%{__python2} setup.py build
|
|
Nejc Saje |
5d3771c |
|
|
Nejc Saje |
5d3771c |
%if 0%{?with_python3}
|
|
Nejc Saje |
5d3771c |
pushd %{py3dir}
|
|
Nejc Saje |
5d3771c |
%{__python3} setup.py build
|
|
Nejc Saje |
5d3771c |
popd
|
|
Nejc Saje |
5d3771c |
%endif
|
|
Nejc Saje |
5d3771c |
|
|
Nejc Saje |
5d3771c |
|
|
Nejc Saje |
5d3771c |
%install
|
|
Nejc Saje |
5d3771c |
%{__python2} setup.py install --skip-build --root %{buildroot}
|
|
Nejc Saje |
5d3771c |
|
|
Nejc Saje |
5d3771c |
%if 0%{?with_python3}
|
|
Nejc Saje |
5d3771c |
pushd %{py3dir}
|
|
Nejc Saje |
5d3771c |
%{__python3} setup.py install --skip-build --root %{buildroot}
|
|
Nejc Saje |
5d3771c |
popd
|
|
Nejc Saje |
5d3771c |
%endif
|
|
Nejc Saje |
5d3771c |
|
|
Nejc Saje |
5d3771c |
|
|
Nejc Saje |
5d3771c |
%check
|
|
Nejc Saje |
5d3771c |
%{__python2} setup.py nosetests
|
|
Nejc Saje |
5d3771c |
%if 0%{?with_python3}
|
|
Nejc Saje |
5d3771c |
pushd %{py3dir}
|
|
Nejc Saje |
5d3771c |
%{__python3} setup.py nosetests
|
|
Nejc Saje |
5d3771c |
popd
|
|
Nejc Saje |
5d3771c |
%endif
|
|
Nejc Saje |
5d3771c |
|
|
Nejc Saje |
5d3771c |
|
|
Nejc Saje |
5d3771c |
%files
|
|
Nejc Saje |
5d3771c |
%doc README.md LICENSE.txt
|
|
Nejc Saje |
5d3771c |
%{python2_sitelib}/%{pypi_name}
|
|
Nejc Saje |
5d3771c |
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
|
|
Nejc Saje |
5d3771c |
|
|
Nejc Saje |
5d3771c |
%if 0%{?with_python3}
|
|
Nejc Saje |
5d3771c |
%files -n python3-%{pypi_name}
|
|
Nejc Saje |
5d3771c |
%doc README.md LICENSE.txt
|
|
Nejc Saje |
5d3771c |
%{python3_sitelib}/%{pypi_name}
|
|
Nejc Saje |
5d3771c |
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
|
|
Nejc Saje |
5d3771c |
%endif
|
|
Nejc Saje |
5d3771c |
|
|
Nejc Saje |
5d3771c |
%changelog
|
|
Nejc Saje |
3484695 |
* Thu Sep 11 2014 Nejc Saje <nsaje@redhat.com> - 1.2.5-2
|
|
Nejc Saje |
3484695 |
- Added six to build dependencies, needed during tests
|
|
Nejc Saje |
3484695 |
|
|
Nejc Saje |
5d3771c |
* Tue Sep 09 2014 Nejc Saje <nsaje@redhat.com> - 1.2.5-1
|
|
Nejc Saje |
5d3771c |
- Initial package.
|
|
Nejc Saje |
5d3771c |
|