Blob Blame Raw
%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%endif

Name:           python-ZConfig
Version:        2.9.0
Release:        1%{?dist}
Summary:        Structured Configuration Library
Group:          Development/Languages
License:        ZPLv2.1
URL:            http://www.zope.org/Members/fdrake/zconfig/
Source0:        http://pypi.python.org/packages/source/Z/ZConfig/ZConfig-%{version}.zip
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildArch:      noarch
BuildRequires:  python2-devel
BuildRequires:  python-setuptools
# for tests, not available in Fedora
#BuildRequires:  python-zope-testrunner


%description
ZConfig is a configuration library intended for general use. It supports
a hierarchical schema-driven configuration model that allows a schema to
specify data conversion routines written in Python. ZConfig's model is
very different from the model supported by the ConfigParser module found
in Python's standard library, and is more suitable to
configuration-intensive applications.


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


%build
%{__python} setup.py build


%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
rm -f $RPM_BUILD_ROOT%{python_sitelib}/ZConfig/*.txt


#%%check
# Tests require zope.testrunner not yet available in Fedora
#%{__python} setup.py test

 
%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc COPYRIGHT.txt LICENSE.txt NEWS.txt README.txt doc/zconfig.pdf
%doc ZConfig/*.txt
%{python_sitelib}/*
%exclude %{python_sitelib}/ZConfig/tests/
%{_bindir}/zconfig
%{_bindir}/zconfig_schema2html


%changelog
* Wed Mar 30 2011 Robin Lee <cheeselee@fedoraproject.org> - 2.9.0-1
- Update to 2.9.0 (#689762)
- Exclude the tests

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.8.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 2.8.0-4
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild

* Wed Jun 16 2010 Robin Lee <robinlee.sysu@gmail.com> - 2.8.0-3
- Workaround of installation

* Wed Jun 16 2010 Robin Lee <robinlee.sysu@gmail.com> - 2.8.0-2
- Retag

* Wed Jun 16 2010 Robin Lee <robinlee.sysu@gmail.com> - 2.8.0-1
- 2.8.0
- BR: python-zope-testing removed
- More docs included

* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Thu Jun 18 2009 Conrad Meyer <konrad@tylerc.org> - 2.7.1-1
- New version.

* Sun Dec 14 2008 Conrad Meyer <konrad@tylerc.org> - 2.6.1-1
- Initial package.