%if 0%{?fedora} %global with_python3 1 %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())")} %endif %global pkgname remoto Name: python-%{pkgname} Version: 0.0.30 Release: 3%{?dist} Summary: Execute remote commands or processes License: MIT URL: https://github.com/alfredodeza/remoto Source0: https://files.pythonhosted.org/packages/source/r/%{pkgname}/%{pkgname}-%{version}.tar.gz 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 %global _description\ Execute remote commands or processes. %description %_description %package -n python2-%{pkgname} Summary: %summary Requires: python-execnet >= 1.2.0 %{?python_provide:%python_provide python2-%{pkgname}} %description -n python2-%{pkgname} %_description %if 0%{?with_python3} %package -n python3-%{pkgname} Summary: Execute remote commands or processes Group: Development/Languages Requires: python3 Requires: python3-execnet >= 1.2.0 %description -n python3-%{pkgname} Execute remote commands or processes. %endif # with_python3 %prep %setup -q -n %{pkgname}-%{version} %if 0%{?with_python3} cp -a . %{py3dir} %endif # with_python3 %build %{__python2} setup.py build %if 0%{?with_python3} pushd %{py3dir} %{__python3} setup.py build popd %endif # with_python3 %install %{__python2} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT %if 0%{?with_python3} pushd %{py3dir} %{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT popd %endif # with_python3 %check 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 -n python2-%{pkgname} %license LICENSE %doc README.rst %{python2_sitelib}/* %if 0%{?with_python3} %files -n python3-%{pkgname} %{python3_sitelib}/* %license LICENSE %doc README.rst %endif # with_python3 %changelog * Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek - 0.0.30-3 - Python 2 binary package renamed to python2-remoto See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3 * Thu Jul 27 2017 Fedora Release Engineering - 0.0.30-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Thu Jul 06 2017 Ken Dreyer 0.0.30-1 - Update to 0.0.30 (rhbz#1468070) - Vendored library is gone upstream, no need for REMOTO_NO_VENDOR - rm Group tag * Sat Feb 11 2017 Fedora Release Engineering - 0.0.29-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Mon Dec 19 2016 Miro Hrončok - 0.0.29-3 - Rebuild for Python 3.6 * Tue Jul 19 2016 Fedora Release Engineering - 0.0.29-2 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages * Tue Jun 28 2016 Ken Dreyer - 0.0.29-1 - Update to remoto 0.0.29 (rhbz#1347889) * Mon May 16 2016 Ken Dreyer - 0.0.28-1 - Update to remoto 0.0.28 (rhbz#1335338) - Update Source0 URL for pypi breakage (see https://bitbucket.org/pypa/pypi/issues/438/backwards-compatible-un-hashed-package) * Thu Feb 04 2016 Fedora Release Engineering - 0.0.27-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Fri Jan 08 2016 Ken Dreyer - 0.0.27-1 - Update to remoto 0.0.27 (rhbz#1296748) - Use %%license macro - Drop unneeded %%python_sitelib definition * Tue Nov 10 2015 Fedora Release Engineering - 0.0.25-3 - Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 * Thu Jun 18 2015 Fedora Release Engineering - 0.0.25-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Tue Apr 21 2015 Ken Dreyer - 0.0.25-1 - Update to remoto-0.0.25 - rm python3_version compat macro; this has been defined since F13 - Remove pre-existing .pyc files during %%prep * 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) - Use HTTPS for homepage * Fri Sep 12 2014 Federico Simoncelli 0.0.21-1 - update remoto-0.0.21 * Fri Aug 1 2014 Federico Simoncelli 0.0.19-1 - update to remoto-0.0.19 * Fri Jun 27 2014 Federico Simoncelli 0.0.17-2 - specfile cleanups * Sun Jun 22 2014 Federico Simoncelli 0.0.17-1 - initial build