Blob Blame Raw
%if 0%{?rhel} && 0%{?rhel} <= 6
%{!?__python2:        %global __python2 /usr/bin/python2}
%{!?python2_sitelib:  %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%endif

%if 0%{?fedora}
%global with_python3 1
%{!?py3ver: %global py3ver %(%{__python3} -c "import sys ; print(sys.version[:3])")}
%endif
%{!?py2ver: %global py2ver %(%{__python2} -c "import sys ; print sys.version[:3]")}


%global modname zc.buildout

Summary: System for managing development buildouts
Name: python-zc-buildout
Version: 2.5.3
Release: 9%{?dist}
Source0: https://pypi.io/packages/source/z/%{modname}/%{modname}-%{version}.tar.gz
License: ZPLv2.1
Group: Development/Libraries
BuildArch: noarch
URL: http://buildout.org

BuildRequires:  python2-devel
BuildRequires:  python2-setuptools

BuildRequires:  python2-zope-testing
BuildRequires:  python2-nose
BuildRequires:  python2-manuel
BuildRequires:  python2-six

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

BuildRequires:  python3-zope-testing
BuildRequires:  python3-nose
BuildRequires:  python3-manuel
BuildRequires:  python3-six
%endif

%global _description\
The Buildout project provides support for creating applications,\
especially Python applications.  It provides tools for assembling\
applications from multiple parts, Python or otherwise.  An application\
may actually contain multiple programs, processes, and configuration\
settings.

%description %_description

%package -n python2-zc-buildout
Summary: %summary
Requires: python2-setuptools
%{?python_provide:%python_provide python2-zc-buildout}

%description -n python2-zc-buildout %_description

%if 0%{?with_python3}
%package -n python3-zc-buildout
Summary: System for managing development buildouts
Group: Development/Libraries

Requires: python3-setuptools

%description -n python3-zc-buildout
The Buildout project provides support for creating applications,
especially Python applications.  It provides tools for assembling
applications from multiple parts, Python or otherwise.  An application
may actually contain multiple programs, processes, and configuration
settings.
%endif

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

rm -rf %{modname}.egg*

%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
%endif

%build
%{__python2} setup.py build
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py build
popd
%endif

%install
rm -rf $RPM_BUILD_ROOT
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install -O1 --skip-build --root=%{buildroot}
mv %{buildroot}%{_bindir}/buildout %{buildroot}%{_bindir}/python3-buildout
popd
%endif
%{__python2} setup.py install -O1 --skip-build --root=%{buildroot}

%check
PYTHONPATH=%{buildroot}%{python2_sitelib} %{__python2} setup.py nosetests

%if 0%{?with_python3}
pushd %{py3dir}
PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} setup.py nosetests
popd
%endif


%files -n python2-zc-buildout
%doc CHANGES.rst README.rst DEVELOPERS.txt
%{python2_sitelib}/%(echo %{modname} | sed -r 's|\.|/|')
%dir %{python2_sitelib}/zc/
%{_bindir}/buildout
%exclude %{python2_sitelib}/%(echo %{modname} | sed -r 's|\.|/|')/*.txt
%{python2_sitelib}/%{modname}-*.egg-info
%{python2_sitelib}/%{modname}-*-nspkg.pth

%if 0%{?with_python3}
%files -n python3-zc-buildout
%doc CHANGES.rst README.rst DEVELOPERS.txt
%{python3_sitelib}/%(echo %{modname} | sed -r 's|\.|/|')
%dir %{python3_sitelib}/zc/
%{_bindir}/python3-buildout
%exclude %{python3_sitelib}/%(echo %{modname} | sed -r 's|\.|/|')/*.txt
%{python3_sitelib}/%{modname}-*.egg-info
%{python3_sitelib}/%{modname}-*-nspkg.pth
%endif


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

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

* Wed Feb 28 2018 Iryna Shcherbina <ishcherb@redhat.com> - 2.5.3-7
- 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> - 2.5.3-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 2.5.3-5
- Python 2 binary package renamed to python2-zc-buildout
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3

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

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

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

* Tue Sep 27 2016 Ralph Bean <rbean@redhat.com> - 2.5.3-1
- new version

* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.1-2
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Thu Apr 28 2016 Ralph Bean <rbean@redhat.com> - 2.5.1-1
- new version

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.7-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.7-2
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5

* Sat Oct 31 2015 Ralph Bean <rbean@redhat.com> - 2.4.7-1
- new version

* Wed Oct 28 2015 Ralph Bean <rbean@redhat.com> - 2.4.6-1
- new version

* Thu Oct 15 2015 Ralph Bean <rbean@redhat.com> - 2.4.5-1
- new version

* Fri Oct 02 2015 Ralph Bean <rbean@redhat.com> - 2.4.4-1
- new version

* Wed Sep 16 2015 Ralph Bean <rbean@redhat.com> - 2.4.3-1
- new version

* Wed Jul 01 2015 Ralph Bean <rbean@redhat.com> - 2.4.0-1
- new version

* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Thu May 14 2015 Ralph Bean <rbean@redhat.com> - 2.3.1-1
- new version

* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Wed May 14 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 2.2.1-3
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4

* Wed Jan 29 2014 Ralph Bean <rbean@redhat.com> - 2.2.1-2
- Fix two broken with_python3 conditionals.
- Remove odd exclude statement.

* Wed Jan 29 2014 Ralph Bean <rbean@redhat.com> - 2.2.1-1
- Latest upstream.
- Modernize python macros.
- Drop todo.txt, no longer shipped by upstream.

* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Fri Jul  5 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 2.2.0-1
- Update to buildout 2.2.0 which has support for setuptools-0.8

* Tue Mar 26 2013 Ralph Bean <rbean@redhat.com> - 2.1.0-3
- Fixed py2/py3 conflict over %%{_bindir}/buildout.

* Mon Mar 25 2013 Ralph Bean <rbean@redhat.com> - 2.1.0-2
- Add BuildRequires on python-six where python-manuel doesn't pull it in.

* Sun Mar 24 2013 Ralph Bean <rbean@redhat.com> - 2.1.0-1
- Latest upstream
- Uncommented %%check section.  Got it working!

* Mon Feb 25 2013 Ralph Bean <rbean@redhat.com> - 2.0.1-1
- Latest upstream.
- Added python3 subpackage.
- Added %%check section but left it commented out (not working under mock).

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Thu Jan 27 2011 Robin Lee <cheeselee@fedoraproject.org> - 1.5.2-1
- 1.5.2
- Don't use sed command in Source0 URI
- Remove the doctest text files.
- Clean up obsolete lines

* Wed Sep  1 2010 Robin Lee <robinlee.sysu@gmail.com> - 1.5.1-1
- Update to 1.5.1
- Own %%{python_sitelib}/zc/
- Remove python-zope-filesystem from requirements

* Sun Jul  4 2010 Robin Lee <robinlee.sysu@gmail.com> - 1.4.3-1
- Initial packaging