diff --git a/.gitignore b/.gitignore index 89ee099..36a3eba 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /txaio-1.0.0.zip +/txaio-1.0.2.tar.gz diff --git a/python-txaio-1.0.0-sphinx-config_find-theme.patch b/python-txaio-1.0.0-sphinx-config_find-theme.patch deleted file mode 100644 index 25dc919..0000000 --- a/python-txaio-1.0.0-sphinx-config_find-theme.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- doc/conf.py 2015-07-19 15:31:44.680857807 +0200 -+++ doc/conf.py 2015-07-19 15:32:27.088335918 +0200 -@@ -16,6 +16,7 @@ - import sys - import os - import shlex -+import alabaster - - # If extensions (or modules to document with autodoc) are in another directory, - # add these directories to sys.path here. If the directory is relative to the -@@ -127,7 +128,7 @@ - #html_theme_options = {} - - # Add any paths that contain custom themes here, relative to this directory. --#html_theme_path = [] -+html_theme_path = [alabaster.get_path()] - - # The name for this set of Sphinx documents. If None, it defaults to - # " v documentation". diff --git a/python-txaio-1.0.2-sphinx-config_find-theme.patch b/python-txaio-1.0.2-sphinx-config_find-theme.patch new file mode 100644 index 0000000..69c2716 --- /dev/null +++ b/python-txaio-1.0.2-sphinx-config_find-theme.patch @@ -0,0 +1,19 @@ +--- doc/conf.py.orig 2015-08-08 15:43:06.296973317 +0200 ++++ doc/conf.py 2015-08-08 15:43:35.857320995 +0200 +@@ -16,6 +16,7 @@ + import sys + import os + import shlex ++import alabaster + + # If extensions (or modules to document with autodoc) are in another directory, + # add these directories to sys.path here. If the directory is relative to the +@@ -127,7 +128,7 @@ + #html_theme_options = {} + + # Add any paths that contain custom themes here, relative to this directory. +-#html_theme_path = [] ++html_theme_path = [alabaster.get_path()] + + # The name for this set of Sphinx documents. If None, it defaults to + # " v documentation". diff --git a/python-txaio.spec b/python-txaio.spec index 455b210..622bebf 100644 --- a/python-txaio.spec +++ b/python-txaio.spec @@ -1,17 +1,14 @@ %global pypi_name txaio Name: python-%{pypi_name} -Version: 1.0.0 -Release: 4%{?dist} +Version: 1.0.2 +Release: 1%{?dist} Summary: Compatibility API between asyncio/Twisted/Trollius License: MIT URL: https://pypi.python.org/pypi/%{pypi_name} -Source0: https://pypi.python.org/packages/source/t/%{pypi_name}/%{pypi_name}-%{version}.zip -# Release on pypi is missing a util file which is needed to launch tests -# See: https://github.com/tavendo/txaio/issues/3 -Source1: https://raw.githubusercontent.com/tavendo/txaio/v1.0.0/test/util.py -Patch0: python-txaio-1.0.0-sphinx-config_find-theme.patch +Source0: https://pypi.python.org/packages/source/t/%{pypi_name}/%{pypi_name}-%{version}.tar.gz +Patch0: python-txaio-%{version}-sphinx-config_find-theme.patch BuildArch: noarch @@ -67,13 +64,14 @@ asyncio. Documentation in html format. # Remove upstream's egg-info rm -rf %{pypi_name}.egg-info -cp %{SOURCE1} test/ +# README is just a symlink to index.rst. Using this file as README +rm README.rst +cp -a doc/index.rst README.rst %build -CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build - -CFLAGS="$RPM_OPT_FLAGS" %{__python2} setup.py build +%py2_build +%py3_build # Build documentation cd doc && make html @@ -87,9 +85,8 @@ ln -s /usr/share/javascript/jquery/latest/jquery.min.js _build/html/_static/jque %install -%{__python3} setup.py install --skip-build --root %{buildroot} - -%{__python2} setup.py install --skip-build --root %{buildroot} +%py2_install +%py3_install %check @@ -117,6 +114,10 @@ PYTHONPATH=$PYTHONPATH:. coverage2 run -p --source=txaio /usr/bin/py.test-%{pyth %changelog +* Sat Aug 8 2015 Julien Enselme - 1.0.2-1 +- Update to 1.0.2 +- Use %%py2_build, %%py3_build, %%py2_install and %%py2_install + * Tue Aug 4 2015 Julien Enselme - 1.0.0-4 - Correct sphinx theme name in BuildRequires diff --git a/sources b/sources index 4c7e11b..6591672 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -762755ba1ded4b7caf07247ab33efc5f txaio-1.0.0.zip +ed64939ff3b15ebac7d1ac8243083b38 txaio-1.0.2.tar.gz diff --git a/util.py b/util.py deleted file mode 100644 index 254df70..0000000 --- a/util.py +++ /dev/null @@ -1,40 +0,0 @@ -try: - import asyncio - from asyncio.test_utils import run_once as _run_once - - def run_once(): - return _run_once(asyncio.get_event_loop()) - -except ImportError as e: - try: - import trollius as asyncio - except ImportError: - asyncio = None - - def run_once(): - ''' - copied from asyncio.testutils because trollius has no - "testutils" - ''' - # in Twisted, this method is a no-op - if asyncio is None: - return - - # just like modern asyncio.testutils.run_once does it... - loop = asyncio.get_event_loop() - loop.stop() - loop.run_forever() - asyncio.gather(*asyncio.Task.all_tasks()) - - -try: - # XXX fixme hack better way to detect twisted - # (has to work on py3 where asyncio exists always, though) - import twisted # noqa - - def await(_): - return - -except ImportError: - def await(future): - asyncio.get_event_loop().run_until_complete(future)