Blob Blame History Raw
%global pypi_name pifpaf

%if 0%{?fedora} >= 24
%global with_python3 1
%endif

Name:           python-pifpaf
Version:        1.1.0
Release:        7%{?dist}
Summary:        Pifpaf is a suite of fixtures to manage daemons 
License:        ASL 2.0
URL:            https://github.com/jd/pifpaf
Source0:        https://pypi.io/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildArch:      noarch

%package -n python2-%{pypi_name}
Summary:        Pifpaf is a suite of fixtures to manage daemons
%{?python_provide:%python_provide python2-pifpaf}

BuildRequires:    python2-setuptools
BuildRequires:    python2-devel
BuildRequires:    python2-pbr

Requires:         python2-cliff
Requires:         python2-stevedore
Requires:         python2-pbr
Requires:         python2-six
Requires:         python2-fixtures
Requires:         python2-pyxattr
Requires:         python2-jinja2

%description -n python2-%{pypi_name}
Pifpaf is a suite of fixtures and a command-line tool that allows to start and
stop daemons for a quick throw-away usage.


%if 0%{?with_python3}
%package -n python3-%{pypi_name}

Summary:          Pifpaf is a suite of fixtures to manage daemons
%{?python_provide:%python_provide python3-pifpaf}

BuildRequires:    python3-setuptools
BuildRequires:    python3-devel
BuildRequires:    python3-pbr

Requires:         python3-cliff
Requires:         python3-stevedore
Requires:         python3-pbr
Requires:         python3-six
Requires:         python3-fixtures
Requires:         python3-pyxattr
Requires:         python3-jinja2

%description -n python3-%{pypi_name}
Pifpaf is a suite of fixtures and a command-line tool that allows to start and
stop daemons for a quick throw-away usage. 

%endif

%description
Pifpaf is a suite of fixtures and a command-line tool that allows to start and
stop daemons for a quick throw-away usage. 

%prep
%setup -q -n %{pypi_name}-%{version}

%build
%py2_build

%if 0%{?with_python3}
%py3_build
%endif

%install
%if 0%{?with_python3}
%py3_install
mv %{buildroot}%{_bindir}/pifpaf %{buildroot}%{_bindir}/pifpaf-%{python3_version}
ln -s ./pifpaf-%{python3_version} %{buildroot}%{_bindir}/pifpaf-3
%endif

%py2_install
mv %{buildroot}%{_bindir}/pifpaf %{buildroot}%{_bindir}/pifpaf-%{python2_version}
ln -s ./pifpaf-%{python2_version} %{buildroot}%{_bindir}/pifpaf-2

ln -s ./pifpaf-2 %{buildroot}%{_bindir}/pifpaf

%files -n python2-%{pypi_name}
%doc README.rst
%license LICENSE
%{_bindir}/pifpaf
%{_bindir}/pifpaf-2*
%{python2_sitelib}/*

%if 0%{?with_python3}
%files -n python3-%{pypi_name}
%doc README.rst
%license LICENSE
%{_bindir}/pifpaf-3*
%{python3_sitelib}/*
%endif


%changelog
* Sun Nov 18 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.1.0-7
- Drop explicit locale setting
  See https://fedoraproject.org/wiki/Changes/Remove_glibc-langpacks-all_from_buildroot

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

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

* Tue Mar 13 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.1.0-4
- Update Python 2 dependency declarations to new packaging standards
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)

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

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

* Wed May 03 2017 Pradeep Kilambi <pkilambi@redhat.com> - 1.1.0-1
- rebase to 1.1.0

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.24.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Wed Feb 08 2017 Pradeep Kilambi <pkilambi@redhat.com> - 0.24.1-1
- rebase to 0.24.0

* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.12.0-2
- Rebuild for Python 3.6

* Fri Jul 29 2016 Pradeep Kilambi <pkilambi@redhat.com> - 0.12.0-1
- rebase to 0.12.0

* Fri Jul 29 2016 Pradeep Kilambi <pkilambi@redhat.com> - 0.6.0-2
- dropped macros
- fixed python-xattr
- fixed python3 symlink binaries

* Thu Jun 23 2016 Pradeep Kilambi <pkilambi@redhat.com> - 0.6.0-1
- initial package release