6cdb41c
%if 0%{?rhel} && 0%{?rhel} <= 6
6cdb41c
%{!?__python2:        %global __python2 /usr/bin/python2}
6cdb41c
%{!?python2_sitelib:  %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
6cdb41c
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
6cdb41c
%endif
6cdb41c
86571ee
%if 0%{?fedora}
86571ee
%global with_python3 1
86571ee
%{!?py3ver: %global py3ver %(%{__python3} -c "import sys ; print(sys.version[:3])")}
86571ee
%endif
6cdb41c
%{!?py2ver: %global py2ver %(%{__python2} -c "import sys ; print sys.version[:3]")}
86571ee
86571ee
0b89d3a
%global modname zc.buildout
0b89d3a
0b89d3a
Summary: System for managing development buildouts
86571ee
Name: python-zc-buildout
82d9b30
Version: 2.4.0
82d9b30
Release: 1%{?dist}
0b89d3a
Source0: http://pypi.python.org/packages/source/z/%{modname}/%{modname}-%{version}.tar.gz
0b89d3a
License: ZPLv2.1
0b89d3a
Group: Development/Libraries
0b89d3a
BuildArch: noarch
0b89d3a
URL: http://buildout.org
0b89d3a
86571ee
BuildRequires:  python2-devel
86571ee
BuildRequires:  python-setuptools
86571ee
86571ee
BuildRequires:  python-zope-testing
86571ee
BuildRequires:  python-nose
86571ee
BuildRequires:  python-manuel
1b7d31b
BuildRequires:  python-six
86571ee
0c205b2
%if 0%{?with_python3}
86571ee
BuildRequires:  python3-devel
86571ee
BuildRequires:  python3-setuptools
86571ee
86571ee
BuildRequires:  python3-zope-testing
86571ee
BuildRequires:  python3-nose
86571ee
BuildRequires:  python3-manuel
1b7d31b
BuildRequires:  python3-six
86571ee
%endif
86571ee
0b89d3a
Requires: python-setuptools
0b89d3a
0b89d3a
%description
0b89d3a
The Buildout project provides support for creating applications,
0b89d3a
especially Python applications.  It provides tools for assembling
0b89d3a
applications from multiple parts, Python or otherwise.  An application
0b89d3a
may actually contain multiple programs, processes, and configuration
0b89d3a
settings.
0b89d3a
0c205b2
%if 0%{?with_python3}
86571ee
%package -n python3-zc-buildout
86571ee
Summary: System for managing development buildouts
86571ee
Group: Development/Libraries
86571ee
86571ee
Requires: python3-setuptools
86571ee
86571ee
%description -n python3-zc-buildout
86571ee
The Buildout project provides support for creating applications,
86571ee
especially Python applications.  It provides tools for assembling
86571ee
applications from multiple parts, Python or otherwise.  An application
86571ee
may actually contain multiple programs, processes, and configuration
86571ee
settings.
86571ee
%endif
86571ee
0b89d3a
%prep
0b89d3a
%setup -q -n %{modname}-%{version}
0b89d3a
86571ee
rm -rf %{modname}.egg*
86571ee
86571ee
%if 0%{?with_python3}
86571ee
rm -rf %{py3dir}
86571ee
cp -a . %{py3dir}
86571ee
%endif
86571ee
0b89d3a
%build
6cdb41c
%{__python2} setup.py build
86571ee
%if 0%{?with_python3}
86571ee
pushd %{py3dir}
86571ee
%{__python3} setup.py build
86571ee
popd
86571ee
%endif
0b89d3a
0b89d3a
%install
0b89d3a
rm -rf $RPM_BUILD_ROOT
86571ee
%if 0%{?with_python3}
86571ee
pushd %{py3dir}
86571ee
%{__python3} setup.py install -O1 --skip-build --root=%{buildroot}
b63c0be
mv %{buildroot}%{_bindir}/buildout %{buildroot}%{_bindir}/python3-buildout
86571ee
popd
86571ee
%endif
6cdb41c
%{__python2} setup.py install -O1 --skip-build --root=%{buildroot}
86571ee
c58be18
%check
6cdb41c
PYTHONPATH=%{buildroot}%{python2_sitelib} %{__python2} setup.py nosetests
c58be18
c58be18
%if 0%{?with_python3}
c58be18
pushd %{py3dir}
c58be18
PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} setup.py nosetests
c58be18
popd
c58be18
%endif
86571ee
0b89d3a
0b89d3a
%files
0b89d3a
%defattr(-,root,root,-)
6cdb41c
%doc CHANGES.rst README.rst DEVELOPERS.txt
6cdb41c
%{python2_sitelib}/%(echo %{modname} | sed -r 's|\.|/|')
6cdb41c
%dir %{python2_sitelib}/zc/
0b89d3a
%{_bindir}/buildout
6cdb41c
%exclude %{python2_sitelib}/%(echo %{modname} | sed -r 's|\.|/|')/*.txt
6cdb41c
%{python2_sitelib}/%{modname}-*.egg-info
6cdb41c
%{python2_sitelib}/%{modname}-*-nspkg.pth
0b89d3a
86571ee
%if 0%{?with_python3}
86571ee
%files -n python3-zc-buildout
6cdb41c
%doc CHANGES.rst README.rst DEVELOPERS.txt
86571ee
%{python3_sitelib}/%(echo %{modname} | sed -r 's|\.|/|')
86571ee
%dir %{python3_sitelib}/zc/
b63c0be
%{_bindir}/python3-buildout
86571ee
%exclude %{python3_sitelib}/%(echo %{modname} | sed -r 's|\.|/|')/*.txt
86571ee
%{python3_sitelib}/%{modname}-*.egg-info
86571ee
%{python3_sitelib}/%{modname}-*-nspkg.pth
86571ee
%endif
86571ee
0b89d3a
0b89d3a
%changelog
82d9b30
* Wed Jul 01 2015 Ralph Bean <rbean@redhat.com> - 2.4.0-1
82d9b30
- new version
82d9b30
0ef29d5
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.1-2
0ef29d5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
0ef29d5
285a17a
* Thu May 14 2015 Ralph Bean <rbean@redhat.com> - 2.3.1-1
285a17a
- new version
285a17a
43e102a
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.1-4
43e102a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
43e102a
04240fc
* Wed May 14 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 2.2.1-3
04240fc
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
04240fc
0c205b2
* Wed Jan 29 2014 Ralph Bean <rbean@redhat.com> - 2.2.1-2
0c205b2
- Fix two broken with_python3 conditionals.
0c205b2
- Remove odd exclude statement.
0c205b2
6cdb41c
* Wed Jan 29 2014 Ralph Bean <rbean@redhat.com> - 2.2.1-1
6cdb41c
- Latest upstream.
6cdb41c
- Modernize python macros.
6cdb41c
- Drop todo.txt, no longer shipped by upstream.
6cdb41c
fa72e41
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.0-2
fa72e41
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
fa72e41
7f949b9
* Fri Jul  5 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 2.2.0-1
7f949b9
- Update to buildout 2.2.0 which has support for setuptools-0.8
7f949b9
b63c0be
* Tue Mar 26 2013 Ralph Bean <rbean@redhat.com> - 2.1.0-3
b63c0be
- Fixed py2/py3 conflict over %%{_bindir}/buildout.
b63c0be
1b7d31b
* Mon Mar 25 2013 Ralph Bean <rbean@redhat.com> - 2.1.0-2
1b7d31b
- Add BuildRequires on python-six where python-manuel doesn't pull it in.
1b7d31b
c58be18
* Sun Mar 24 2013 Ralph Bean <rbean@redhat.com> - 2.1.0-1
c58be18
- Latest upstream
c58be18
- Uncommented %%check section.  Got it working!
c58be18
86571ee
* Mon Feb 25 2013 Ralph Bean <rbean@redhat.com> - 2.0.1-1
86571ee
- Latest upstream.
86571ee
- Added python3 subpackage.
86571ee
- Added %%check section but left it commented out (not working under mock).
86571ee
dbe772b
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.2-4
dbe772b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
dbe772b
7cf49a7
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.2-3
7cf49a7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
7cf49a7
ad1c14f
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.2-2
ad1c14f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
ad1c14f
0b89d3a
* Thu Jan 27 2011 Robin Lee <cheeselee@fedoraproject.org> - 1.5.2-1
0b89d3a
- 1.5.2
0b89d3a
- Don't use sed command in Source0 URI
0b89d3a
- Remove the doctest text files.
0b89d3a
- Clean up obsolete lines
0b89d3a
0b89d3a
* Wed Sep  1 2010 Robin Lee <robinlee.sysu@gmail.com> - 1.5.1-1
0b89d3a
- Update to 1.5.1
0b89d3a
- Own %%{python_sitelib}/zc/
0b89d3a
- Remove python-zope-filesystem from requirements
0b89d3a
0b89d3a
* Sun Jul  4 2010 Robin Lee <robinlee.sysu@gmail.com> - 1.4.3-1
0b89d3a
- Initial packaging