Blob Blame Raw
# Disable automatic dependencies generation
# It fails for xattr as pyxattr provices pyxattr, not xattr
%{?python_disable_dependency_generator}

%global pypi_name pifpaf

%if 0%{?fedora} || 0%{?rhel} > 7
%bcond_with    python2
%bcond_without python3
%else
%bcond_without python2
%bcond_with    python3
%endif

Name:           python-pifpaf
Version:        2.2.2
Release:        3%{?dist}
Summary:        Pifpaf is a suite of fixtures to manage daemons 
License:        ASL 2.0
URL:            https://github.com/jd/pifpaf
Source0:        https://files.pythonhosted.org/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.tar.gz

BuildArch:      noarch

%if %{with python2}
%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-daiquiri
Requires:         python2-psutil
Requires:         python2-pbr
Requires:         python2-six
Requires:         python2-fixtures
Requires:         python2-jinja2

%if 0%{?rhel} <= 7
Requires:         python-click
Requires:         pyxattr
%else
Requires:         python2-click
Requires:         python2-pyxattr
%endif

%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.

%endif


%if %{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-click
Requires:         python3-daiquiri
Requires:         python3-psutil
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
%if %{with python2}
%py2_build
%endif

%if %{with python3}
%py3_build
%endif

%install
%if %{with python2}
%py2_install
%endif

%if %{with python3}
%py3_install
%endif


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

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

%changelog
* Thu Feb 07 2019 Javier Peña <jpena@redhat.com> - 2.2.2-3
- Fix dependencies when building on RHEL 7

* Fri Feb 01 2019 Alfredo Moralejo <amoralej@redhat.com> - 2.2.2-2
- Disable automatic dependencies generation.

* Fri Feb 01 2019 Javier Peña <jpena@redhat.com> - 2.2.2-1
- Rebase to 2.2.2
- Drop python2 subpackage in Fedora

* 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