%global srcname aexpect %if ! 0%{?commit0:1} # NOTE: upstream has a 1.2.0 tag, but the following commit includes # experimental support for python 3. This can go away when 1.3.0 is # released. %global commit0 aca459d332c90c8d2db521819a4e2f83fa0b7614 %endif %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) Name: %{srcname} # NOTE: upstream contains a 1.2.0 tag, but call this 1.2.1 until 1.3.0 is released. Version: 1.2.1 Release: 1%{?dist} Summary: A python library to control interactive applications Group: Development/Tools License: GPLv2 URL: https://github.com/autotest/aexpect # NOTE: revert Source0 URL when 1.3.0 is released. #Source0: https://github.com/autotest/%{srcname}/archive/%{version}.tar.gz#/%{srcname}-%{version}.tar.gz Source0: https://github.com/autotest/%{srcname}/archive/%{commit0}.tar.gz#/%{srcname}-%{shortcommit0}.tar.gz Patch1: aexpect-1.2.1-versionhack.patch BuildArch: noarch Requires: python Requires: python3 BuildRequires: python2-devel BuildRequires: python3-devel %description Aexpect is a python library used to control interactive applications, very similar to pexpect. You can use it to control applications such as ssh, scp sftp, telnet, among others. %package -n python2-%{srcname} Summary: %{summary} %{?python_provide:%python_provide python2-%{srcname}} %description -n python2-%{srcname} Aexpect is a python library used to control interactive applications, very similar to pexpect. You can use it to control applications such as ssh, scp sftp, telnet, among others. %package -n python3-%{srcname} Summary: %{summary} %{?python_provide:%python_provide python3-%{srcname}} %description -n python3-%{srcname} Aexpect is a python library used to control interactive applications, very similar to pexpect. You can use it to control applications such as ssh, scp sftp, telnet, among others. PYTHON 3 SUPPORT IS EXPERIMENTAL %prep # NOTE: revert the following when 1.3.0 is released. #autosetup -n %{srcname}-%{version} %autosetup -n %{srcname}-%{commit0} %build %py2_build %py3_build %install %py2_install %py3_install %check %if 0 # selftests are provided but skipped because they use unsupported tooling selftests/checkall %endif %files -n python2-%{srcname} %license LICENSE %doc README.rst %{python2_sitelib}/aexpect/ %{python2_sitelib}/aexpect-%{version}-py%{python2_version}.egg-info %{_bindir}/aexpect-helper %files -n python3-%{srcname} %license LICENSE %doc README.rst %{python3_sitelib}/aexpect/ %{python3_sitelib}/aexpect-%{version}-py%{python3_version}.egg-info %changelog * Wed Nov 09 2016 Merlin Mathesius - 1.2.1-1 - Initial packaging for Fedora.