diff --git a/.python-memcached.metadata b/.python-memcached.metadata index b256c8c..58ba889 100644 --- a/.python-memcached.metadata +++ b/.python-memcached.metadata @@ -1 +1 @@ -cdb72f0f27135298ff06c8e41e50a0c10b027002 SOURCES/python-memcached-1.48.tar.gz +af1084ab344065b6cd5321738649c724a32d0389 SOURCES/1.59.tar.gz diff --git a/SPECS/python-memcached.spec b/SPECS/python-memcached.spec index 0525da2..be4f3ab 100644 --- a/SPECS/python-memcached.spec +++ b/SPECS/python-memcached.spec @@ -1,58 +1,171 @@ -%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} - Name: python-memcached -Version: 1.48 -Release: 4%{?dist} +Version: 1.59 +Release: 3%{?dist} Summary: A Python memcached client library -Group: Development/Languages License: Python -URL: http://www.tummy.com/Community/software/python-memcached/ -Source0: ftp://ftp.tummy.com/pub/python-memcached/python-memcached-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +URL: https://github.com/linsomniac/python-memcached +Source0: https://github.com/linsomniac/python-memcached/archive/%{version}.tar.gz BuildArch: noarch -BuildRequires: python-devel, python-setuptools +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-six # Required for running test suite -BuildRequires: memcached +BuildRequires: %{_bindir}/memcached +BuildRequires: python3-pytest -%description -This software is a 100% Python interface to the memcached memory cache -daemon. It is the client side software which allows storing values in one -or more, possibly remote, memcached servers. Search google for memcached +%global _description\ +This software is a 100% Python interface to the memcached memory cache\ +daemon. It is the client side software which allows storing values in one\ +or more, possibly remote, memcached servers. Search google for memcached\ for more information. +%description %_description + + +%package -n python3-memcached +Summary: %summary +%{?python_provide:%python_provide python3-memcached} + +%description -n python3-memcached %_description + + %prep -%setup -q -n %{name}-%{version} +%autosetup -n %{name}-%{version} + +# Fix version information +sed -i 's/1\.58/1\.59/' memcache.py + +# Use the standard library mock instead of the external one +sed -i -e 's/^import mock/from unittest import mock/' \ + tests/test_memcache.py + %build -%{__python} setup.py build +%py3_build + %install -rm -rf $RPM_BUILD_ROOT -%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT +%py3_install -%clean -rm -rf $RPM_BUILD_ROOT %check -pushd $RPM_BUILD_ROOT/%{python_sitelib} pidfile=$(mktemp) -/usr/bin/memcached -d -P $pidfile -%{__python} memcache.py +memcached -d -P $pidfile + +%pytest + kill $(cat $pidfile) -popd -%files -%defattr(-,root,root,-) -%doc ChangeLog README -%attr(755,root,root) %{python_sitelib}/memcache.py -%{python_sitelib}/memcache.py[co] -%{python_sitelib}/python_memcached-%{version}-py*.egg-info/ + +%files -n python3-memcached +%doc ChangeLog README.md +%attr(755,root,root) %{python3_sitelib}/memcache.py +%{python3_sitelib}/memcache.py +%{python3_sitelib}/__pycache__/memcache.* +%{python3_sitelib}/python_memcached-%{version}-py*.egg-info/ + %changelog -* Fri Dec 27 2013 Daniel Mach - 1.48-4 -- Mass rebuild 2013-12-27 +* Mon Feb 08 2021 Charalampos Stratakis - 1.59-3 +- Enable testing with pytest and use the github tarball + +* Wed Jan 27 2021 Fedora Release Engineering - 1.59-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Mon Sep 14 2020 Joel Capitao - 1.59-1 +- Update to 1.59 + +* Wed Jul 29 2020 Fedora Release Engineering - 1.58-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Sat May 23 2020 Miro Hrončok - 1.58-13 +- Rebuilt for Python 3.9 + +* Thu Jan 30 2020 Fedora Release Engineering - 1.58-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Tue Sep 17 2019 Miro Hrončok - 1.58-11 +- Subpackage python2-memcached has been removed + See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal + +* Fri Aug 16 2019 Miro Hrončok - 1.58-10 +- Rebuilt for Python 3.8 + +* Fri Jul 26 2019 Fedora Release Engineering - 1.58-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sat Feb 02 2019 Fedora Release Engineering - 1.58-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Sat Jul 14 2018 Fedora Release Engineering - 1.58-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Sat Jun 16 2018 Miro Hrončok - 1.58-6 +- Rebuilt for Python 3.7 + +* Wed May 23 2018 Miro Hrončok - 1.58-5 +- Merge with the Python 3 package +- Run upstream tests + +* Fri Feb 09 2018 Fedora Release Engineering - 1.58-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Fri Jan 26 2018 Iryna Shcherbina - 1.58-3 +- Update Python 2 dependency declarations to new packaging standards + (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) + +* Sun Dec 17 2017 Zbigniew Jędrzejewski-Szmek - 1.58-2 +- Python 2 binary package renamed to python2-memcached + See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3 + +* Tue Aug 29 2017 Haïkel Guémar - 1.58-1 +- Upstream 1.58 + +* Thu Jul 27 2017 Fedora Release Engineering - 1.54-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat Feb 11 2017 Fedora Release Engineering - 1.54-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Tue Jul 19 2016 Fedora Release Engineering - 1.54-4 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + +* Tue Mar 8 2016 Haïkel Guémar - 1.54-3 +- Use versioned python macros + +* Thu Feb 04 2016 Fedora Release Engineering - 1.54-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Sat Dec 26 2015 Kevin Fenzi - 1.54-1 +- Update to 1.54 + +* Thu Jun 18 2015 Fedora Release Engineering - 1.53-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 1.53-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Tue Oct 15 2013 Stephen Gallagher - 1.53-1 +- New upstream release 1.53 +- Fixing set_multi() so that if the server closes the connection it will no + longer raise AttributeError +- readline() now will mark the connection dead if the read fails +- Changing check_keys to use re.match() instead of str.translate(), because + re.match() works with Python < 2.6 +- Add a MANIFEST.in file +- Client() now takes a "check_keys" option, which defaults to True +- Converting control character checking of keys based on performance testing of + alternatives +- Converted unicode tests from using u'' +- Doing a "set" after server goes away, raised AttributeError: 'NoneType' + object has no attribute 'sendall' +- incr/decr return None instead of 0 on server connection failure +- Supports IPv6 connections using: "inet6:[fd00::32:19f7]:11000" + +* Sun Aug 04 2013 Fedora Release Engineering - 1.48-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Thu Feb 14 2013 Fedora Release Engineering - 1.48-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild @@ -106,7 +219,7 @@ popd - Removing PKG-INFO from doc. - Fixing summary. - Removing setuptools build dependency. -- Changing permissions of memcache module to +- Changing permissions of memcache module to * Sat Jun 09 2007 Sean Reifschneider 1.36-2 - Adding python-devel build requirement.