818804d
%if 0%{?rhel} && 0%{?rhel} <= 6
818804d
%{!?__python2:        %global __python2 /usr/bin/python2}
818804d
%{!?python2_sitelib:  %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
818804d
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
818804d
%endif
818804d
5d9cc5d
%global modname zope.schema
5d9cc5d
2a7bbf9
%if 0%{?fedora}
2a7bbf9
%global with_python3 1
2a7bbf9
%endif
2a7bbf9
5d9cc5d
Summary: Zope 3 schemas
5d9cc5d
Name: python-zope-schema
587286e
Version: 4.4.2
537b0dc
Release: 7%{?dist}
818804d
Source0: http://pypi.python.org/packages/source/z/%{modname}/%{modname}-%{version}.tar.gz
5d9cc5d
License: ZPLv2.1
5d9cc5d
Group: Development/Libraries
5d9cc5d
BuildArch: noarch
5d9cc5d
URL: http://pypi.python.org/pypi/zope.schema
5d9cc5d
2a7bbf9
1e9ff79
%description
1e9ff79
This package is a zope.interface extension for defining data schemas.
1e9ff79
1e9ff79
%package -n python2-zope-schema
1e9ff79
Summary:        Zope 3 schemas
1e9ff79
Group:          Development/Libraries
1e9ff79
%{?python_provide:%python_provide python2-zope-schema}
1e9ff79
1e9ff79
BuildRequires: python2-sphinx
5d9cc5d
BuildRequires: python2-devel
1e9ff79
BuildRequires: python2-setuptools
1e9ff79
BuildRequires: python2-zope-event
5d9cc5d
# For tests
5d9cc5d
BuildRequires: python-zope-testing
5d9cc5d
BuildRequires: python-zope-interface
2a7bbf9
1e9ff79
Requires: python2-zope-interface
1e9ff79
Requires: python2-zope-event
5d9cc5d
1e9ff79
%description -n python2-zope-schema
5d9cc5d
This package is a zope.interface extension for defining data schemas.
5d9cc5d
2a7bbf9
%if 0%{?with_python3}
2a7bbf9
%package -n python3-zope-schema
2a7bbf9
Summary:        Zope 3 schemas
2a7bbf9
Group:          Development/Libraries
1e9ff79
%{?python_provide:%python_provide python3-zope-schema}
1e9ff79
1e9ff79
BuildRequires: python3-devel
1e9ff79
BuildRequires: python3-setuptools
1e9ff79
# For tests
1e9ff79
BuildRequires: python3-zope-testing
1e9ff79
BuildRequires: python3-zope-interface
1e9ff79
BuildRequires: python3-zope-event
2a7bbf9
2a7bbf9
Requires: python3-zope-interface
2a7bbf9
Requires: python3-zope-event
2a7bbf9
2a7bbf9
%description -n python3-zope-schema
2a7bbf9
This package is a zope.interface extension for defining data schemas.
2a7bbf9
%endif
2a7bbf9
5d9cc5d
%prep
5d9cc5d
%setup -q -n %{modname}-%{version}
2a7bbf9
2a7bbf9
rm -rf %{modname}.egg-info
2a7bbf9
5d9cc5d
5d9cc5d
%build
1e9ff79
%py2_build
2a7bbf9
%if 0%{?with_python3}
1e9ff79
%py3_build
2a7bbf9
%endif
2a7bbf9
531ceef
# build Sphinx documents
fb60488
sphinx-build -b html docs/ build/sphinx/html
fb60488
cp -pr build/sphinx/html .
531ceef
rm -fr html/{.buildinfo,.doctrees}
5d9cc5d
5d9cc5d
%install
2a7bbf9
%if 0%{?with_python3}
1e9ff79
%py3_install
2a7bbf9
%endif
1e9ff79
%py2_install
5d9cc5d
5d9cc5d
%check
818804d
%{__python2} setup.py test
818804d
%if 0%{?with_python3}
fb60488
# the test setup and runner are rather, ahem, 'special' (see setup.py
fb60488
# all_tests). This silly hack makes it fly on recent Python 3.
fb60488
ln -s %{python3_sitelib}/zope/* src/zope
75d7679
# this can fail if sitelib and sitearch are the same on the host doing
75d7679
# the build, it's no problem
75d7679
ln -s %{python3_sitearch}/zope/* src/zope >/dev/null || :
2a7bbf9
%{__python3} setup.py test
2a7bbf9
%endif
5d9cc5d
1e9ff79
%files -n python2-zope-schema
1e9ff79
%doc CHANGES.rst COPYRIGHT.txt README.rst
531ceef
%doc html/
1e9ff79
%license LICENSE.txt
818804d
%{python2_sitelib}/zope/schema/
818804d
%exclude %{python2_sitelib}/zope/schema/tests/
818804d
%exclude %{python2_sitelib}/zope/schema/*.txt
818804d
%{python2_sitelib}/%{modname}-*.egg-info
818804d
%{python2_sitelib}/%{modname}-*-nspkg.pth
5d9cc5d
2a7bbf9
%if 0%{?with_python3}
2a7bbf9
%files -n python3-zope-schema
1e9ff79
%doc CHANGES.rst COPYRIGHT.txt README.rst
2a7bbf9
%doc html/
1e9ff79
%license LICENSE.txt
2a7bbf9
%{python3_sitelib}/zope/schema/
2a7bbf9
%exclude %{python3_sitelib}/zope/schema/tests/
2a7bbf9
%exclude %{python3_sitelib}/zope/schema/*.txt
2a7bbf9
%{python3_sitelib}/%{modname}-*.egg-info
2a7bbf9
%{python3_sitelib}/%{modname}-*-nspkg.pth
2a7bbf9
%endif
2a7bbf9
5d9cc5d
5d9cc5d
%changelog
537b0dc
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.2-7
537b0dc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
537b0dc
fb60488
* Thu Dec 22 2016 Adam Williamson <awilliam@redhat.com> - 4.4.2-6
fb60488
- Fix Sphinx doc generation
fb60488
- Fix (in a stupid way, but it works) test running on recent Python 3
fb60488
fb60488
* Mon Dec 19 2016 Miro HronĨok <mhroncok@redhat.com>
64ad670
- Rebuild for Python 3.6
64ad670
1fbacf9
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.4.2-5
1fbacf9
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
1fbacf9
1e9ff79
* Tue Jun 28 2016 Ralph Bean <rbean@redhat.com> - 4.4.2-5
1e9ff79
- Modernize python macros.
1e9ff79
- Add an explicit python2 subpackage.
1e9ff79
22384ec
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.2-4
22384ec
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
22384ec
c804a6b
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.4.2-3
c804a6b
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
c804a6b
6b22a49
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.4.2-2
6b22a49
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
6b22a49
587286e
* Thu May 14 2015 Ralph Bean <rbean@redhat.com> - 4.4.2-1
587286e
- new version
587286e
818804d
* Wed Aug 20 2014 Ralph Bean <rbean@redhat.com> - 4.4.1-1
818804d
- Latest upstream.
818804d
- Modernized python macros.
818804d
2623cac
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.4.0-3
2623cac
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
2623cac
d04c73b
* Wed May 14 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 4.4.0-2
d04c73b
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
d04c73b
68a1ee0
* Tue Jan 28 2014 Ralph Bean <rbean@redhat.com> - 4.4.0-1
68a1ee0
- Latest upstream.
68a1ee0
8317b77
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.3.2-2
8317b77
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
8317b77
fc42cfc
* Mon Feb 25 2013 Ralph Bean <rbean@redhat.com> - 4.3.2-1
fc42cfc
- Latest upstream.
fc42cfc
- README and CHANGES renamed from .txt to .rst.
fc42cfc
2a7bbf9
* Wed Feb 13 2013 Ralph Bean <rbean@redhat.com> - 4.2.2-1
2a7bbf9
- Latest upstream.
2a7bbf9
- Added Python3 subpackage.
2a7bbf9
- Removed dos2unix references.  No longer needed.
2a7bbf9
7645f56
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.8.1-3
7645f56
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
7645f56
f222c21
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.8.1-2
f222c21
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
f222c21
b097f0a
* Mon Sep 26 2011 Robin Lee <cheeselee@fedoraproject.org> - 3.8.1-1
b097f0a
- Update to 3.8.1 (#741003)
b097f0a
- Fix ends of lines
b097f0a
af58471
* Thu Mar 31 2011 Robin Lee <cheeselee@fedoraproject.org> - 3.8.0-1
af58471
- Update to 3.8.0 (#689215)
af58471
9ab2f10
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.7.1-2
9ab2f10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
9ab2f10
531ceef
* Mon Jan  3 2011 Robin Lee <cheeselee@fedoraproject.org> - 3.7.1-1
531ceef
- Update to 3.7.1
531ceef
- Build Sphinx documents
531ceef
5d9cc5d
* Thu Sep 16 2010 Robin Lee <robinlee.sysu@gmail.com> - 3.7.0-1
5d9cc5d
- Update to 3.7.0
5d9cc5d
- Move the documents to proper place
5d9cc5d
- Exclude the tests
5d9cc5d
5d9cc5d
* Sat Sep 11 2010 Robin Lee <robinlee.sysu@gmail.com> - 3.6.4-2
5d9cc5d
- Spec cleaned up
5d9cc5d
- Requires: python-zope-filesystem and python-setuptools removed
5d9cc5d
- Add %%check section and run tests
5d9cc5d
- BR: python-zope-testing and runtime requirements added
5d9cc5d
- Don't move the text files
5d9cc5d
5d9cc5d
* Wed Jun 16 2010 Robin Lee <robinlee.sysu@gmail.com> - 3.6.4-1
5d9cc5d
- Initial packaging