[packages/python-contextlib2] - initial, requirement for other backports chain

qboosh qboosh at pld-linux.org
Sat Mar 5 18:03:09 CET 2016


commit 41a1815e2727dc3335a9464d6952aca008a6127b
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Mar 5 18:06:36 2016 +0100

    - initial, requirement for other backports chain

 python-contextlib2.spec | 116 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 116 insertions(+)
---
diff --git a/python-contextlib2.spec b/python-contextlib2.spec
new file mode 100644
index 0000000..ab9ee4d
--- /dev/null
+++ b/python-contextlib2.spec
@@ -0,0 +1,116 @@
+#
+# Conditional build:
+%bcond_without	python2	# CPython 2.x module
+%bcond_without	python3	# CPython 3.x module
+%bcond_without	tests	# test target
+
+Summary:	Backports and enhancements for the contextlib module
+Summary(pl.UTF-8):	Backport oraz rozszerzenia dla modułu contextlib
+Name:		python-contextlib2
+Version:	0.5.1
+Release:	1
+License:	PSF
+Group:		Development/Languages/Python
+#Source0Download: https://pypi.python.org/pypi/contextlib2
+Source0:	https://pypi.python.org/packages/source/c/contextlib2/contextlib2-%{version}.tar.gz
+# Source0-md5:	b7f4c5a2b900c419b11b20f59838de1b
+URL:		http://contextlib2.readthedocs.org/
+%if %{with python2}
+BuildRequires:	python-devel >= 1:2.7
+%if %{with tests}
+# requires unittest.TestCase.assertRaisesRegex(), available since 3.2
+BuildRequires:	python-unittest2
+%endif
+%endif
+%if %{with python3}
+BuildRequires:	python3-devel >= 1:3.4
+%endif
+BuildRequires:	rpmbuild(macros) >= 1.710
+Requires:	python-modules >= 1:2.7
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+contextlib2 is a backport of the `standard library's contextlib module
+<https://docs.python.org/3.5/library/contextlib.html> to earlier
+Python versions.
+
+contextlib module provides utilities for with-statement contexts.
+
+%description -l pl.UTF-8
+contextlib2 to backport modułu contextlib z biblioteki standardowej
+(<https://docs.python.org/3.5/library/contextlib.html>) do starszych
+wersji Pythona.
+
+Moduł contextlib udostępnia narzędzia dla kontekstów ustalanych
+instrukcją with.
+
+%package -n python3-contextlib2
+Summary:	Backports and enhancements for the contextlib module
+Summary(pl.UTF-8):	Backport oraz rozszerzenia dla modułu contextlib
+Group:		Development/Languages/Python
+Requires:	python3-modules >= 1:3.4
+
+%description -n python3-contextlib2
+contextlib2 is a backport of the `standard library's contextlib module
+<https://docs.python.org/3.5/library/contextlib.html> to earlier
+Python versions.
+
+contextlib module provides utilities for with-statement contexts.
+
+%description -n python3-contextlib2 -l pl.UTF-8
+contextlib2 to backport modułu contextlib z biblioteki standardowej
+(<https://docs.python.org/3.5/library/contextlib.html>) do starszych
+wersji Pythona.
+
+Moduł contextlib udostępnia narzędzia dla kontekstów ustalanych
+instrukcją with.
+
+%prep
+%setup -q -n contextlib2-%{version}
+
+%build
+%if %{with python2}
+%py_build
+
+%{?with_tests:%{__python} test_contextlib2.py}
+%endif
+
+%if %{with python3}
+%py3_build
+
+%{?with_tests:%{__python3} test_contextlib2.py}
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%py_install
+
+%py_postclean
+%endif
+
+%if %{with python3}
+%py3_install
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%files
+%defattr(644,root,root,755)
+%doc LICENSE.txt NEWS.rst README.rst
+%{py_sitescriptdir}/contextlib2.py[co]
+%{py_sitescriptdir}/contextlib2-%{version}-py*.egg-info
+%endif
+
+%if %{with python3}
+%files -n python3-contextlib2
+%defattr(644,root,root,755)
+%doc LICENSE.txt NEWS.rst README.rst
+%{py3_sitescriptdir}/contextlib2.py
+%{py3_sitescriptdir}/__pycache__/contextlib2.cpython-*.py[co]
+%{py3_sitescriptdir}/contextlib2-%{version}-py*.egg-info
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-contextlib2.git/commitdiff/41a1815e2727dc3335a9464d6952aca008a6127b



More information about the pld-cvs-commit mailing list