14
0

Accepting request 510285 from home:alois:branches:devel:languages:python

Please also create link to -doc

OBS-URL: https://build.opensuse.org/request/show/510285
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-zope.schema?expand=0&rev=12
This commit is contained in:
Todd R
2017-07-17 16:39:42 +00:00
committed by Git OBS Bridge
parent 7a85390301
commit ce5e516c1f
5 changed files with 145 additions and 36 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-zope.schema
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,31 +16,24 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-zope.schema
Version: 4.4.2
Release: 0
Summary: Zope interface extension for defining data schemas
License: ZPL-2.1
Group: Development/Languages/Python
Url: http://pypi.python.org/pypi/zope.schema
Source: http://pypi.python.org/packages/source/z/zope.schema/zope.schema-%{version}.tar.gz
BuildRequires: python-devel
# Documentation requirements:
BuildRequires: python-Sphinx
# Test requirements:
BuildRequires: python-zope.event
BuildRequires: python-zope.interface >= 3.6.0
BuildRequires: python-zope.testing
Url: https://pypi.python.org/pypi/zope.schema
Source: https://files.pythonhosted.org/packages/source/z/zope.schema/zope.schema-%{version}.tar.gz
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-zope.event
Requires: python-zope.interface >= 3.6.0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
BuildRequires: python-ordereddict
Requires: python-ordereddict
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%else
BuildArch: noarch
%endif
%python_subpackages
%description
Schemas extend the notion of interfaces to detailed descriptions of
@@ -52,35 +45,20 @@ its value and provide a validation method. Besides you can optionally
specify characteristics such as its value being read-only or not
required.
%package doc
Summary: Zope interface extension for defining data schemas
Group: Development/Languages/Python
Requires: %{name} = %{version}
%description doc
This package contains documentation files for %{name}.
%prep
%setup -q -n zope.schema-%{version}
rm -rf zope.schema.egg-info
%build
python setup.py build
# Generate HTML documentation
python setup.py build_sphinx && rm build/sphinx/html/.buildinfo
%python_build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%python_install
%python_expand %fdupes -s %{buildroot}%{$python_sitelib}
%check
python setup.py -q test
%files
%files %{python_files}
%defattr(-,root,root,-)
%doc COPYRIGHT.txt LICENSE.txt CHANGES.rst README.rst
%{python_sitelib}/*
%files doc
%defattr(-,root,root,-)
%doc build/sphinx/html/
%changelog