]> git.pld-linux.org Git - packages/python-zope.interface.git/blobdiff - python-zope.interface.spec
- added tests (enabled by default) and docs skeleton
[packages/python-zope.interface.git] / python-zope.interface.spec
index fe43786e71dad607d2ca6d96eb2c243db34b2d3b..797fc1050d7c4f8185b4cf2659c12bbb48d10f42 100644 (file)
@@ -1,33 +1,42 @@
+# TODO: finish docs build (requires Sphinx repoze.sphinx.autointerface extension)
 #
 # Conditional build:
+%bcond_with    doc     # Sphinx documentation
 %bcond_without python2 # CPython 2.x module
 %bcond_without python3 # CPython 3.x module
+%bcond_without tests   # unit tests
 
-# NOTE: 'module' should match the python import path, not the egg name
 %define        module  zope.interface
 Summary:       Python 'interface' concept implementation
 Summary(pl.UTF-8):     Implementacja interfejsów dla języka Python
 Name:          python-%{module}
-Version:       4.0.3
+Version:       4.5.0
 Release:       2
 License:       ZPL 2.1
 Group:         Libraries/Python
-Source0:       http://pypi.python.org/packages/source/z/zope.interface/zope.interface-%{version}.tar.gz
-# Source0-md5: 1ddd308f2c83703accd1696158c300eb
+#Source0Download: https://pypi.org/simple/zope.interface/
+Source0:       https://files.pythonhosted.org/packages/source/z/zope.interface/zope.interface-%{version}.tar.gz
+# Source0-md5: 7b669cd692d817772c61d2e3ad0f1e71
 URL:           http://docs.zope.org/zope.interface/
 BuildRequires: rpm-pythonprov
 BuildRequires: rpmbuild(macros) >= 1.710
 %if %{with python2}
-BuildRequires: python
-BuildRequires: python-devel
+BuildRequires: python >= 1:2.7
+BuildRequires: python-devel >= 1:2.7
 BuildRequires: python-setuptools
+%{?with_tests:BuildRequires:   python-zope.event}
 %endif
 %if %{with python3}
-BuildRequires: python3
-BuildRequires: python3-devel
+BuildRequires: python3 >= 1:3.4
+BuildRequires: python3-devel >= 1:3.4
 BuildRequires: python3-setuptools
+%{?with_tests:BuildRequires:   python3-zope.event}
 %endif
-Requires:      python-modules
+%if %{with doc}
+BuildRequires: python3-repoze.sphinx.autointerface
+BuildRequires: sphinx-pdg-3
+%endif
+Requires:      python-modules >= 1:2.7
 Requires:      python-zope-base
 Provides:      ZopeInterface
 Provides:      Zope-Interface
@@ -46,7 +55,7 @@ języka Python.
 Summary:       Python 'interface' concept implementation
 Summary(pl.UTF-8):     Implementacja interfejsów dla języka Python
 Group:         Libraries/Python
-Requires:      python3-modules
+Requires:      python3-modules >= 1:3.4
 Requires:      python3-zope-base
 
 %description -n python3-%{module}
@@ -68,6 +77,12 @@ języka Python.
 %py3_build %{?with_tests:test}
 %endif
 
+%if %{with doc}
+PYTHONPATH=$(pwd)/src \
+%{__make} -C docs html \
+       SPHINXBUILD=sphinx-build-2
+%endif
+
 %install
 rm -rf $RPM_BUILD_ROOT
 %if %{with python2}
@@ -90,26 +105,26 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with python2}
 %files
 %defattr(644,root,root,755)
-%doc CHANGES.txt
+%doc CHANGES.rst COPYRIGHT.txt README.rst
 %dir %{py_sitedir}/zope/interface
 %{py_sitedir}/zope/interface/*.py[co]
 %attr(755,root,root) %{py_sitedir}/zope/interface/_zope_interface_coptimizations.so
 %{py_sitedir}/zope/interface/common
 %{py_sitedir}/zope/interface/tests
-%{py_sitedir}/zope.interface-*.egg-info
-%{py_sitedir}/zope.interface-*-nspkg.pth
+%{py_sitedir}/zope.interface-%{version}-py*.egg-info
+%{py_sitedir}/zope.interface-%{version}-py*-nspkg.pth
 %endif
 
 %if %{with python3}
 %files -n python3-%{module}
 %defattr(644,root,root,755)
-%doc CHANGES.txt
+%doc CHANGES.rst COPYRIGHT.txt README.rst
 %dir %{py3_sitedir}/zope/interface
 %{py3_sitedir}/zope/interface/*.py
 %{py3_sitedir}/zope/interface/__pycache__
 %attr(755,root,root) %{py3_sitedir}/zope/interface/_zope_interface_coptimizations*.so
 %{py3_sitedir}/zope/interface/common
 %{py3_sitedir}/zope/interface/tests
-%{py3_sitedir}/zope.interface-*.egg-info
-%{py3_sitedir}/zope.interface-*-nspkg.pth
+%{py3_sitedir}/zope.interface-%{version}-py*.egg-info
+%{py3_sitedir}/zope.interface-%{version}-py*-nspkg.pth
 %endif
This page took 0.056372 seconds and 4 git commands to generate.