From ee92a4c0923e5fc8db9735b409134326c0800a2a Mon Sep 17 00:00:00 2001 From: Alfredo Moralejo Date: Jun 04 2019 09:35:35 +0000 Subject: Update to 1.0.1 and remove python2 subpackages totally tinyrpc 1.0.0 does not longer support python2. Also ignored some tests failing with pytest > 4 [1] [1] https://github.com/mbr/tinyrpc/issues/75 --- diff --git a/.gitignore b/.gitignore index 36fb7cf..be90bd7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /0.5.tar.gz /tinyrpc-0.5-1f38ac7.tar.gz /0.9.1.tar.gz +/59ccf62452b3f37e8411ff0309a3a99857d05e19.tar.gz diff --git a/python-tinyrpc.spec b/python-tinyrpc.spec index 283a602..82a3a2d 100644 --- a/python-tinyrpc.spec +++ b/python-tinyrpc.spec @@ -1,98 +1,30 @@ - -%if 0%{?rhel} == 7 -%bcond_with python3 -%bcond_without python2 -%else -%bcond_with python2 -%bcond_without python3 -%endif - %global library tinyrpc %global module tinyrpc +# There is no tag for 1.0.1 https://github.com/mbr/tinyrpc/issues/76 +%global commit 59ccf62452b3f37e8411ff0309a3a99857d05e19 + Name: python-%{library} -Version: 0.9.1 -Release: 5%{?dist} +Version: 1.0.1 +Release: 1%{?dist} Summary: A modular RPC library License: MIT URL: https://github.com/mbr/%{library} -Source0: https://github.com/mbr/%{library}/archive/%{version}.tar.gz +# tarball in pypy does not include tests +Source0: https://github.com/mbr/%{library}/archive/%{commit}.tar.gz BuildArch: noarch %description tinyrpc is a library for making and handling RPC calls in python. -%if %{with python2} -%package -n python2-%{library} -Summary: A modular RPC library -%{?python_provide:%python_provide python2-%{library}} - -BuildRequires: python2-devel -BuildRequires: python2-setuptools -BuildRequires: git -BuildRequires: python2-funcsigs -BuildRequires: python2-gevent -BuildRequires: python2-greenlet -BuildRequires: python2-mock -BuildRequires: python2-py -BuildRequires: python2-pytest -BuildRequires: python2-requests -BuildRequires: python2-six -BuildRequires: python2-sphinx -%if 0%{?fedora} || 0%{?rhel} > 7 -BuildRequires: python2-werkzeug -BuildRequires: python2-zmq -%else -BuildRequires: python-werkzeug -BuildRequires: python-zmq -%endif - -Requires: python2-funcsigs -Requires: python2-gevent -Requires: python2-greenlet -Requires: python2-requests -Requires: python2-six -%if 0%{?fedora} || 0%{?rhel} > 7 -Requires: python2-werkzeug -Requires: python2-zmq -%else -Requires: python-werkzeug -Requires: python-zmq -%endif - -%description -n python2-%{library} -tinyrpc is a library for making and handling RPC calls in python. - - -%package -n python2-%{library}-tests -Summary: Tests for python2-tinyrpc library - -Requires: python2-funcsigs -Requires: python2-gevent -Requires: python2-greenlet -Requires: python2-mock -Requires: python2-py -Requires: python2-pytest -Requires: python2-requests -Requires: python2-six -Requires: python2-werkzeug -Requires: python2-zmq -Requires: python2-%{library} = %{version}-%{release} - - -%description -n python2-%{library}-tests -Tests for python2-tinyrpc library -%endif - %package -n python-%{library}-doc Summary: Documentation for tinyrpc library %description -n python-%{library}-doc Documentation for tinyrpc library -%if 0%{?with_python3} %package -n python3-%{library} Summary: A modular RPC library %{?python_provide:%python_provide python3-%{library}} @@ -108,10 +40,10 @@ BuildRequires: python3-pytest BuildRequires: python3-requests BuildRequires: python3-six BuildRequires: python3-sphinx +BuildRequires: python3-sphinx_rtd_theme BuildRequires: python3-werkzeug BuildRequires: python3-zmq -Requires: python3-funcsigs Requires: python3-gevent Requires: python3-greenlet Requires: python3-requests @@ -141,68 +73,34 @@ Requires: python3-%{library} = %{version}-%{release} %description -n python3-%{library}-tests Tests for python2-tinyrpc library -%endif # with_python3 - %prep -%autosetup -n %{library}-%{version} -S git +%autosetup -n %{library}-%{commit} -S git +# requirements.txt is wrong, let's manage deps manually +rm -f requirements.txt %build -%if %{with python2} -%py2_build -%endif -%if 0%{?with_python3} %py3_build -%endif # generate html docs -%if %{with python2} -%{__python2} setup.py build_sphinx -%else %{__python3} setup.py build_sphinx -%endif # remove the sphinx-build leftovers rm -rf build/sphinx/html/.{doctrees,buildinfo} %install -%if %{with python2} -%py2_install -# Copy tests -mkdir -p %{buildroot}%%{python2_sitelib}/%{library}/tests -cp -r tests %{buildroot}%{python2_sitelib}/%{library}/tests -%endif -%if 0%{?with_python3} %py3_install # Copy tests mkdir -p %{buildroot}%%{python3_sitelib}/%{library}/tests cp -r tests %{buildroot}%{python3_sitelib}/%{library}/tests -%endif %check export PYTHONPATH=. -%if %{with python2} -py.test -rs --ignore=tests/test_wsgi_transport.py -%endif -%if 0%{?with_python3} -py.test-3 -rs --ignore=tests/test_wsgi_transport.py -%endif - -%if %{with python2} -%files -n python2-%{library} -%license LICENSE -%{python2_sitelib}/%{module} -%{python2_sitelib}/%{module}-*.egg-info -%exclude %{python2_sitelib}/%{module}/tests - -%files -n python2-%{library}-tests -%license LICENSE -%{python2_sitelib}/%{module}/tests -%endif +# Disable test_dispatch because of https://github.com/mbr/tinyrpc/issues/75 +py.test-3 -rs --ignore=tests/test_wsgi_transport.py --ignore=tests/test_dispatch.py %files -n python-%{library}-doc %license LICENSE %doc build/sphinx/html README.rst -%if 0%{?with_python3} %files -n python3-%{library} %license LICENSE %{python3_sitelib}/%{module} @@ -212,9 +110,12 @@ py.test-3 -rs --ignore=tests/test_wsgi_transport.py %files -n python3-%{library}-tests %license LICENSE %{python3_sitelib}/%{module}/tests -%endif # with_python3 %changelog +* Tue Jun 04 2019 Alfredo Moralejo - 1.0.1-1 +- Update to 1.0.1 +- Remove python2 subpackages as tinyrpc > 1 does not support python2. + * Sat Feb 02 2019 Fedora Release Engineering - 0.9.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild diff --git a/sources b/sources index e46533f..7dc4246 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (0.9.1.tar.gz) = fe9bd74bb8f9258f23d012497657ff22c59d38928f750796e7cfe17ade948536b7cf6c26636e1d665fbbb3dd233350207cc685d1f86d6a761f8e029dd90f2d40 +SHA512 (59ccf62452b3f37e8411ff0309a3a99857d05e19.tar.gz) = 246954f8ae125eb85fdd8b175189918827879ab7c0660c373b13b1ffe0b67dfa116ab8f284e2aa8a40b85a8702415a7c50c09fb4d1725dd22586eaa825b9164f