diff --git a/python-execnet.changes b/python-execnet.changes index d5a2ed5..1c3074c 100644 --- a/python-execnet.changes +++ b/python-execnet.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Apr 21 20:01:07 UTC 2017 - aloisio@gmx.com + +- Converted to single-spec +- Enabled tests + ------------------------------------------------------------------- Wed Feb 24 10:48:05 UTC 2016 - osynge@suse.com diff --git a/python-execnet.spec b/python-execnet.spec index bc71f46..e714c82 100644 --- a/python-execnet.spec +++ b/python-execnet.spec @@ -1,7 +1,7 @@ # # spec file for package python-execnet # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,6 +16,7 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-execnet Version: 1.4.1 Release: 0 @@ -23,20 +24,20 @@ Summary: Rapid multi-Python deployment License: MIT Group: Development/Libraries/Python Url: http://codespeak.net/execnet/ -Source0: https://pypi.python.org/packages/source/e/execnet/execnet-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-build - -BuildRequires: python-Sphinx -BuildRequires: python-devel -BuildRequires: python-pytest -BuildRequires: python-setuptools -BuildRequires: python-setuptools_scm +Source0: https://files.pythonhosted.org/packages/source/e/execnet/execnet-%{version}.tar.gz +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools_scm} +BuildRequires: %{python_module setuptools} +# test requirements +BuildRequires: %{python_module apipkg} +BuildRequires: %{python_module pytest} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildRequires: python3-Sphinx Requires: python-apipkg -%if 0%{?suse_version} && 0%{?suse_version} <= 1110 -%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%else +BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch -%endif +%python_subpackages %description execnet provides a share-nothing model with @@ -51,30 +52,37 @@ API targetting the following uses: %prep %setup -q -n execnet-%{version} +sed -i "1d" execnet/script/shell.py execnet/script/socketserver.py %package doc Summary: Documentation and examples for %{name} Group: Documentation/Other %description doc -Documentation and examples for %{name}. +This package contains documentation and examples for %{name}. %build -python setup.py build build_sphinx +%python_build +# fix non-executable-script error +sed -i "1d" execnet/script/shell.py execnet/script/socketserver.py %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install +%{_python_use_flavor python3} +%__python3 setup.py build_sphinx +rm build/sphinx/html/.buildinfo build/sphinx/html/objects.inv +%python_expand %fdupes -s %{buildroot}%{$python_sitelib} -# Tests actually fail (posophe) -#%check -#python setup.py test +%check +%python_expand PYTHONPATH=build/lib py.test-%{$python_version} -r s -k"-test_gateway" testing -%files +%files %{python_files} %defattr(-,root,root,-) %doc CHANGELOG LICENSE README.txt -%{python_sitelib}/* +%{python_sitelib}/execnet +%{python_sitelib}/execnet-%{version}-py%{python_version}.egg-info -%files doc +%files %{python_files doc} %defattr(-,root,root,-) %doc build/sphinx/html