Blob Blame History Raw
%global pypi_name port-for
%global name_with_underscore port_for
%global sum Utility that helps with local TCP ports management

Name:           python-%{pypi_name}
Version:        0.4
Release:        6%{?dist}
Summary:        %{sum}

License:        MIT
URL:            https://pypi.python.org/pypi/%{pypi_name}
Source0:        https://pypi.python.org/packages/cd/68/57f6d5cae15125acc0f3e2a5117de5e2d83f4e96c4d97e088122557b3d70/%{pypi_name}-%{version}.tar.gz

BuildArch:      noarch
BuildRequires:  python2-devel python3-devel

%description
It can find an unused TCP local host port and remember the association.

%package -n python2-%{pypi_name}
Summary:        %{sum}
%{?python_provide:%python_provide python2-%{pypi_name}}

%description -n python2-%{pypi_name}
It can find an unused TCP local host port and remember the association.

%package -n python3-%{pypi_name}
Summary:        %{sum}
%{?python_provide:%python_provide python3-%{pypi_name}}

%description -n python3-%{pypi_name}
It can find an unused TCP local host port and remember the association.

%prep
%autosetup -n %{pypi_name}-%{version} 

%build
%py2_build
%py3_build

%install
%py3_install
mv %{buildroot}%{_bindir}/%{pypi_name} %{buildroot}%{_bindir}/%{pypi_name}-3
%py2_install

%files -n python2-%{pypi_name}
%doc README.rst
%license LICENSE.txt
%{python2_sitelib}/%{name_with_underscore}
%{python2_sitelib}/%{name_with_underscore}-%{version}-py?.?.egg-info
%{_bindir}/%{pypi_name}

%files -n python3-%{pypi_name}
%doc README.rst
%license LICENSE.txt
%{python3_sitelib}/%{name_with_underscore}
%{python3_sitelib}/%{name_with_underscore}-%{version}-py?.?.egg-info
%{_bindir}/%{pypi_name}-3

%changelog
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.4-5
- Rebuilt for Python 3.7

* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Sun Dec 17 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.4-3
- Fix creation of python2- subpackage

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Fri Jul 21 2017 Sundeep Anand <suanand@redhat.com> - 0.4-1
- Update to upstream version 0.4

* Wed Jan 27 2016 Sundeep Anand <suanand@redhat.com> - 0.3.1-2
- Fix binary shebang in python3 package

* Fri Jan 22 2016 Sundeep Anand <suanand@redhat.com> - 0.3.1-1
- Initial RPM Package