]> git.pld-linux.org Git - packages/python3-markupsafe.git/blobdiff - python-markupsafe.spec
- rebuild with python 3.8
[packages/python3-markupsafe.git] / python-markupsafe.spec
index 340d56c80aac8438e8834866bc2a70fac3536182..d5c22d4a0b94afd1b6f720c5d37f48592477db72 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Conditional build:
-%bcond_without tests   # do not perform "make test"
+%bcond_without tests   # unit tests
 %bcond_without python2 # CPython 2.x module
 %bcond_without python3 # CPython 3.x module
 
@@ -8,16 +8,16 @@
 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:       0.23
-Release:       3
+Version:       1.1.0
+Release:       2
 License:       BSD
 Group:         Development/Languages/Python
-#Source0Download: https://pypi.python.org/pypi/MarkupSafe
-Source0:       https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-%{version}.tar.gz
-# Source0-md5: f5ab3deee4c37cd6a922fb81e730da6e
-URL:           http://www.pocoo.org/
+#Source0Download: https://pypi.org/pypi/MarkupSafe/
+Source0:       https://files.pythonhosted.org/packages/source/M/MarkupSafe/MarkupSafe-%{version}.tar.gz
+# Source0-md5: 49e3f3230cedb7ae34faf06913db83fc
+URL:           http://www.pocoo.org/projects/markupsafe/#markupsafe
 BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.219
+BuildRequires: rpmbuild(macros) >= 1.710
 %if %{with python2}
 BuildRequires: python-devel
 BuildRequires: python-setuptools
@@ -53,62 +53,31 @@ MarkupSafe to implementacja łańcucha znaków dla Pythona bezpiecznego
 pod kątem znaczników XML/HTML/XHTML.
 
 %prep
-%setup -qc
-mv MarkupSafe-%{version} py2
-# for %doc
-cp -p py2/{AUTHORS,LICENSE,README.rst} .
-
-%if %{with python3}
-cp -a py2 py3
-2to3 --write --nobackups py3
-%endif
+%setup -q -n MarkupSafe-%{version}
 
 %build
 %if %{with python2}
-cd py3
-# CFLAGS is only for arch packages - remove on noarch packages
-CC="%{__cc}" \
-CFLAGS="%{rpmcflags}" \
-%{__python} setup.py build
-%{?with_tests:%{__python} setup.py test}
-cd ..
+%py_build %{?with_tests:test}
 %endif
 
 %if %{with python3}
-cd py3
-CC="%{__cc}" \
-CFLAGS="%{rpmcflags}" \
-%{__python3} setup.py build
-%{?with_tests:%{__python3} setup.py test}
-cd ..
+%py3_build %{?with_tests:test}
 %endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 %if %{with python2}
-cd py2
-%{__python} setup.py install \
-       --optimize=2 \
-       --root=$RPM_BUILD_ROOT
+%py_install
 
+%py_postclean
 # C code errantly gets installed
 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/markupsafe/_speedups.c
-%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
-%py_comp $RPM_BUILD_ROOT%{py_sitedir}
-%py_postclean
-cd ..
 %endif
 
 %if %{with python3}
-cd py3
-%{__python3} setup.py install \
-       --optimize=2 \
-       --root=$RPM_BUILD_ROOT
-
+%py3_install
 
-# C code errantly gets installed
 %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/markupsafe/_speedups.c
-cd ..
 %endif
 
 %clean
@@ -117,7 +86,7 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with python2}
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS LICENSE README.rst
+%doc LICENSE.rst README.rst
 %dir %{py_sitedir}/markupsafe
 %{py_sitedir}/markupsafe/*.py[co]
 %attr(755,root,root) %{py_sitedir}/markupsafe/_speedups.so
@@ -127,7 +96,7 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with python3}
 %files -n python3-markupsafe
 %defattr(644,root,root,755)
-%doc AUTHORS LICENSE README.rst
+%doc LICENSE.rst README.rst
 %dir %{py3_sitedir}/markupsafe
 %{py3_sitedir}/markupsafe/*.py
 %{py3_sitedir}/markupsafe/__pycache__
This page took 0.059855 seconds and 4 git commands to generate.