From e5272b08ede15ecb753aa568ed9ab00c1715f96d Mon Sep 17 00:00:00 2001 From: Julien Enselme Date: Oct 01 2016 18:59:14 +0000 Subject: Fix tests for pytest3 and doc for sphinx 1.4.8 --- diff --git a/fix-doc-sphinx-1.4.8.patch b/fix-doc-sphinx-1.4.8.patch new file mode 100644 index 0000000..81566a8 --- /dev/null +++ b/fix-doc-sphinx-1.4.8.patch @@ -0,0 +1,41 @@ +diff --git i/README.rst w/README.rst +index f9084df..52e9769 100644 +--- i/README.rst ++++ w/README.rst +@@ -1,10 +1,6 @@ + txaio + ===== + +-| |Version| |Downloads| |Build Status| |Coverage| |Docs| +- +--------------- +- + **txaio** is a helper library for writing code that runs unmodified on + both `Twisted `_ and `asyncio `_ / `Trollius `_. + +@@ -58,25 +54,3 @@ Code like the following can then run on *either* system: + # ... + txaio.resolve(f0, "value") + txaio.reject(f1, RuntimeError("it failed")) +- +- +-.. |Version| image:: https://img.shields.io/pypi/v/txaio.svg +- :target: https://pypi.python.org/pypi/txaio +- +-.. |Downloads| image:: https://img.shields.io/pypi/dm/txaio.svg +- :target: https://pypi.python.org/pypi/txaio +- +-.. |GitHub Stars| image:: https://img.shields.io/github/stars/crossbario/txaio.svg?style=social&label=Star +- :target: https://github.com/crossbario/txaio +- +-.. |Master Branch| image:: https://img.shields.io/badge/branch-master-orange.svg +- :target: https://travis-ci.org/crossbario/txaio.svg?branch=master +- +-.. |Build Status| image:: https://travis-ci.org/crossbario/txaio.svg?branch=master +- :target: https://travis-ci.org/crossbario/txaio +- +-.. |Coverage| image:: https://img.shields.io/codecov/c/github/crossbario/txaio/master.svg +- :target: https://codecov.io/github/crossbario/txaio +- +-.. |Docs| image:: https://img.shields.io/badge/docs-latest-brightgreen.svg?style=flat +- :target: http://txaio.readthedocs.org/en/latest/ diff --git a/fix-pytest3.patch b/fix-pytest3.patch new file mode 100644 index 0000000..4e8cb3a --- /dev/null +++ b/fix-pytest3.patch @@ -0,0 +1,21 @@ +From e48a9096c90686245d2e00f7957fd2058eb8101d Mon Sep 17 00:00:00 2001 +From: Julien Enselme +Date: Sat, 1 Oct 2016 20:41:59 +0200 +Subject: [PATCH] Fix tests to run on pytest 3 and pytest 2 + +--- + test/conftest.py | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/test/conftest.py b/test/conftest.py +index a79a27f..4a225c8 100644 +--- a/test/conftest.py ++++ b/test/conftest.py +@@ -1,7 +1,5 @@ + import pytest + +-pytest_plugins = "" +- + # here's a little voodoo -- any generic tests depend on this 'framework' + # fixture, which (sneakily using internal-only APIs) ensures that each + # tests runs twice: once enabled for Twisted and once enabled for diff --git a/python-txaio.spec b/python-txaio.spec index b7169cb..e8154bf 100644 --- a/python-txaio.spec +++ b/python-txaio.spec @@ -9,6 +9,10 @@ License: MIT URL: https://pypi.python.org/pypi/%{pypi_name} Source0: https://pypi.python.org/packages/source/t/%{pypi_name}/%{pypi_name}-%{version}.tar.gz Patch0: python-txaio-%{version}-tests.patch +# Reported upstream. See: https://github.com/crossbario/txaio/pull/78 +Patch1: fix-pytest3.patch +# Error reported upstream. See: https://github.com/sphinx-doc/sphinx/issues/2999 +Patch2: fix-doc-sphinx-1.4.8.patch BuildArch: noarch BuildRequires: python2-devel @@ -80,6 +84,8 @@ asyncio. Documentation in html format. %prep %setup -qn %{pypi_name}-%{version} %patch0 +%patch1 -p1 +%patch2 -p1 # Remove upstream's egg-info rm -rf %{pypi_name}.egg-info @@ -110,9 +116,8 @@ ln -s /usr/share/javascript/jquery/latest/jquery.min.js _build/html/_static/jque %check -PYTHONPATH=$PYTHONPATH:. coverage3 run -p --source=txaio /usr/bin/py.test-%{python3_version} -s - -PYTHONPATH=$PYTHONPATH:. coverage2 run -p --source=txaio /usr/bin/py.test-%{python2_version} -s +PYTHONPATH=$PYTHONPATH:$(pwd):$(pwd)/test coverage3 run -p --source=txaio /usr/bin/py.test-%{python3_version} -s +PYTHONPATH=$PYTHONPATH:$(pwd):$(pwd)/test coverage2 run -p --source=txaio /usr/bin/py.test-%{python2_version} -s %files -n python2-%{pypi_name} @@ -134,6 +139,10 @@ PYTHONPATH=$PYTHONPATH:. coverage2 run -p --source=txaio /usr/bin/py.test-%{pyth %changelog +* Sat Oct 01 2016 Julien Enselme - 2.5.1-2 +- Fix tests for pytest3 +- Correct build of documentation with sphinx 1.4.8 + * Tue Jul 19 2016 Fedora Release Engineering - 2.5.1-2 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages