Blob Blame History Raw
%global modname zope.configuration
%global desc 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.
%global sum Zope Configuration Markup Language (ZCML)


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

Name:           python-zope-configuration
Version:        4.0.3
Release:        13%{?dist}
Summary:        %{sum}

Group:          Development/Libraries
License:        ZPLv2.1
URL:            https://github.com/zopefoundation/zope.configuration
Source0:        %{url}/archive/4.0.3/%{modname}-%{version}.tar.gz
BuildArch:      noarch

BuildRequires:  python2-devel
BuildRequires:  python2-setuptools
BuildRequires:  python2-zope-schema
BuildRequires:  python2-zope-interface
BuildRequires:  python2-zope-i18nmessageid
BuildRequires:  python2-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


%description
%{desc}


%package -n python2-zope-configuration
Summary:        %{sum}

Requires:  python2-zope-schema
Requires:  python2-zope-interface
Requires:  python2-zope-i18nmessageid

%{?python_provide:%python_provide python2-zope-configuration}


%description -n python2-zope-configuration
%{desc}


%if 0%{?with_python3}
%package -n python3-zope-configuration
Summary:        %{sum}
Group:          Development/Libraries

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

%{?python_provide:%python_provide python3-zope-configuration}


%description -n python3-zope-configuration
%{desc}
%endif

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

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


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

%if 0%{?with_python3}
pushd %{py3dir}
# The tests do not pass with Python 3.6 as has been documented upstream:
# https://github.com/zopefoundation/zope.configuration/issues/16
# Thus, we will only run the tests on Python 2 for now.
%{__rm} -r %{buildroot}%{python3_sitelib}/zope/configuration/tests
popd
%endif


%files -n python2-zope-configuration
%license COPYRIGHT.txt LICENSE.txt
%doc README.rst CHANGES.rst
%{python2_sitelib}/zope/configuration/
%{python2_sitelib}/%{modname}*

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

%changelog
* Sun Jun 17 2018 Miro Hrončok <mhroncok@redhat.com> - 4.0.3-13
- Rebuilt for Python 3.7

* Wed Jan 31 2018 Iryna Shcherbina <ishcherb@redhat.com> - 4.0.3-12
- Update Python 2 dependency declarations to new packaging standards
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)

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

* Fri Feb 24 2017 Randy Barlow <bowlofeggs@fedoraproject.org> - 4.0.3-10
- The python2- subpackage now provides the python- name.
- Correct a changelog entry from the last build not to use a macro.

* Fri Feb 24 2017 Randy Barlow <bowlofeggs@fedoraproject.org> - 4.0.3-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
- Disabled tests in Python 3 due to them failing upstream.
- Mark the license with the license macro.
- Rename python-zope-configuration to python2-zope-configuration.
- Used GitHub as new URL and Source0 since the old URLs were 404.
- Dropped BuildRoot.
- Use global instead of define for modname variable.

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

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

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

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

* 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