From d4965dd02a13b734366a6b6e43f3d77ba0e4ca4d Mon Sep 17 00:00:00 2001 From: Ken Dreyer Date: Jan 05 2015 17:41:41 +0000 Subject: Update to remoto-0.0.24 - Add Group tag - Enable tests during %check (RHBZ #1178930) - Add python3 subpackage --- diff --git a/.gitignore b/.gitignore index a8b79ed..f29053e 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /remoto-0.0.19.tar.xz /remoto-0.0.21.tar.xz /remoto-0.0.23.tar.gz +/remoto-0.0.24.tar.gz diff --git a/python-remoto-0.0.23-LICENSE b/python-remoto-0.0.23-LICENSE deleted file mode 100644 index 3589596..0000000 --- a/python-remoto-0.0.23-LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) -Copyright (c) 2013 Alfredo Deza - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/python-remoto.spec b/python-remoto.spec index 7c17544..b98ea08 100644 --- a/python-remoto.spec +++ b/python-remoto.spec @@ -1,3 +1,10 @@ +%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} + +%if 0%{?fedora} +%global with_python3 1 +%{!?python3_version: %global python3_version %(%{__python3} -c "import sys; sys.stdout.write(sys.version[:3])")} +%endif + %if 0%{?rhel} && 0%{?rhel} <= 6 %{!?__python2: %global __python2 /usr/bin/python2} %{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} @@ -6,49 +13,102 @@ %global pkgname remoto Name: python-%{pkgname} -Version: 0.0.23 +Version: 0.0.24 Release: 1%{?dist} Summary: Execute remote commands or processes +Group: Development/Languages License: MIT URL: https://github.com/alfredodeza/remoto Source0: https://pypi.python.org/packages/source/r/%{pkgname}/%{pkgname}-%{version}.tar.gz -# From https://raw.githubusercontent.com/alfredodeza/remoto/master/LICENSE -# See https://github.com/alfredodeza/remoto/pull/9 for the upstream fix -Source1: python-remoto-0.0.23-LICENSE BuildArch: noarch +BuildRequires: pytest BuildRequires: python2-devel +BuildRequires: python-execnet >= 1.2.0 +BuildRequires: python-mock BuildRequires: python-setuptools +%if 0%{?with_python3} +BuildRequires: python3-devel +BuildRequires: python3-pytest +BuildRequires: python3-execnet >= 1.2.0 +BuildRequires: python3-mock +BuildRequires: python3-setuptools +%endif # with_python3 Requires: python-execnet >= 1.2.0 %description Execute remote commands or processes. +%if 0%{?with_python3} +%package -n python3-remoto +Summary: Execute remote commands or processes +Group: Development/Languages +Requires: python3 +Requires: python3-execnet >= 1.2.0 + +%description -n python3-remoto +Execute remote commands or processes. +%endif # with_python3 %prep %setup -q -n %{pkgname}-%{version} -# Until upstream ships the full text of the MIT license in a released pkg, we -# will ship the copy from Git master. -cp -p %{SOURCE1} LICENSE +%if 0%{?with_python3} +cp -a . %{py3dir} +%endif # with_python3 %build REMOTO_NO_VENDOR=1 %{__python2} setup.py build +%if 0%{?with_python3} +pushd %{py3dir} +REMOTO_NO_VENDOR=1 %{__python3} setup.py build +popd +%endif # with_python3 %install REMOTO_NO_VENDOR=1 %{__python2} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT +%if 0%{?with_python3} +pushd %{py3dir} +REMOTO_NO_VENDOR=1 %{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT +popd +%endif # with_python3 + + +%check +export REMOTO_NO_VENDOR=1 +export PYTHONPATH=$(pwd) + +py.test-%{python_version} -v remoto/tests + +%if 0%{?with_python3} +pushd %{py3dir} +py.test-%{python3_version} -v remoto/tests +popd +%endif # with_python3 %files %doc LICENSE README.rst %{python2_sitelib}/* +%if 0%{?with_python3} +%files -n python3-remoto +%{python3_sitelib}/* +%doc LICENSE README.rst +%endif # with_python3 + %changelog +* Mon Jan 05 2015 Ken Dreyer - 0.0.24-1 +- Update to remoto-0.0.24 +- Add Group tag +- Enable tests during %%check (RHBZ #1178930) +- Add python3 subpackage + * Fri Dec 12 2014 Ken Dreyer - 0.0.23-1 - Update to remoto-0.0.23 (RHBZ #1146478) - Use pypi URL for Source0 (requires LICENSE file to be shipped separately) diff --git a/sources b/sources index f46b0f8..0ecf4f3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -845a4ccdb09f77e359aad62e6e034157 remoto-0.0.23.tar.gz +f605551603d9b04e8d754fbb5140315b remoto-0.0.24.tar.gz