%if 0%{?fedora}
%global with_python3 1
%endif
%global modname pyramid
%global sum The Pyramid web application framework, a Pylons project
%global desc Pyramid is a small, fast, down-to-earth, open source Python web development\
framework. It makes real-world web application development and deployment more\
fun, more predictable, and more productive.
%{?python_enable_dependency_generator}
Name: python-%{modname}
Version: 1.10.4
Release: 1%{?dist}
Summary: %{sum}
License: BSD
URL: https://trypyramid.com/
Source0: %pypi_source %{modname}
BuildArch: noarch
BuildRequires: python2-chameleon >= 1.2.3
BuildRequires: python2-mako >= 0.3.6
BuildRequires: python2-repoze-lru >= 0.4
BuildRequires: python2-venusian >= 1.0
BuildRequires: python2-webtest
BuildRequires: python2-zope-deprecation >= 3.5.0
BuildRequires: python2-devel
BuildRequires: python2-docutils
BuildRequires: python2-hupper
BuildRequires: python2-plaster
BuildRequires: python2-plaster-pastedeploy
BuildRequires: python2-setuptools
BuildRequires: python2-translationstring
BuildRequires: python2-venusian >= 1.0
BuildRequires: python2-zope-component >= 3.6.0
BuildRequires: python2-zope-configuration
BuildRequires: python2-zope-interface >= 3.8.0
%if 0%{?fedora}
BuildRequires: python2-webob >= 1.8.3
%else
BuildRequires: python-webob1.8 >= 1.8.3
%endif
%if 0%{?with_python3}
BuildRequires: python3-chameleon >= 1.2.3
BuildRequires: python3-devel
BuildRequires: python3-docutils
BuildRequires: python3-hupper
BuildRequires: python3-mako
BuildRequires: python3-plaster
BuildRequires: python3-plaster-pastedeploy
BuildRequires: python3-setuptools
BuildRequires: python3-translationstring
BuildRequires: python3-venusian >= 1.0
BuildRequires: python3-webtest
BuildRequires: python3-zope-component >= 3.6.0
BuildRequires: python3-zope-configuration
BuildRequires: python3-zope-deprecation >= 3.5.0
BuildRequires: python3-zope-interface
%if 0%{?fedora}
BuildRequires: python3-webob >= 1.8.3
%else
BuildRequires: python3-webob1.8 >= 1.8.3
%endif
%endif
%description
%{desc}
%package -n python2-pyramid
Summary: %{sum}
%{?python_provide:%python_provide python2-pyramid}
%description -n python2-pyramid
%{desc}
%if 0%{?with_python3}
%package -n python3-pyramid
Summary: %{sum}
%{?python_provide:%python_provide python3-pyramid}
%description -n python3-pyramid
%{desc}
%endif
%prep
%autosetup -n pyramid-%{version} -p1
# Remove bundled egg info
rm -rf %{modname}.egg-info
%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
%endif
%build
%if 0%{?with_python3}
pushd %{py3dir}
%py3_build
popd
%endif
%py2_build
%install
%if 0%{?with_python3}
pushd %{py3dir}
%py3_install
# Create the Python 3 executables.
for e in pcreate pserve prequest proutes pshell ptweens pviews pdistreport; do
mv %{buildroot}/%{_bindir}/$e %{buildroot}/%{_bindir}/$e-%{python3_version};
ln -s %{_bindir}/$e-%{python3_version} %{buildroot}/%{_bindir}/$e-3;
done;
popd
%endif
%py2_install
# Create the Python 2 executables.
for e in pcreate pserve prequest proutes pshell ptweens pviews pdistreport; do
mv %{buildroot}/%{_bindir}/$e %{buildroot}/%{_bindir}/$e-%{python2_version};
ln -s %{_bindir}/$e-%{python2_version} %{buildroot}/%{_bindir}/$e-2;
ln -s %{_bindir}/$e-%{python2_version} %{buildroot}/%{_bindir}/$e
done;
%check
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py test
popd
%endif
%if 0%{?rhel} && 0%{?rhel} <= 6
# Tests on el6 fail for unknown reasons.
%else
%{__python2} setup.py test
%endif
%files -n python2-pyramid
%license LICENSE.txt
%doc README.rst
%{python2_sitelib}/%{modname}/
%{python2_sitelib}/%{modname}-%{version}*.egg-info
%{_bindir}/pcreate
%{_bindir}/pcreate-%{python2_version}
%{_bindir}/pcreate-2
%{_bindir}/pdistreport
%{_bindir}/pdistreport-%{python2_version}
%{_bindir}/pdistreport-2
%{_bindir}/prequest
%{_bindir}/prequest-%{python2_version}
%{_bindir}/prequest-2
%{_bindir}/proutes
%{_bindir}/proutes-%{python2_version}
%{_bindir}/proutes-2
%{_bindir}/pserve
%{_bindir}/pserve-%{python2_version}
%{_bindir}/pserve-2
%{_bindir}/pshell
%{_bindir}/pshell-%{python2_version}
%{_bindir}/pshell-2
%{_bindir}/ptweens
%{_bindir}/ptweens-%{python2_version}
%{_bindir}/ptweens-2
%{_bindir}/pviews
%{_bindir}/pviews-%{python2_version}
%{_bindir}/pviews-2
%if 0%{?with_python3}
%files -n python3-pyramid
%license LICENSE.txt
%doc README.rst
%{python3_sitelib}/%{modname}/
%{python3_sitelib}/%{modname}-%{version}*.egg-info
%{_bindir}/pcreate-%{python3_version}
%{_bindir}/pcreate-3
%{_bindir}/pdistreport-%{python3_version}
%{_bindir}/pdistreport-3
%{_bindir}/prequest-%{python3_version}
%{_bindir}/prequest-3
%{_bindir}/proutes-%{python3_version}
%{_bindir}/proutes-3
%{_bindir}/pserve-%{python3_version}
%{_bindir}/pserve-3
%{_bindir}/pshell-%{python3_version}
%{_bindir}/pshell-3
%{_bindir}/ptweens-%{python3_version}
%{_bindir}/ptweens-3
%{_bindir}/pviews-%{python3_version}
%{_bindir}/pviews-3
%endif
%changelog
* Thu Apr 18 2019 Miro Hrončok <mhroncok@redhat.com> - 1.10.4-1
- Update to 1.10.4 (#1699203) to fix Python 3.8 test failures (#1698157)
* Tue Mar 26 2019 Randy Barlow <bowlofeggs@fedoraproject.org> - 1.10.2-1
- Update to 1.10.2.
- https://docs.pylonsproject.org/projects/pyramid/en/1.10-branch/changes.html
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Wed Jul 25 2018 Pierre-Yves Chibon <pingou@pingoured.fr> - 1.9.2-1
- Update to 1.9.2
- Require webob >= 1.7.0
* Wed Jul 25 2018 Pierre-Yves Chibon <pingou@pingoured.fr> - 1.9.1-7
- Use the py2 version of the macros
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Mon Jun 18 2018 Miro Hrončok <mhroncok@redhat.com> - 1.9.1-5
- Rebuilt for Python 3.7
* Wed Feb 28 2018 Randy Barlow <bowlofeggs@fedoraproject.org> - 1.9.1-4
- Use /usr/bin/python2 instead of /usr/bin/python when building.
* Tue Feb 27 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.9.1-3
- 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.9.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild