]> git.pld-linux.org Git - packages/python3-markupsafe.git/blobdiff - python-markupsafe.spec
- updated to 1.1.1
[packages/python3-markupsafe.git] / python-markupsafe.spec
index 54f1f6151ccac0d36bde09867d66e2fe672796a2..5b0ba01ca160f6d084efaef998fe75b12efe310b 100644 (file)
@@ -1,6 +1,7 @@
 #
 # Conditional build:
 #
 # Conditional build:
-%bcond_without tests   # do not perform "make test"
+%bcond_without doc     # Sphinx documentation
+%bcond_without tests   # unit tests
 %bcond_without python2 # CPython 2.x module
 %bcond_without python3 # CPython 3.x module
 
 %bcond_without python2 # CPython 2.x module
 %bcond_without python3 # CPython 3.x module
 
@@ -8,26 +9,38 @@
 Summary:       MarkupSafe - a XML/HTML/XHTML Markup safe string for Python 2
 Summary(pl.UTF-8):     MarkupSafe - łańcuch dla Pythona 2 bezpieczny pod kątem znaczników XML/HTML/XHTML
 Name:          python-%{module}
 Summary:       MarkupSafe - a XML/HTML/XHTML Markup safe string for Python 2
 Summary(pl.UTF-8):     MarkupSafe - łańcuch dla Pythona 2 bezpieczny pod kątem znaczników XML/HTML/XHTML
 Name:          python-%{module}
-Version:       1.0
-Release:       2
+Version:       1.1.1
+Release:       1
 License:       BSD
 Group:         Development/Languages/Python
 License:       BSD
 Group:         Development/Languages/Python
-#Source0Download: https://pypi.python.org/pypi/MarkupSafe
+#Source0Download: https://pypi.org/simple/markupsafe/
 Source0:       https://files.pythonhosted.org/packages/source/M/MarkupSafe/MarkupSafe-%{version}.tar.gz
 Source0:       https://files.pythonhosted.org/packages/source/M/MarkupSafe/MarkupSafe-%{version}.tar.gz
-# Source0-md5: 2fcedc9284d50e577b5192e8e3578355
+# Source0-md5: 43fd756864fe42063068e092e220c57b
 URL:           http://www.pocoo.org/projects/markupsafe/#markupsafe
 BuildRequires: rpm-pythonprov
 URL:           http://www.pocoo.org/projects/markupsafe/#markupsafe
 BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.710
+BuildRequires: rpmbuild(macros) >= 1.714
 %if %{with python2}
 %if %{with python2}
-BuildRequires: python-devel
+BuildRequires: python-devel >= 1:2.7
 BuildRequires: python-setuptools
 BuildRequires: python-setuptools
+%if %{with tests}
+BuildRequires: python-pytest
+%endif
 %endif
 %if %{with python3}
 BuildRequires: python-2to3
 %endif
 %if %{with python3}
 BuildRequires: python-2to3
-BuildRequires: python3-devel
+BuildRequires: python3-devel >= 1:3.4
 BuildRequires: python3-setuptools
 BuildRequires: python3-setuptools
+%if %{with tests}
+BuildRequires: python3-pytest
+%endif
 %endif
 %endif
-Requires:      python-modules
+%if %{with doc}
+BuildRequires: python3-pallets-sphinx-themes >= 1.1.0
+# docs/requirements.txt says 1.8.0, but 1.7.6 also works
+#BuildRequires:        sphinx-pdg-3 >= 1.8.0
+BuildRequires: sphinx-pdg-3 >= 1.7.0
+%endif
+Requires:      python-modules >= 1:2.7
 Provides:      python-MarkupSafe = %{version}-%{release}
 Obsoletes:     python-MarkupSafe < 0.15-2
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 Provides:      python-MarkupSafe = %{version}-%{release}
 Obsoletes:     python-MarkupSafe < 0.15-2
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -43,7 +56,7 @@ pod kątem znaczników XML/HTML/XHTML.
 Summary:       Implements a XML/HTML/XHTML Markup safe string for Python 3
 Summary(pl.UTF-8):     MarkupSafe - łańcuch dla Pythona 3 bezpieczny pod kątem znaczników XML/HTML/XHTML
 Group:         Development/Languages
 Summary:       Implements a XML/HTML/XHTML Markup safe string for Python 3
 Summary(pl.UTF-8):     MarkupSafe - łańcuch dla Pythona 3 bezpieczny pod kątem znaczników XML/HTML/XHTML
 Group:         Development/Languages
-Requires:      python3-modules
+Requires:      python3-modules >= 1:3.4
 
 %description -n python3-markupsafe
 MarkupSafe implements a XML/HTML/XHTML Markup safe string for Python.
 
 %description -n python3-markupsafe
 MarkupSafe implements a XML/HTML/XHTML Markup safe string for Python.
@@ -52,20 +65,47 @@ MarkupSafe implements a XML/HTML/XHTML Markup safe string for Python.
 MarkupSafe to implementacja łańcucha znaków dla Pythona bezpiecznego
 pod kątem znaczników XML/HTML/XHTML.
 
 MarkupSafe to implementacja łańcucha znaków dla Pythona bezpiecznego
 pod kątem znaczników XML/HTML/XHTML.
 
+%package apidocs
+Summary:       API documentation for Python MarkupSafe module
+Summary(pl.UTF-8):     Dokumentacja API modułu Pythona MarkupSafe
+Group:         Documentation
+
+%description apidocs
+API documentation for Python MarkupSafe module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API modułu Pythona MarkupSafe.
+
 %prep
 %setup -q -n MarkupSafe-%{version}
 
 %build
 %if %{with python2}
 %prep
 %setup -q -n MarkupSafe-%{version}
 
 %build
 %if %{with python2}
-%py_build %{?with_tests:test}
+%py_build
+
+%if %{with tests}
+PYTHONPATH=$(pwd)/$(echo build-2/lib.*) \
+%{__python} -m pytest tests
+%endif
 %endif
 
 %if %{with python3}
 %endif
 
 %if %{with python3}
-%py3_build %{?with_tests:test}
+%py3_build
+
+%if %{with tests}
+PYTHONPATH=$(pwd)/$(echo build-3/lib.*) \
+%{__python3} -m pytest tests
+%endif
+%endif
+
+%if %{with doc}
+%{__make} -C docs html \
+       SPHINXBUILD=sphinx-build-3
 %endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 %endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
+
 %if %{with python2}
 %py_install
 
 %if %{with python2}
 %py_install
 
@@ -86,7 +126,7 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with python2}
 %files
 %defattr(644,root,root,755)
 %if %{with python2}
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS LICENSE README.rst
+%doc CHANGES.rst LICENSE.rst README.rst
 %dir %{py_sitedir}/markupsafe
 %{py_sitedir}/markupsafe/*.py[co]
 %attr(755,root,root) %{py_sitedir}/markupsafe/_speedups.so
 %dir %{py_sitedir}/markupsafe
 %{py_sitedir}/markupsafe/*.py[co]
 %attr(755,root,root) %{py_sitedir}/markupsafe/_speedups.so
@@ -96,10 +136,16 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with python3}
 %files -n python3-markupsafe
 %defattr(644,root,root,755)
 %if %{with python3}
 %files -n python3-markupsafe
 %defattr(644,root,root,755)
-%doc AUTHORS LICENSE README.rst
+%doc CHANGES.rst LICENSE.rst README.rst
 %dir %{py3_sitedir}/markupsafe
 %{py3_sitedir}/markupsafe/*.py
 %{py3_sitedir}/markupsafe/__pycache__
 %attr(755,root,root) %{py3_sitedir}/markupsafe/_speedups.cpython-*.so
 %{py3_sitedir}/MarkupSafe-%{version}-py*.egg-info
 %endif
 %dir %{py3_sitedir}/markupsafe
 %{py3_sitedir}/markupsafe/*.py
 %{py3_sitedir}/markupsafe/__pycache__
 %attr(755,root,root) %{py3_sitedir}/markupsafe/_speedups.cpython-*.so
 %{py3_sitedir}/MarkupSafe-%{version}-py*.egg-info
 %endif
+
+%if %{with doc}
+%files apidocs
+%defattr(644,root,root,755)
+%doc docs/_build/html/{_static,*.html,*.js}
+%endif
This page took 0.065823 seconds and 4 git commands to generate.