Blob Blame History Raw

%if 0%{?fedora} || 0%{?rhel} > 7
%global with_python3 1
%endif

%global desc This tool provides code to load WSGI applications and servers from\
URIs; these URIs can refer to Python Eggs for INI-style configuration\
files.  PasteScript provides commands to serve applications based on\
this configuration file.
%global sum Load, configure, and compose WSGI applications and servers

Name:           python-paste-deploy
Version:        2.0.1
Release:        1%{?dist}
Summary:        %{sum}
License:        MIT
URL:            https://github.com/Pylons/pastedeploy
Source0:        %{url}/archive/%{version}/PasteDeploy-%{version}.tar.gz
BuildArch:      noarch

# 1.5.0+ dropped Python 2.4 support
BuildRequires:  python2-devel > 2.4
BuildRequires:  python2-pytest
BuildRequires:  python2-pytest-runner
BuildRequires:  python2-setuptools

%if 0%{?with_python3}
BuildRequires:  python3-devel
BuildRequires:  python3-pytest
BuildRequires:  python3-pytest-runner
BuildRequires:  python3-setuptools
%endif


%description
%{desc}


%package -n python2-paste-deploy
Summary:        %{sum}

Requires:       python2-paste
Requires:       python2-setuptools

%{?python_provide:%python_provide python2-paste-deploy}


%description -n python2-paste-deploy
%{desc}


%if 0%{?with_python3}
%package -n python3-paste-deploy
Summary:        %{sum}

Requires:       python3-paste
Requires:       python3-setuptools

%{?python_provide:%python_provide python3-paste-deploy}


%description -n python3-paste-deploy
%desc

%endif


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

# Remove bundled egg-info if it exists
rm -rf *.egg-info


%build
%py2_build

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


%install
%py2_install
rm -rf %{buildroot}%{python2_sitelib}/test

%if 0%{?with_python3}
%py3_install
rm -rf %{buildroot}%{python3_sitelib}/test
%endif


%check
python2 setup.py test
python3 setup.py test


%files -n python2-paste-deploy
%license license.txt
%doc docs/*
%{python2_sitelib}/*

%if 0%{?with_python3}
%files -n python3-paste-deploy
%license license.txt
%doc docs/*
%{python3_sitelib}/*
%endif


%changelog
* Wed Jun 05 2019 Randy Barlow <bowlofeggs@fedoraproject.org> - 2.0.1-1
- Update to 2.0.1.

* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.2-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Mon Jul 16 2018 Dan Callaghan <dcallagh@redhat.com> - 1.5.2-17
- invoke Python 2 explicitly, use modern Python RPM macros

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

* Sun Jun 17 2018 Miro HronĨok <mhroncok@redhat.com> - 1.5.2-15
- Rebuilt for Python 3.7

* Mon Feb 12 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.5.2-14
- 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.5.2-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild