Blob Blame History Raw
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}

%define modname zope.configuration

%if 0%{?fedora}
%global with_python3 1
%endif

Name:           python-zope-configuration
Version:        4.0.3
Release:        4%{?dist}
Summary:        Zope Configuration Markup Language (ZCML)

Group:          Development/Libraries
License:        ZPLv2.1
URL:            http://pypi.python.org/pypi/zope.configuration
Source0:        http://pypi.python.org/packages/source/z/%{modname}/%{modname}-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:      noarch

BuildRequires:  python2-devel
BuildRequires:  python-setuptools
BuildRequires:  python-zope-schema
BuildRequires:  python-zope-interface
BuildRequires:  python-zope-i18nmessageid
BuildRequires:  python-zope-testing

%if 0%{?with_python3}
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildRequires:  python3-zope-schema
BuildRequires:  python3-zope-interface
BuildRequires:  python3-zope-i18nmessageid
BuildRequires:  python3-zope-testing
%endif

Requires:  python-zope-schema
Requires:  python-zope-interface
Requires:  python-zope-i18nmessageid

%description
The zope configuration system provides an extensible system for supporting
various kinds of configurations.

It is based on the idea of configuration directives. Users of the configuration
system provide configuration directives in some language that express
configuration choices. The intent is that the language be pluggable. An XML
language is provided by default.

%if 0%{?with_python3}
%package -n python3-zope-configuration
Summary:        Zope Configuration Markup Language (ZCML)
Group:          Development/Libraries

Requires:  python3-zope-schema
Requires:  python3-zope-interface
Requires:  python3-zope-i18nmessageid

%description -n python3-zope-configuration
The zope configuration system provides an extensible system for supporting
various kinds of configurations.

It is based on the idea of configuration directives. Users of the configuration
system provide configuration directives in some language that express
configuration choices. The intent is that the language be pluggable. An XML
language is provided by default.
%endif

%prep
%setup -q -n %{modname}-%{version}
rm -rf %{modname}.egg-info

%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
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
popd
%endif
%{__python} setup.py install -O1 --skip-build --root %{buildroot}


%check
%{__python} setup.py test
%{__rm} -r %{buildroot}%{python_sitelib}/zope/configuration/tests

%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py test
%{__rm} -r %{buildroot}%{python3_sitelib}/zope/configuration/tests
popd
%endif

%files
%doc README.rst LICENSE.txt COPYRIGHT.txt CHANGES.rst
%{python_sitelib}/zope/configuration/
%{python_sitelib}/%{modname}*

%if 0%{?with_python3}
%files -n python3-zope-configuration
%doc README.rst LICENSE.txt COPYRIGHT.txt CHANGES.rst
%{python3_sitelib}/zope/configuration/
%{python3_sitelib}/%{modname}*
%endif

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

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

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

* Sun May 04 2014 Luke Macken <lmacken@redhat.com> - 4.0.3-1
- Update to 4.0.3

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

* Tue Feb 12 2013 Ralph Bean <rbean@redhat.com> - 4.0.2-1
- Latest upstream
- Added python3 subpackage
- Removed clean section
- Removed defattr

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

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

* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.7.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Sat Jan  2 2010 Luke Macken <lmacken@redhat.com> - 3.7.2-1
- Initial package