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


%global modname zc.buildout

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

BuildRequires:  python2-devel
BuildRequires:  python-setuptools

BuildRequires:  python-zope-testing
BuildRequires:  python-nose
BuildRequires:  python-manuel

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

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

Requires: python-setuptools

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

%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
python setup.py build
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py build
popd
%endif

%install
rm -rf $RPM_BUILD_ROOT
python setup.py install -O1 --skip-build --root=%{buildroot}
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install -O1 --skip-build --root=%{buildroot}
popd
%endif

#%%check
#%%if 0%%{?rhel}
#PYTHONPATH=$(pwd) nosetests src/zc/buildout/tests.py
#%%else
#PYTHONPATH=$(pwd) nosetests-%%{py2ver} src/zc/buildout/tests.py
#%%endif
#
#%%if 0%%{?with_python3}
#pushd %%{py3dir}
#PYTHONPATH=$(pwd) nosetests-%%{py3ver} src/zc/buildout/tests.py
#popd
#%%endif


%files
%defattr(-,root,root,-)
%doc CHANGES.rst README.rst todo.txt DEVELOPERS.txt
%{python_sitelib}/%(echo %{modname} | sed -r 's|\.|/|')
%dir %{python_sitelib}/zc/
%{_bindir}/buildout
%exclude %{_usr}/README.rst
%exclude %{python_sitelib}/%(echo %{modname} | sed -r 's|\.|/|')/*.txt
%{python_sitelib}/%{modname}-*.egg-info
%{python_sitelib}/%{modname}-*-nspkg.pth

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


%changelog
* 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